diff options
author | Maxime Ripard <maxime@cerno.tech> | 2022-12-01 16:11:48 +0100 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-12-08 09:56:56 +0100 |
commit | f759f5b53f1caf734bdffcb9519d4edd877b017f (patch) | |
tree | 2cf006f4295577581a3b5df7b383f085f703e6da /drivers/gpu/drm/vc4/Kconfig | |
parent | 640dbcc91dec76aeeae782d97f0e8ed3c65b58f6 (diff) | |
download | lwn-f759f5b53f1caf734bdffcb9519d4edd877b017f.tar.gz lwn-f759f5b53f1caf734bdffcb9519d4edd877b017f.zip |
drm/vc4: tests: Introduce a mocking infrastructure
In order to test the current atomic_check hooks we need to have a DRM
device that has roughly the same capabilities and layout that the actual
hardware. We'll also need a bunch of functions to create arbitrary
atomic states.
Let's create some helpers to create a device that behaves like the real
one, and some helpers to maintain the atomic state we want to check.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://lore.kernel.org/r/20221123-rpi-kunit-tests-v3-17-4615a663a84a@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'drivers/gpu/drm/vc4/Kconfig')
-rw-r--r-- | drivers/gpu/drm/vc4/Kconfig | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/Kconfig b/drivers/gpu/drm/vc4/Kconfig index 246305d17a52..f423941c028d 100644 --- a/drivers/gpu/drm/vc4/Kconfig +++ b/drivers/gpu/drm/vc4/Kconfig @@ -34,3 +34,19 @@ config DRM_VC4_HDMI_CEC help Choose this option if you have a Broadcom VC4 GPU and want to use CEC. + +config DRM_VC4_KUNIT_TEST + bool "KUnit tests for VC4" if !KUNIT_ALL_TESTS + depends on DRM_VC4 && KUNIT + select DRM_KUNIT_TEST_HELPERS + default KUNIT_ALL_TESTS + help + This builds unit tests for the VC4 DRM/KMS driver. This option is + not useful for distributions or general kernels, but only for kernel + developers working on the VC4 driver. + + For more information on KUnit and unit tests in general, + please refer to the KUnit documentation in + Documentation/dev-tools/kunit/. + + If in doubt, say "N". |