AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Joao Paulo Pereira da Silva <jppaulo11@usp.br>
To: rodrigo.siqueira@amd.com
Cc: paulormm@ime.usp.br, Xinhui.Pan@amd.com, airlied@linux.ie,
	alexander.deucher@amd.com, amd-gfx@lists.freedesktop.org,
	andrealmeid@riseup.net, christian.koenig@amd.com,
	daniel@ffwll.ch, davidgow@google.com, dlatypov@google.com,
	dri-devel@lists.freedesktop.org, harry.wentland@amd.com,
	hersenxs.wu@amd.com, isabbasso@riseup.net, javierm@redhat.com,
	kunit-dev@googlegroups.com, maarten.lankhorst@linux.intel.com,
	magalilemes00@gmail.com, mairacanal@riseup.net,
	mripard@kernel.org, mwen@igalia.com, nicholas.choi@amd.com,
	sunpeng.li@amd.com, tales.aparecida@gmail.com,
	twoerner@gmail.com, tzimmermann@suse.de,
	Joao Paulo Pereira da Silva <jppaulo11@usp.br>
Subject: [PATCH 1/4] drm/amd/display: Refactor AMD display KUnit tests configs
Date: Sat, 20 Apr 2024 15:48:16 -0300	[thread overview]
Message-ID: <20240420184929.97854-2-jppaulo11@usp.br> (raw)
In-Reply-To: <20240420184929.97854-1-jppaulo11@usp.br>

Configs in AMD display KUnit tests can be clarified. Remove unnecessary
configs, rename configs to follow a pattern, and update config Help
blocks.

Signed-off-by: Joao Paulo Pereira da Silva <jppaulo11@usp.br>
---
 drivers/gpu/drm/amd/display/Kconfig           | 31 ++++++-------------
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c  |  2 +-
 .../dc/dml/dcn20/display_mode_vba_20.c        |  2 +-
 .../dc/dml/dcn20/display_rq_dlg_calc_20.c     |  2 +-
 .../drm/amd/display/test/kunit/.kunitconfig   |  7 ++---
 .../gpu/drm/amd/display/test/kunit/Makefile   |  4 +--
 6 files changed, 17 insertions(+), 31 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/Kconfig b/drivers/gpu/drm/amd/display/Kconfig
index 11b0e54262f3..b2760adb3da9 100644
--- a/drivers/gpu/drm/amd/display/Kconfig
+++ b/drivers/gpu/drm/amd/display/Kconfig
@@ -51,25 +51,25 @@ config DRM_AMD_SECURE_DISPLAY
 	  This option enables the calculation of crc of specific region via
 	  debugfs. Cooperate with specific DMCU FW.
 
-config DCE_KUNIT_TEST
-	bool "Run all KUnit tests for DCE" if !KUNIT_ALL_TESTS
+config DRM_AMD_DC_KUNIT_TEST
+	bool "Enable KUnit tests for the root of DC" if !KUNIT_ALL_TESTS
 	depends on DRM_AMD_DC && KUNIT
 	default KUNIT_ALL_TESTS
 	help
-		Enables unit tests for the Display Controller Engine. Only useful for kernel
-		devs running KUnit.
+		Enables unit tests for files in the root of the Display Core directory.
+		Only useful for kernel devs running KUnit.
 
 		For more information on KUnit and unit tests in general please refer to
 		the KUnit documentation in Documentation/dev-tools/kunit/.
 
 		If unsure, say N.
 
-config DML_KUNIT_TEST
+config DRM_AMD_DC_DML_KUNIT_TEST
 	bool "Run all KUnit tests for DML" if !KUNIT_ALL_TESTS
 	depends on DRM_AMD_DC_FP && KUNIT
 	default KUNIT_ALL_TESTS
 	help
-		Enables unit tests for the Display Controller Engine. Only useful for kernel
+		Enables unit tests for the Display Controller Next. Only useful for kernel
 		devs running KUnit.
 
 		For more information on KUnit and unit tests in general please refer to
@@ -77,26 +77,13 @@ config DML_KUNIT_TEST
 
 		If unsure, say N.
 
