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 3/4] drm/amd/display/test: Optimize kunit test suite dml_dcn20_fpu_dcn21_update_bw_bounding_box_test
Date: Sat, 20 Apr 2024 15:48:18 -0300	[thread overview]
Message-ID: <20240420184929.97854-4-jppaulo11@usp.br> (raw)
In-Reply-To: <20240420184929.97854-1-jppaulo11@usp.br>

The KUnit init function of the suite
dml_dcn20_fpu_dcn21_update_bw_bounding_box_test does not need to be executed
before every test, but only once before the test suite, since it's just
used to store backup copies of DCN global structures.
So, turn it into a suite_init.

Signed-off-by: Joao Paulo Pereira da Silva <jppaulo11@usp.br>
---
 .../amd/display/test/kunit/dc/dml/dcn20/dcn20_fpu_test.c    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/test/kunit/dc/dml/dcn20/dcn20_fpu_test.c b/drivers/gpu/drm/amd/display/test/kunit/dc/dml/dcn20/dcn20_fpu_test.c
index c51a0afbe518..b13a952e0227 100644
--- a/drivers/gpu/drm/amd/display/test/kunit/dc/dml/dcn20/dcn20_fpu_test.c
+++ b/drivers/gpu/drm/amd/display/test/kunit/dc/dml/dcn20/dcn20_fpu_test.c
@@ -449,10 +449,10 @@ static struct _vcs_dpi_soc_bounding_box_st original_dcn2_1_soc;
 static struct _vcs_dpi_ip_params_st original_dcn2_1_ip;
 
 /**
- * dcn20_fpu_dcn21_update_bw_bounding_box_test_init - Store backup copies of DCN global structures
+ * dcn20_fpu_dcn21_update_bw_bounding_box_test_suite_init - Store backup copies of DCN global structures
  * @test: represents a running instance of a test.
  */
-static int dcn20_fpu_dcn21_update_bw_bounding_box_test_init(struct kunit *test)
+static int dcn20_fpu_dcn21_update_bw_bounding_box_test_suite_init(struct kunit_suite *suite)
 {
 	memcpy(&original_dcn2_1_soc, &dcn2_1_soc, sizeof(struct _vcs_dpi_soc_bounding_box_st));
 	memcpy(&original_dcn2_1_ip, &dcn2_1_ip, sizeof(struct _vcs_dpi_ip_params_st));
@@ -553,7 +553,7 @@ static struct kunit_case dcn20_fpu_dcn21_update_bw_bounding_box_test_cases[] = {
 
 static struct kunit_suite dcn21_update_bw_bounding_box_test_suite = {
 	.name = "dml_dcn20_fpu_dcn21_update_bw_bounding_box_test",
-	.init = dcn20_fpu_dcn21_update_bw_bounding_box_test_init,
+	.suite_init = dcn20_fpu_dcn21_update_bw_bounding_box_test_suite_init,
 	.exit = dcn20_fpu_dcn21_update_bw_bounding_box_test_exit,
 	.test_cases = dcn20_fpu_dcn21_update_bw_bounding_box_test_cases,
 };
-- 
2.44.0


  parent 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   ` [PATCH 1/4] drm/amd/display: Refactor AMD display KUnit tests configs Joao Paulo Pereira da Silva
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   ` Joao Paulo Pereira da Silva [this message]
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-4-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