public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Nidhi Gupta <nidhi1.gupta@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Nidhi Gupta <nidhi1.gupta@intel.com>
Subject: [igt-dev] [PATCH v3 4/7] tests/kms_plane_alpha_blend: Restrict the execution to 2 pipes and planes
Date: Tue, 31 Jan 2023 19:06:55 +0530	[thread overview]
Message-ID: <20230131133658.21970-5-nidhi1.gupta@intel.com> (raw)
In-Reply-To: <20230131133658.21970-1-nidhi1.gupta@intel.com>

Restrict the execution of the subtests to two pipes and
two planes on simulation to reduce the execution time.

Signed-off-by: Bhanuprakash ModemSigned-off-by: Bhanuprakash ModemSigned-off-by: Bhanuprakash Modem
Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
---
 tests/kms_plane_alpha_blend.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
index 38272ccb..1f89aa6f 100644
--- a/tests/kms_plane_alpha_blend.c
+++ b/tests/kms_plane_alpha_blend.c
@@ -482,8 +482,10 @@ static void run_test_on_pipe_planes(data_t *data, enum pipe pipe, igt_output_t *
 {
 	igt_display_t *display = &data->display;
 	igt_plane_t *plane;
+	int first_plane = -1;
+	int last_plane = -1;
 
-	for_each_plane_on_pipe(display, pipe, plane) {
+	for_each_plane_on_pipe(&data->display, pipe, plane) {
 		if (!igt_plane_has_prop(plane, IGT_PLANE_ALPHA))
 			continue;
 
@@ -496,6 +498,19 @@ static void run_test_on_pipe_planes(data_t *data, enum pipe pipe, igt_output_t *
 		if (must_multiply && !has_multiplied_alpha(data, plane))
 			continue;
 
+		if (first_plane < 0)
+			first_plane = j__;
+
+		last_plane = j__;
+	}
+
+        for_each_plane_on_pipe(&data->display, pipe, plane) {
+		if (j__ != first_plane && j__ != last_plane)
+                        continue;
+
+		/* reset plane alpha properties between each plane */
+		reset_alpha(display, pipe);
+
 		igt_info("Testing plane %u\n", plane->index);
 		test(data, pipe, plane);
 		igt_plane_set_fb(plane, NULL);
@@ -615,6 +630,7 @@ static void run_subtests(data_t *data)
 {
 	igt_output_t *output;
 	enum pipe pipe;
+	int count = 0;
 
 	for (int i = 0; i < ARRAY_SIZE(subtests); i++) {
 		igt_describe_f("%s\n", subtests[i].desc);
@@ -628,6 +644,9 @@ static void run_subtests(data_t *data)
 				igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name)
 					run_test_on_pipe_planes(data, pipe, output, subtests[i].blend,
 								subtests[i].must_multiply, subtests[i].test);
+				count++;
+				if (count == 3 && igt_run_in_simulation())
+					break;
 			}
 		}
 	}
-- 
2.39.0

  parent reply	other threads:[~2023-01-31 13:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 13:36 [igt-dev] [PATCH v3 0/7] Limit the execution to few pipes/planes Nidhi Gupta
2023-01-31 13:36 ` [igt-dev] [PATCH v3 1/7] tests/i915/kms_draw_crc: Ignore RGB565 & XRGB2101010 formats on simulation Nidhi Gupta
2023-01-31 13:36 ` [igt-dev] [PATCH v3 2/7] tests/kms_async_flips: Limit the execution to single pipe Nidhi Gupta
2023-01-31 13:36 ` [igt-dev] [PATCH v3 3/7] tests/kms_pipe_crc_basic: Limit the execution to two pipes Nidhi Gupta
2023-02-06  4:40   ` Nautiyal, Ankit K
2023-02-06  5:25     ` Modem, Bhanuprakash
2023-01-31 13:36 ` Nidhi Gupta [this message]
2023-01-31 13:36 ` [igt-dev] [PATCH v3 5/7] tests/kms_plane_cursor: " Nidhi Gupta
2023-01-31 13:36 ` [igt-dev] [PATCH v3 6/7] tests/kms_plane_scaling: Limit the execution to two pipes/planes Nidhi Gupta
2023-01-31 13:36 ` [igt-dev] [PATCH v3 7/7] tests/i915/kms_frontbuffer_tracking: Reduce the execution time on simulation Nidhi Gupta
2023-01-31 14:24 ` [igt-dev] ✓ Fi.CI.BAT: success for Limit the execution to few pipes/planes Patchwork
2023-01-31 19:15 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20230131133658.21970-5-nidhi1.gupta@intel.com \
    --to=nidhi1.gupta@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