-config AMD_DC_BASICS_KUNIT_TEST
+config DRM_AMD_DC_BASICS_KUNIT_TEST
 	bool "Enable KUnit tests for the 'basics' sub-component of DAL" if !KUNIT_ALL_TESTS
 	depends on DRM_AMD_DC && KUNIT
 	default KUNIT_ALL_TESTS
 	help
-		Enables unit tests for the Display Core. Only useful for kernel
-		devs running KUnit.
-
-		For more information on KUnit and unit tests in general please refer to
-		the KUnit documentation in Documentation/dev-tools/kunit/.
-
-		If unsure, say N.
-
-config AMD_DC_KUNIT_TEST
-	bool "Enable KUnit tests for the 'utils' sub-component of DAL" if !KUNIT_ALL_TESTS
-	depends on DRM_AMD_DC && KUNIT
-	default KUNIT_ALL_TESTS
-	help
-		Enables unit tests for the basics folder of Display Core. Only useful for
-		kernel devs running KUnit.
+		Enables unit tests for the basics folder of the Display Core. Only useful
+		for kernel devs running KUnit.
 
 		For more information on KUnit and unit tests in general please refer to
 		the KUnit documentation in Documentation/dev-tools/kunit/.
diff --git a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
index 7aafdfeac60e..7efd4768b0d7 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
+++ b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
@@ -1439,6 +1439,6 @@ bool dc_wake_and_execute_gpint(const struct dc_context *ctx, enum dmub_gpint_com
 	return result;
 }
 
-#if IS_ENABLED(CONFIG_AMD_DC_KUNIT_TEST)
+#if IS_ENABLED(CONFIG_DRM_AMD_DC_KUNIT_TEST)
 #include "../test/kunit/dc/dc_dmub_srv_test.c"
 #endif
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c
index aea6e29fd6e5..5c5be75c08e0 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c
@@ -5117,6 +5117,6 @@ void dml20_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
 	}
 }
 
-#if IS_ENABLED(CONFIG_DML_KUNIT_TEST)
+#if IS_ENABLED(CONFIG_DRM_AMD_DC_DML_KUNIT_TEST)
 #include "../../test/kunit/dc/dml/dcn20/display_mode_vba_20_test.c"
 #endif
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c
index 45f75a7f84c7..aab34156e9ae 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c
@@ -1684,6 +1684,6 @@ static void calculate_ttu_cursor(struct display_mode_lib *mode_lib,
 	}
 }
 
-#if IS_ENABLED(CONFIG_DML_KUNIT_TEST)
+#if IS_ENABLED(CONFIG_DRM_AMD_DC_DML_KUNIT_TEST)
 #include "../../../test/kunit/dc/dml/dcn20/display_rq_dlg_calc_20_test.c"
 #endif
diff --git a/drivers/gpu/drm/amd/display/test/kunit/.kunitconfig b/drivers/gpu/drm/amd/display/test/kunit/.kunitconfig
index 4c5861ad58bd..1dede9da74d3 100644
--- a/drivers/gpu/drm/amd/display/test/kunit/.kunitconfig
+++ b/drivers/gpu/drm/amd/display/test/kunit/.kunitconfig
@@ -3,7 +3,6 @@ CONFIG_PCI=y
 CONFIG_DRM=y
 CONFIG_DRM_AMDGPU=y
 CONFIG_DRM_AMD_DC=y
-CONFIG_AMD_DC_BASICS_KUNIT_TEST=y
-CONFIG_AMD_DC_KUNIT_TEST=y
-CONFIG_DCE_KUNIT_TEST=y
-CONFIG_DML_KUNIT_TEST=y
+CONFIG_DRM_AMD_DC_BASICS_KUNIT_TEST=y
+CONFIG_DRM_AMD_DC_KUNIT_TEST=y
+CONFIG_DRM_AMD_DC_DML_KUNIT_TEST=y
diff --git a/drivers/gpu/drm/amd/display/test/kunit/Makefile b/drivers/gpu/drm/amd/display/test/kunit/Makefile
index a6ad449f9885..4eb08477d6dc 100644
--- a/drivers/gpu/drm/amd/display/test/kunit/Makefile
+++ b/drivers/gpu/drm/amd/display/test/kunit/Makefile
@@ -3,11 +3,11 @@
 # Makefile for the KUnit Tests for DC
 #
 
