Skip to contentSkip to conversation

drm/tests: Build KMS helpers when DRM_KUNIT_TEST_HELPERS is enabled

PATCH Applied Karolina Stolarek 2 participants 2 messages Mar 13, 2024 – Mar 15, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/tests: Build KMS helpers when DRM_KUNIT_TEST_HELPERS is enabled

Commit 66671944e176 ("drm/tests: helpers: Add atomic helpers") introduced a dependency on CRTC helpers in KUnit test helpers. Select the former when building KUnit test helpers to avoid linker errors.

Fixes 66671944e176 ("drm/tests: helpers: Add atomic helpers")
Cc Maxime Ripard <[email protected]>
Cc Maíra Canal <[email protected]>

---
Run into this when trying to run TTM KUnit tests. As for now, TTM KUnit test suite are the only outside user of these helpers, but I think it makes sense to explicitly select DRM_KMS_HELPER together with DRM_KUNIT_TEST_HELPERS, instead of doing it in DRM_TTM_KUNIT_TEST.

 drivers/gpu/drm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/Kconfig +1 -1
index c08e18108c2a..91776996ada4 100644
@@ -68,6 +68,7 @@ config DRM_USE_DYNAMIC_DEBUG
 config DRM_KUNIT_TEST_HELPERS
 	tristate
 	depends on DRM && KUNIT
+	select DRM_KMS_HELPER
 	help
 	  KUnit Helpers for KMS drivers.
 
@@ -80,7 +81,6 @@ config DRM_KUNIT_TEST
 	select DRM_EXEC
 	select DRM_EXPORT_FOR_TESTS if m
 	select DRM_GEM_SHMEM_HELPER
-	select DRM_KMS_HELPER
 	select DRM_KUNIT_TEST_HELPERS
 	select DRM_LIB_RANDOM
 	select PRIME_NUMBERS
Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw
Quoted 6 lines · Karolina Stolarek

Commit 66671944e176 ("drm/tests: helpers: Add atomic helpers") introduced a dependency on CRTC helpers in KUnit test helpers. Select the former when building KUnit test helpers to avoid linker errors.

Applied to misc/kernel.git (drm-misc-next-fixes).

Thanks!
Maxime