[PATCH i-g-t 05/10] tests/kms_cursor_edge_walk: use CRTC indexes instead of pipes for CRTC tracking

Jani Nikula
2026-03-09T14:22:18Z

The test tracks "active" CRTCs in a dedicated array. This does not
depend on pipes in any way. Switch to using CRTC indexes instead.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
tests/kms_cursor_edge_walk.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/kms_cursor_edge_walk.c b/tests/kms_cursor_edge_walk.c
index 08c9de601ce3..8036d43d5eef 100644
--- a/tests/kms_cursor_edge_walk.c
+++ b/tests/kms_cursor_edge_walk.c
@@ -87,8 +87,8 @@ enum {
};

static bool extended;
-static enum pipe active_pipes[IGT_MAX_PIPES];
-static uint32_t last_pipe;
+static int active_crtcs[IGT_MAX_PIPES];
+static uint32_t last_crtc_index;

static void create_cursor_fb(data_t *data, int cur_w, int cur_h)
{
@@ -377,10 +377,10 @@ int igt_main_args("", long_opts, help_str, opt_handler, &data)
kmstest_set_vt_graphics_mode();

/* Get active pipes. */
- last_pipe = 0;
+ last_crtc_index = 0;
for_each_crtc(&data.display, crtc)
- active_pipes[last_pipe++] = crtc->pipe;
- last_pipe--;
+ active_crtcs[last_crtc_index++] = crtc->crtc_index;
+ last_crtc_index--;
}

for (i = 0; i < ARRAY_SIZE(tests); i++) {
@@ -397,8 +397,8 @@ int igt_main_args("", long_opts, help_str, opt_handler, &data)
crtc,
data.output) {
data.crtc = crtc;
- if (!extended && crtc->pipe != active_pipes[0] &&
- crtc->pipe != active_pipes[last_pipe])
+ if (!extended && crtc->crtc_index != active_crtcs[0] &&
+ crtc->crtc_index != active_crtcs[last_crtc_index])
continue;

igt_display_reset(&data.display);
--
2.47.3