Thread (30 messages) 30 messages, 3 authors, 2026-03-05

[PATCH i-g-t 06/17] tests/kms: Clean up crtc->pipe comparions

From: Ville Syrjala <hidden>
Date: 2026-02-27 08:07:24
Subsystem: the rest · Maintainer: Linus Torvalds

From: Ville Syrjälä <redacted>

Change a few leftover crtc->pipe comparisons to
just compare the crtc pointers instead.

 #include "scripts/iterators.cocci"

@@
typedef igt_crtc_t;
igt_crtc_t *CRTC1;
igt_crtc_t *CRTC2;
binary operator OP = { ==, != };
@@
- CRTC1->pipe OP CRTC2->pipe
+ CRTC1 OP CRTC2

Signed-off-by: Ville Syrjälä <redacted>
---
 tests/kms_display_modes.c  | 2 +-
 tests/kms_plane_multiple.c | 2 +-
 tests/kms_tiled_display.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/kms_display_modes.c b/tests/kms_display_modes.c
index 6c17f002d8c8..18582cf1500c 100644
--- a/tests/kms_display_modes.c
+++ b/tests/kms_display_modes.c
@@ -201,7 +201,7 @@ static void run_extendedmode_test(data_t *data) {
 					      output1) {
 
 			for_each_crtc(display, crtc2) {
-				if (crtc->pipe == crtc2->pipe)
+				if (crtc == crtc2)
 					continue;
 
 				for_each_valid_output_on_crtc_local(display, crtc2,
diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index 660283df751d..d8a32d9526ad 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -548,7 +548,7 @@ static void run_2_display_test(data_t *data, uint64_t modifier, const char *name
 					      crtc,
 					      output1) {
 			for_each_crtc(display, crtc2) {
-				if (crtc->pipe == crtc2->pipe)
+				if (crtc == crtc2)
 					continue;
 
 				for_each_valid_output_on_crtc_local(display, crtc2,
diff --git a/tests/kms_tiled_display.c b/tests/kms_tiled_display.c
index 8aae2bcaadba..95e45ed416d1 100644
--- a/tests/kms_tiled_display.c
+++ b/tests/kms_tiled_display.c
@@ -237,7 +237,7 @@ static void setup_mode(data_t *data)
 
 			if (count > 0) {
 				for (prev = count - 1; prev >= 0; prev--) {
-					if (crtc->pipe == conns[prev].crtc->pipe) {
+					if (crtc == conns[prev].crtc) {
 						pipe_in_use = true;
 						break;
 					}
-- 
2.52.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help