-ifdef CONFIG_AMD_DC_BASICS_KUNIT_TEST
+ifdef CONFIG_DRM_AMD_DC_BASICS_KUNIT_TEST
 	DC_TESTS += dc/basics/fixpt31_32_test.o
 endif
 
-ifdef CONFIG_DML_KUNIT_TEST
+ifdef CONFIG_DRM_AMD_DC_DML_KUNIT_TEST
 	CFLAGS_$(AMDDALPATH)/test/kunit/dc/dml/display_mode_vba_test.o := $(dml_ccflags)
 	CFLAGS_$(AMDDALPATH)/test/kunit/dc/dml/dcn20/dcn20_fpu_test.o := $(dml_ccflags)
 	DC_TESTS += dc/dml/display_mode_vba_test.o dc/dml/dcn20/dcn20_fpu_test.o
-- 
2.44.0


  reply	other threads:[~2024-04-20 18:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22 15:56 [PATCH v5 0/8] drm/amd/display: Introduce KUnit to Display Mode Library Rodrigo Siqueira
2024-02-22 15:56 ` [PATCH v5 1/8] drm/amd/display: Introduce KUnit tests for fixed31_32 library Rodrigo Siqueira
2024-02-22 15:56 ` [PATCH v5 2/8] drm/amd/display: Introduce KUnit tests to the bw_fixed library Rodrigo Siqueira
2024-02-22 15:56 ` [PATCH v5 3/8] drm/amd/display: Introduce KUnit tests to display_rq_dlg_calc_20 Rodrigo Siqueira
2024-02-22 15:56 ` [PATCH v5 4/8] drm/amd/display: Introduce KUnit tests to the display_mode_vba library Rodrigo Siqueira
2024-02-22 15:56 ` [PATCH v5 5/8] drm/amd/display: Introduce KUnit to dcn20/display_mode_vba_20 library Rodrigo Siqueira
2024-02-22 15:56 ` [PATCH v5 6/8] drm/amd/display: Introduce KUnit tests for dcn20_fpu Rodrigo Siqueira
2024-02-22 15:56 ` [PATCH v5 7/8] drm/amd/display: Introduce KUnit tests to dc_dmub_srv library Rodrigo Siqueira
2024-02-26 11:12   ` Jani Nikula
2024-02-28 14:42     ` Rodrigo Siqueira Jordao
2024-02-22 15:56 ` [PATCH v5 8/8] Documentation/gpu: Add Display Core Unit Test documentation Rodrigo Siqueira
2024-04-20 18:48 ` [PATCH 0/4] drm/amd/display: Update Display Core unit tests Joao Paulo Pereira da Silva
2024-04-20 18:48   ` Joao Paulo Pereira da Silva [this message]
2024-04-20 18:48   ` [PATCH 2/4] drm/amd/display/test: Fix kunit test that is not running Joao Paulo Pereira da Silva
2024-04-20 18:48   ` [PATCH 3/4] drm/amd/display/test: Optimize kunit test suite dml_dcn20_fpu_dcn21_update_bw_bounding_box_test Joao Paulo Pereira da Silva
2024-04-20 18:48   ` [PATCH 4/4] Documentation/gpu: Update AMD Display Core Unit Test documentation Joao Paulo Pereira da Silva
2024-04-21  1:36   ` [PATCH 0/4] drm/amd/display: Update Display Core unit tests Tales

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240420184929.97854-2-jppaulo11@usp.br \
    --to=jppaulo11@usp.br \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=andrealmeid@riseup.net \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=davidgow@google.com \
    --cc=dlatypov@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=hersenxs.wu@amd.com \
    --cc=isabbasso@riseup.net \
    --cc=javierm@redhat.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=magalilemes00@gmail.com \
    --cc=mairacanal@riseup.net \
    --cc=mripard@kernel.org \
    --cc=mwen@igalia.com \
    --cc=nicholas.choi@amd.com \
    --cc=paulormm@ime.usp.br \
    --cc=rodrigo.siqueira@amd.com \
    --cc=sunpeng.li@amd.com \
    --cc=tales.aparecida@gmail.com \
    --cc=twoerner@gmail.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox