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
Subject: [igt-dev] [i-g-t V2 4/4] tests/intel/kms_dirtyfb: Restructure dynamic subtests
Date: Wed, 15 Nov 2023 18:32:37 +0530	[thread overview]
Message-ID: <20231115130237.1522518-5-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20231115130237.1522518-1-bhanuprakash.modem@intel.com>

Instead of having all features under single subtest, create
a subtest for each feature.

Before:
igt@kms_dirtyfb@dirtyfb-ioctl@psr-eDP-1
igt@kms_dirtyfb@dirtyfb-ioctl@fbc-eDP-1
igt@kms_dirtyfb@dirtyfb-ioctl@drrs-eDP-1

After:
igt@kms_dirtyfb@psr-dirtyfb-ioctl@pipe-A-eDP-1
igt@kms_dirtyfb@fbc-dirtyfb-ioctl@pipe-A-eDP-1
igt@kms_dirtyfb@drrs-dirtyfb-ioctl@pipe-A-eDP-1

Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
---
 tests/intel/kms_dirtyfb.c | 67 +++++++++++++++++++++++++++------------
 1 file changed, 46 insertions(+), 21 deletions(-)

diff --git a/tests/intel/kms_dirtyfb.c b/tests/intel/kms_dirtyfb.c
index 151dceb93..a6424dd8f 100644
--- a/tests/intel/kms_dirtyfb.c
+++ b/tests/intel/kms_dirtyfb.c
@@ -20,15 +20,26 @@ IGT_TEST_DESCRIPTION("Test the DIRTYFB ioctl is working properly with "
  * TEST: kms dirtyfb
  * Category: Display
  * Description: Test DIRTYFB ioctl functionality.
+ * Driver requirement: i915, xe
+ * Functionality: dirtyfb
+ * Mega feature: General Display Features
+ * Test category: functionality test
  *
- * SUBTEST: dirtyfb-ioctl
+ * SUBTEST: default-dirtyfb-ioctl
  * Description: Test DIRTYFB ioctl is working properly using GPU
  *              frontbuffer rendering with features like FBC, PSR
  *              and DRRS.
- * Driver requirement: i915, xe
- * Functionality: dirtyfb, fbc, psr, drrs
- * Mega feature: General Display Features
- * Test category: functionality test
+ *
+ * SUBTEST: %s-dirtyfb-ioctl
+ * Description: Test DIRTYFB ioctl is working properly using GPU
+ *              frontbuffer rendering with %arg[1] feature.
+ * Functionality: dirtyfb, %arg[1]
+ *
+ * arg[1]:
+ *
+ * @drrs:    drrs
+ * @fbc:     fbc
+ * @psr:     psr1
  */
 
 #ifndef PAGE_ALIGN
@@ -161,10 +172,6 @@ static void prepare(data_t *data)
 {
 	igt_plane_t *primary;
 
-	igt_skip_on(!check_support(data));
-
-	igt_display_reset(&data->display);
-
 	data->mode = igt_output_get_mode(data->output);
 
 	igt_output_set_pipe(data->output, data->pipe);
@@ -299,19 +306,37 @@ igt_main
 		igt_display_reset(&data.display);
 	}
 
-	igt_describe("Test dirtyFB ioctl");
-	igt_subtest_with_dynamic("dirtyfb-ioctl") {
-		data.pipe = PIPE_A;
-		for_each_valid_output_on_pipe(&data.display, data.pipe,
-					      data.output) {
-			for (data.feature = FEATURE_DEFAULT; data.feature > 0;
-			     data.feature = data.feature >> 1) {
-				igt_dynamic_f("%s-%s", feature_str(data.feature),
-					      igt_output_name(data.output)) {
-					prepare(&data);
-					run_test(&data);
-					cleanup(&data);
+	for (data.feature = FEATURE_DEFAULT; data.feature > 0;
+	     data.feature = data.feature >> 1) {
+		igt_describe_f("Test dirtyFB ioctl with %s", feature_str(data.feature));
+		igt_subtest_with_dynamic_f("%s-dirtyfb-ioctl", feature_str(data.feature)) {
+			for_each_pipe(&data.display, data.pipe) {
+				int valid_tests = 0;
+
+				for_each_valid_output_on_pipe(&data.display,
+							      data.pipe,
+							      data.output) {
+					if (!check_support(&data))
+						continue;
+
+					igt_display_reset(&data.display);
+					igt_output_set_pipe(data.output, data.pipe);
+					if (!intel_pipe_output_combo_valid(&data.display))
+						continue;
+
+					valid_tests++;
+					igt_dynamic_f("%s-%s",
+						      kmstest_pipe_name(data.pipe),
+						      igt_output_name(data.output)) {
+						prepare(&data);
+						run_test(&data);
+						cleanup(&data);
+					}
 				}
+
+				/* One pipe is enough. */
+				if (valid_tests)
+					break;
 			}
 		}
 	}
-- 
2.40.0

  parent reply	other threads:[~2023-11-15 13:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15 13:02 [igt-dev] [i-g-t V2 0/4] Fix the usage of Rendercopy in KMS tests Bhanuprakash Modem
2023-11-15 13:02 ` [igt-dev] [i-g-t V2 1/4] tests/intel/kms_fbt: Use blitter as a default draw method Bhanuprakash Modem
2023-11-15 13:31   ` Juha-Pekka Heikkila
2023-11-15 13:02 ` [igt-dev] [i-g-t V2 2/4] tests/intel/kms_fbt: Fill fb region with requested " Bhanuprakash Modem
2023-11-15 13:30   ` Juha-Pekka Heikkila
2023-11-15 13:02 ` [igt-dev] [i-g-t V2 3/4] tests/intel/kms_dirtyfb: Use blitter if rendercopy isn't present Bhanuprakash Modem
2023-11-15 13:02 ` Bhanuprakash Modem [this message]
2023-11-15 16:05 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix the usage of Rendercopy in KMS tests (rev2) Patchwork
2023-11-15 16:08 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-11-17  3:10 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=20231115130237.1522518-5-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