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

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

The test tracks CRTC ids in an array for picking random CRTCs. This does
not depend on pipes in any way. Switch to using CRTC indexes instead.

The test could be refactored to use igt_random_crtc(), but leave that
for another time, and do the minimal fix now.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
tests/kms_cursor_legacy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 2d74c7cac8ba..5399ef4819fa 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -288,7 +288,7 @@ static void stress(igt_display_t *display,
if (!crtc) {
num_crtcs = igt_display_n_crtcs(display);
for_each_crtc(display, crtc) {
- arg.crtc_id = crtc_id[crtc->pipe] = crtc->crtc_id;
+ arg.crtc_id = crtc_id[crtc->crtc_index] = crtc->crtc_id;
do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg);
}
} else {
--
2.47.3