From: Jani Nikula <jani.nikula@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: ville.syrjala@linux.intel.com, jani.nikula@intel.com
Subject: [PATCH i-g-t] tests/intel/kms_cdclk: use igt_next_crtc()
Date: Mon, 9 Mar 2026 18:23:11 +0200 [thread overview]
Message-ID: <20260309162311.706849-1-jani.nikula@intel.com> (raw)
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
next reply other threads:[~2026-03-09 16:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 16:23 Jani Nikula [this message]
2026-03-09 21:26 ` ✓ Xe.CI.BAT: success for tests/intel/kms_cdclk: use igt_next_crtc() 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
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=20260309162311.706849-1-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.