From: Alex Hung <[email protected]>

[WHAT]
DRM_KUNIT_TEST_HELPERS has no prompt, so it can only be turned on by a
select.  DRM_AMD_DC_KUNIT_TEST merely depended on it, which forced the
amdgpu_dm KUnit config to enable CONFIG_DRM_KUNIT_TEST as well and drag
in the entire core DRM test suite.

[HOW]
Select DRM_KUNIT_TEST_HELPERS from DRM_AMD_DC_KUNIT_TEST, matching what
DRM_KUNIT_TEST and DRM_TTM_KUNIT_TEST already do, and drop
CONFIG_DRM_KUNIT_TEST from the amdgpu_dm kunitconfig.  The amdgpu_dm
tests now build standalone and a run executes only the amdgpu_dm suites.

Assisted-by: Copilot:Claude-Opus-5
Reviewed-by: Bhawanpreet Lakha <[email protected]>
Signed-off-by: Alex Hung <[email protected]>
Signed-off-by: George Zhang <[email protected]>
---
 drivers/gpu/drm/amd/display/Kconfig                      | 3 ++-
 drivers/gpu/drm/amd/display/amdgpu_dm/tests/.kunitconfig | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/Kconfig 
b/drivers/gpu/drm/amd/display/Kconfig
index 617bc1932524..a319680c329b 100644
--- a/drivers/gpu/drm/amd/display/Kconfig
+++ b/drivers/gpu/drm/amd/display/Kconfig
@@ -67,7 +67,8 @@ config DRM_AMD_SECURE_DISPLAY
 
 config DRM_AMD_DC_KUNIT_TEST
        tristate "KUnit tests for the AMD DC display driver" if !KUNIT_ALL_TESTS
-       depends on DRM_AMD_DC && KUNIT && DEBUG_FS && DRM_KUNIT_TEST_HELPERS
+       depends on DRM_AMD_DC && KUNIT && DEBUG_FS
+       select DRM_KUNIT_TEST_HELPERS
        default KUNIT_ALL_TESTS
        help
          This option enables KUnit tests for the AMD Display Core driver.
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/.kunitconfig 
b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/.kunitconfig
index c7c8527dbb10..0c26c510f7a5 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/.kunitconfig
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/.kunitconfig
@@ -6,7 +6,6 @@ CONFIG_DRM_AMD_DC=y
 CONFIG_DEBUG_FS=y
 CONFIG_DRM_AMD_DC_KUNIT_TEST=y
 CONFIG_FW_LOADER=y
-CONFIG_DRM_KUNIT_TEST=y
 CONFIG_DRM_KUNIT_TEST_HELPERS=y
 CONFIG_DRM_KMS_HELPER=y
 CONFIG_DRM_TTM=y
-- 
2.55.0

Reply via email to