public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel/kms_cdclk: use igt_next_crtc()
@ 2026-03-09 16:23 Jani Nikula
  2026-03-09 21:26 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Jani Nikula @ 2026-03-09 16:23 UTC (permalink / raw)
  To: igt-dev; +Cc: ville.syrjala, jani.nikula

The test doesn't care about pipes, but rather just another CRTC, so
prefer igt_next_crtc() over igt_crtc_for_pipe(). The i < count loop is
really just about count here, not about specific pipes.

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

diff --git a/tests/intel/kms_cdclk.c b/tests/intel/kms_cdclk.c
index 20b8a5f0a018..662bdbe439e5 100644
--- a/tests/intel/kms_cdclk.c
+++ b/tests/intel/kms_cdclk.c
@@ -240,10 +240,13 @@ static void set_mode(data_t *data, int count, drmModeModeInfo *mode,
 		     igt_output_t **valid_outputs, struct igt_fb fb)
 {
 	igt_display_t *display = &data->display;
+	igt_crtc_t *crtc = NULL;
 
 	for (int i = 0; i < count; i++) {
-		igt_crtc_t *crtc = igt_crtc_for_pipe(display, i);
-		igt_plane_t *plane = igt_crtc_get_plane_type(crtc, DRM_PLANE_TYPE_PRIMARY);
+		igt_plane_t *plane;
+
+		crtc = igt_next_crtc(display, crtc);
+		plane = igt_crtc_get_plane_type(crtc, DRM_PLANE_TYPE_PRIMARY);
 
 		igt_output_override_mode(valid_outputs[i], &mode[i]);
 
@@ -259,6 +262,7 @@ static void test_mode_transition_on_all_outputs(data_t *data)
 	drmModeModeInfo *mode, mode_highres[IGT_MAX_PIPES] = {0}, mode_lowres[IGT_MAX_PIPES] = {0};
 	igt_output_t *valid_outputs[IGT_MAX_PIPES] = {NULL};
 	igt_output_t *output;
+	igt_crtc_t *crtc = NULL;
 	int count = 0;
 	int cdclk_ref, cdclk_new;
 	uint16_t width = 0, height = 0;
@@ -288,7 +292,7 @@ static void test_mode_transition_on_all_outputs(data_t *data)
 		      "Number of valid outputs (%d) must be greater than or equal to 2\n", count);
 
 	for (int i = 0; i < count; i++) {
-		igt_crtc_t *crtc = igt_crtc_for_pipe(display, i);
+		crtc = igt_next_crtc(display, crtc);
 
 		mode = igt_output_get_mode(valid_outputs[i]);
 		igt_assert(mode);
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-03-20 17:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 16:23 [PATCH i-g-t] tests/intel/kms_cdclk: use igt_next_crtc() Jani Nikula
2026-03-09 21:26 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-03-09 21:30 ` ✗ i915.CI.BAT: failure " Patchwork
2026-03-10  1:46 ` ✗ Xe.CI.FULL: " Patchwork
2026-03-13 12:56 ` [PATCH i-g-t] " Kahola, Mika
2026-03-18 14:29 ` ✓ Xe.CI.BAT: success for tests/intel/kms_cdclk: use igt_next_crtc() (rev2) Patchwork
2026-03-18 14:58 ` ✗ i915.CI.BAT: failure " Patchwork
2026-03-19 11:07   ` Jani Nikula
2026-03-20  7:40     ` Ravali, JupallyX
2026-03-20  2:41 ` ✓ Xe.CI.FULL: success " Patchwork
2026-03-20  7:17 ` ✓ i915.CI.BAT: " Patchwork
2026-03-20 17:36 ` ✗ i915.CI.Full: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox