Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Subject: [PATCH i-g-t 2/3] tests/kms_color: Add connector name to dynamic subtests
Date: Fri, 24 May 2024 15:42:01 +0530	[thread overview]
Message-ID: <20240524101202.2735010-2-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20240524101202.2735010-1-bhanuprakash.modem@intel.com>

Add connector name to dynamic subtests, so that it would
be easy to understand that which pipe/output combo is
selected.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_color.c | 66 +++++++++++++++++++++++------------------------
 1 file changed, 32 insertions(+), 34 deletions(-)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index bdb80a4ad..645a03537 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -790,8 +790,8 @@ run_gamma_degamma_tests_for_pipe(data_t *data, enum pipe p,
 	if (!pipe_output_combo_valid(data, p))
 		goto out;
 
-	igt_assert(test_t(data, data->primary));
-
+	igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(p), igt_output_name(data->output))
+		igt_assert(test_t(data, data->primary));
 out:
 	test_cleanup(data);
 }
@@ -832,30 +832,32 @@ run_ctm_tests_for_pipe(data_t *data, enum pipe p,
 	if (!iter)
 		iter = 1;
 
-	/*
-	 * We tests a few values around the expected result because
-	 * it depends on the hardware we're dealing with, we can either
-	 * get clamped or rounded values and we also need to account
-	 * for odd number of items in the LUTs.
-	 */
-	for (i = 0; i < iter; i++) {
-		color_t expected_colors[3] = {
-			fb_colors[0],
-			fb_colors[1],
-			fb_colors[2],
-		};
-
-		transform_color(&expected_colors[0], ctm, delta * (i - (iter / 2)));
-		transform_color(&expected_colors[1], ctm, delta * (i - (iter / 2)));
-		transform_color(&expected_colors[2], ctm, delta * (i - (iter / 2)));
-
-		if (test_pipe_ctm(data, data->primary, fb_colors,
-				  expected_colors, ctm)) {
-			success = true;
-			break;
+	igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(p), igt_output_name(data->output)) {
+		/*
+		 * We tests a few values around the expected result because
+		 * it depends on the hardware we're dealing with, we can either
+		 * get clamped or rounded values and we also need to account
+		 * for odd number of items in the LUTs.
+		 */
+		for (i = 0; i < iter; i++) {
+			color_t expected_colors[3] = {
+				fb_colors[0],
+				fb_colors[1],
+				fb_colors[2],
+			};
+
+			transform_color(&expected_colors[0], ctm, delta * (i - (iter / 2)));
+			transform_color(&expected_colors[1], ctm, delta * (i - (iter / 2)));
+			transform_color(&expected_colors[2], ctm, delta * (i - (iter / 2)));
+
+			if (test_pipe_ctm(data, data->primary, fb_colors,
+					  expected_colors, ctm)) {
+				success = true;
+				break;
+			}
 		}
+		igt_assert(success);
 	}
-	igt_assert(success);
 
 out:
 	test_cleanup(data);
@@ -1129,10 +1131,8 @@ run_tests_for_pipe(data_t *data)
 		igt_describe_f("%s", gamma_degamma_tests[i].desc);
 		igt_subtest_with_dynamic_f("%s", gamma_degamma_tests[i].name) {
 			for_each_pipe(&data->display, pipe) {
-				igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe)) {
-					run_gamma_degamma_tests_for_pipe(data, pipe,
-									 gamma_degamma_tests[i].test_t);
-				}
+				run_gamma_degamma_tests_for_pipe(data, pipe,
+								 gamma_degamma_tests[i].test_t);
 			}
 		}
 	}
@@ -1141,12 +1141,10 @@ run_tests_for_pipe(data_t *data)
 		igt_describe_f("%s", ctm_tests[i].desc);
 		igt_subtest_with_dynamic_f("%s", ctm_tests[i].name) {
 			for_each_pipe(&data->display, pipe) {
-				igt_dynamic_f("pipe-%s", kmstest_pipe_name(pipe)) {
-					run_ctm_tests_for_pipe(data, pipe,
-							       ctm_tests[i].fb_colors,
-							       ctm_tests[i].ctm,
-							       ctm_tests[i].iter);
-				}
+				run_ctm_tests_for_pipe(data, pipe,
+						       ctm_tests[i].fb_colors,
+						       ctm_tests[i].ctm,
+						       ctm_tests[i].iter);
 			}
 		}
 	}
-- 
2.43.2


  reply	other threads:[~2024-05-24 10:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-24 10:12 [PATCH i-g-t 1/3] tests/kms_color_helper: Add a helper to get high resolution mode Bhanuprakash Modem
2024-05-24 10:12 ` Bhanuprakash Modem [this message]
2024-06-27  5:17   ` [PATCH i-g-t 2/3] tests/kms_color: Add connector name to dynamic subtests Karthik B S
2024-05-24 10:12 ` [PATCH i-g-t 3/3] tests/kms_color: Update all tests to use high resolution mode Bhanuprakash Modem
2024-05-24 12:05 ` ✓ CI.xeBAT: success for series starting with [i-g-t,1/3] tests/kms_color_helper: Add a helper to get " Patchwork
2024-05-24 12:13 ` ✓ Fi.CI.BAT: " Patchwork
2024-05-24 14:43 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-25 10:37 ` ✓ Fi.CI.IGT: success " Patchwork

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=20240524101202.2735010-2-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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