public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t 2/3] tests/kms: Nuke local copies of for_each_valid_output_on_crtc()
Date: Mon, 13 Apr 2026 23:00:20 +0300	[thread overview]
Message-ID: <20260413200021.29485-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20260413200021.29485-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

A few tests need to nest two for_each_valid_output_on_crtc() loops.
Now that the local iterator variable is removed from for_each_output()
we can just nest the real thing without problems.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tests/kms_display_modes.c  | 12 +-----------
 tests/kms_plane_multiple.c | 12 +-----------
 2 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/tests/kms_display_modes.c b/tests/kms_display_modes.c
index 18582cf1500c..76e73152a2ab 100644
--- a/tests/kms_display_modes.c
+++ b/tests/kms_display_modes.c
@@ -177,15 +177,6 @@ static void run_extendedmode_basic(data_t *data, igt_crtc_t *crtc1,
 	igt_assert_crc_equal(&crc[1], &ref_crc[1]);
 }
 
-#define for_each_connected_output_local(display, output)		\
-	for (int j__ = 0;  assert(igt_can_fail()), j__ < (display)->n_outputs; j__++)	\
-		for_each_if ((((output) = &(display)->outputs[j__]), \
-			      igt_output_is_connected((output))))
-
-#define for_each_valid_output_on_crtc_local(display, crtc, output) \
-	for_each_connected_output_local((display), (output)) \
-		for_each_if (igt_crtc_connector_valid((crtc), (output)))
-
 static void run_extendedmode_test(data_t *data) {
 	igt_crtc_t *crtc2;
 	igt_crtc_t *crtc;
@@ -204,8 +195,7 @@ static void run_extendedmode_test(data_t *data) {
 				if (crtc == crtc2)
 					continue;
 
-				for_each_valid_output_on_crtc_local(display, crtc2,
-								    output2) {
+				for_each_valid_output_on_crtc(display, crtc2, output2) {
 					if (output1 == output2)
 						continue;
 
diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index d8a32d9526ad..55cee260d01f 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -522,15 +522,6 @@ static void test_plane_position_2_display(data_t *data, igt_crtc_t *crtc1,
 	igt_assert_crc_equal(&data->ref_crc2, &crc2);
 }
 
-#define for_each_connected_output_local(display, output)		\
-	for (int j__ = 0;  assert(igt_can_fail()), j__ < (display)->n_outputs; j__++)	\
-		for_each_if((((output) = &(display)->outputs[j__]), \
-			      igt_output_is_connected((output))))
-
-#define for_each_valid_output_on_crtc_local(display, crtc, output) \
-	for_each_connected_output_local((display), (output)) \
-		for_each_if(igt_crtc_connector_valid((crtc), (output)))
-
 static void run_2_display_test(data_t *data, uint64_t modifier, const char *name)
 {
 	igt_crtc_t *crtc2;
@@ -551,8 +542,7 @@ static void run_2_display_test(data_t *data, uint64_t modifier, const char *name
 				if (crtc == crtc2)
 					continue;
 
-				for_each_valid_output_on_crtc_local(display, crtc2,
-								    output2) {
+				for_each_valid_output_on_crtc(display, crtc2, output2) {
 					if (output1 == output2)
 						continue;
 
-- 
2.52.0


  parent reply	other threads:[~2026-04-13 20:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-13 20:00 [PATCH i-g-t 0/3] tests/kms: Nuke local iterator macros Ville Syrjala
2026-04-13 20:00 ` [PATCH i-g-t 1/3] lib/kms: Avoid local iterator variable in for_each_output() Ville Syrjala
2026-04-13 20:00 ` Ville Syrjala [this message]
2026-04-13 20:00 ` [PATCH i-g-t 3/3] tests/kms: Use for_each_crtc_with_valid_output() Ville Syrjala
2026-04-14  1:24 ` ✗ i915.CI.BAT: failure for tests/kms: Nuke local iterator macros Patchwork
2026-04-14  1:37 ` ✓ Xe.CI.BAT: success " Patchwork
2026-04-14  4:38 ` ✓ Xe.CI.FULL: " Patchwork
2026-04-14  7:00 ` [PATCH i-g-t 0/3] " Jani Nikula
2026-04-15 16:41 ` ✓ Xe.CI.BAT: success for tests/kms: Nuke local iterator macros (rev2) Patchwork
2026-04-15 17:02 ` ✓ i915.CI.BAT: " Patchwork
2026-04-15 18:23 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-15 23:07 ` ✗ i915.CI.Full: " 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=20260413200021.29485-3-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.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