From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t 06/19] tests/kms: Use igt_first_crtc_with_single_output()
Date: Wed, 25 Feb 2026 14:50:55 +0200 [thread overview]
Message-ID: <20260225125108.31119-7-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20260225125108.31119-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
A few kms tests (at least) don't really care what CRTC they run
on, as long as it's something with an output.
Replace the fixed 'igt_crtc_for_pipe(display, PIPE_A) +
igt_get_single_output_for_pipe()' combo (which may very well
fail) with igt_first_crtc_with_single_output() that will give
you something as long there's one valid CRTC+output combo
available.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tests/intel/gem_exec_reloc.c | 6 ++----
tests/kms_plane.c | 6 +++---
tests/kms_plane_scaling.c | 9 +++------
3 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/tests/intel/gem_exec_reloc.c b/tests/intel/gem_exec_reloc.c
index 53d8a1e9aa7e..ed4e77ec93d3 100644
--- a/tests/intel/gem_exec_reloc.c
+++ b/tests/intel/gem_exec_reloc.c
@@ -1516,10 +1516,8 @@ static void scanout(int i915,
igt_display_reset(dpy);
- crtc = igt_crtc_for_pipe(dpy, PIPE_A);
-
- output = igt_get_single_output_for_pipe(dpy, crtc->pipe);
- igt_require(output);
+ crtc = igt_first_crtc_with_single_output(dpy, &output);
+ igt_require(crtc);
igt_output_set_crtc(output, crtc);
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 8cef94a1f37e..30655b75c7ea 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -1341,7 +1341,7 @@ test_pixel_formats(data_t *data, igt_crtc_t *crtc)
static void test_planar_settings(data_t *data)
{
igt_display_t *display = &data->display;
- igt_crtc_t *crtc = igt_crtc_for_pipe(display, PIPE_A);
+ igt_crtc_t *crtc;
igt_output_t *output;
igt_fb_t fb, fb_ref;
igt_plane_t *primary;
@@ -1363,8 +1363,8 @@ static void test_planar_settings(data_t *data)
igt_require(display_ver >= 9);
}
- output = igt_get_single_output_for_pipe(&data->display, crtc->pipe);
- igt_require(output);
+ crtc = igt_first_crtc_with_single_output(display, &output);
+ igt_require(crtc);
igt_output_set_crtc(output, crtc);
primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 893f2830b446..1d91ad1493b1 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -1181,13 +1181,10 @@ static void invalid_parameter_tests(data_t *d)
};
igt_fixture() {
- crtc = igt_crtc_for_pipe(display, PIPE_A);
- output = igt_get_single_output_for_pipe(&d->display,
- crtc->pipe);
- igt_require(output);
+ crtc = igt_first_crtc_with_single_output(display, &output);
+ igt_require(crtc);
- igt_output_set_crtc(output,
- crtc);
+ igt_output_set_crtc(output, crtc);
plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
igt_require(get_num_scalers(&d->display, crtc->pipe) >= 1);
--
2.52.0
next prev parent reply other threads:[~2026-02-25 12:51 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 12:50 [PATCH i-g-t 00/19] lib/kms: Clean up more of igt_kms API Ville Syrjala
2026-02-25 12:50 ` [PATCH i-g-t 01/19] tests/kms_plane_multiple: Clean up n_planes stuff Ville Syrjala
2026-02-25 12:50 ` [PATCH i-g-t 02/19] tests/kms_async_flips: Remove redundant data.crtc_id Ville Syrjala
2026-02-25 13:58 ` Jani Nikula
2026-02-25 12:50 ` [PATCH i-g-t 03/19] tests/kms_lease: Consolidate igt_crtc_for_pipe() calls Ville Syrjala
2026-02-25 12:50 ` [PATCH i-g-t 04/19] tests/kms: " Ville Syrjala
2026-02-25 12:50 ` [PATCH i-g-t 05/19] lib/kms: Introduce igt_first_crtc_with_single_output() Ville Syrjala
2026-02-25 13:59 ` Jani Nikula
2026-02-25 12:50 ` Ville Syrjala [this message]
2026-02-25 12:50 ` [PATCH i-g-t 07/19] lib/kms: Introduce and use igt_first_crtc() Ville Syrjala
2026-02-25 14:00 ` Jani Nikula
2026-02-25 12:50 ` [PATCH i-g-t 08/19] tests/kms: Stop using igt_require_pipe() Ville Syrjala
2026-02-25 12:50 ` [PATCH i-g-t 09/19] lib/kms: Replace get_num_scalers() with igt_crtc_num_scalers() Ville Syrjala
2026-02-25 12:50 ` [PATCH i-g-t 10/19] lib/kms: Pass igt_crtc_t* to igt_max_bpc_constraint() Ville Syrjala
2026-02-25 12:51 ` [PATCH i-g-t 11/19] lib/kms: Introduce for_each_plane_on_crtc() Ville Syrjala
2026-02-25 12:51 ` [PATCH i-g-t 12/19] tests/kms: Use for_each_plane_on_crtc() Ville Syrjala
2026-02-25 13:53 ` Jani Nikula
2026-02-25 12:51 ` [PATCH i-g-t 13/19] lib/kms: Nuke for_each_plane_on_pipe() Ville Syrjala
2026-02-25 12:51 ` [PATCH i-g-t 14/19] tests/kms: Switch to for_each_valid_output_on_crtc_local() Ville Syrjala
2026-02-25 12:51 ` [PATCH i-g-t 15/19] tests/kms: Replace igt_pipe_connector_valid() with igt_crtc_connector_valid() Ville Syrjala
2026-02-25 12:51 ` [PATCH i-g-t 16/19] lib/kms: Intreoduce for_each_valid_output_on_crtc() Ville Syrjala
2026-02-25 12:51 ` [PATCH i-g-t 17/19] tests/intel/kms_frontbuffer_tracking: Use for_each_valid_output_on_crtc() Ville Syrjala
2026-02-25 12:51 ` [PATCH i-g-t 18/19] tests/kms: " Ville Syrjala
2026-02-25 12:51 ` [PATCH i-g-t 19/19] lib/kms: Nuke for_each_valid_output_on_pipe() Ville Syrjala
2026-02-25 14:06 ` Jani Nikula
2026-02-25 14:07 ` [PATCH i-g-t 00/19] lib/kms: Clean up more of igt_kms API Jani Nikula
2026-02-25 23:34 ` ✗ Xe.CI.BAT: failure for " Patchwork
2026-02-26 0:05 ` ✓ i915.CI.BAT: success " Patchwork
2026-02-26 1:57 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-02-26 22:06 ` ✓ Xe.CI.BAT: success for lib/kms: Clean up more of igt_kms API (rev2) Patchwork
2026-02-26 22:09 ` ✓ i915.CI.BAT: " Patchwork
2026-02-27 2:55 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-02-27 4:24 ` ✗ i915.CI.Full: " 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=20260225125108.31119-7-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox