From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t 02/17] lib/kms: Replace igt_display_require_output_on_pipe() with igt_display_require_output_on_crtc()
Date: Fri, 27 Feb 2026 10:06:38 +0200 [thread overview]
Message-ID: <20260227080653.30389-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20260227080653.30389-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Replace the pipe based igt_display_require_output_on_pipe()
with igt_display_require_output_on_crtc().
#include "scripts/iterators.cocci"
@@
expression DISPLAY, PIPE;
@@
- igt_display_require_output_on_pipe(DISPLAY, PIPE)
+ igt_display_require_output_on_crtc(igt_crtc_for_pipe(DISPLAY, PIPE))
@@
igt_crtc_t *CRTC;
@@
- igt_crtc_for_pipe(..., CRTC->pipe)
+ CRTC
@@
type T;
@@
T igt_display_require_output_on_pipe(...);
+void igt_display_require_output_on_crtc(igt_crtc_t *crtc);
@@
@@
igt_display_require_output_on_pipe(...) { ... }
+/**
+ * igt_display_require_output_on_crtc:
+ * @crtc: CRTC
+ *
+ * Checks whether there's a valid @crtc/@output combination for the given @crtc
+ */
+void igt_display_require_output_on_crtc(igt_crtc_t *crtc)
+{
+ if (!igt_crtc_has_valid_output(crtc))
+ igt_skip("No valid connector found on CRTC %s\n", igt_crtc_name(crtc));
+}
@@
@@
- igt_display_require_output_on_pipe(...) { ... }
@@
@@
- igt_pipe_has_valid_output(...) { ... }
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/igt_kms.c | 17 +++++++----------
lib/igt_kms.h | 2 +-
tests/intel/kms_ccs.c | 3 +--
tests/kms_plane_alpha_blend.c | 2 +-
tests/nouveau_crc.c | 3 +--
5 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 7454d16780f9..11ed109d74fb 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -3254,19 +3254,16 @@ void igt_display_require_output(igt_display_t *display)
}
/**
- * igt_display_require_output_on_pipe:
- * @display: A pointer to an #igt_display_t structure
- * @pipe: Display pipe
+ * igt_display_require_output_on_crtc:
+ * @crtc: CRTC
*
- * Checks whether there's a valid @pipe/@output combination for the given @display and @pipe
- * Skips test if a valid @pipe is not found
+ * Checks whether there's a valid @crtc/@output combination for the given @crtc
*/
-void igt_display_require_output_on_pipe(igt_display_t *display, enum pipe pipe)
+void igt_display_require_output_on_crtc(igt_crtc_t *crtc)
{
- igt_require_pipe(display, pipe);
-
- if (!igt_crtc_has_valid_output(igt_crtc_for_pipe(display, pipe)))
- igt_skip("No valid connector found on pipe %s\n", kmstest_pipe_name(pipe));
+ if (!igt_crtc_has_valid_output(crtc))
+ igt_skip("No valid connector found on CRTC %s\n",
+ igt_crtc_name(crtc));
}
/**
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 1e1f3ead5c99..c79c8664e9a9 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -570,7 +570,7 @@ void igt_display_commit_atomic(igt_display_t *display, uint32_t flags, void *use
int igt_display_try_commit2(igt_display_t *display, enum igt_commit_style s);
int igt_display_drop_events(igt_display_t *display);
void igt_display_require_output(igt_display_t *display);
-void igt_display_require_output_on_pipe(igt_display_t *display, enum pipe pipe);
+void igt_display_require_output_on_crtc(igt_crtc_t *crtc);
int igt_display_n_crtcs(igt_display_t *display);
const char *igt_crtc_name(igt_crtc_t *crtc);
diff --git a/tests/intel/kms_ccs.c b/tests/intel/kms_ccs.c
index 2b570af355fc..4d0bda6a78f7 100644
--- a/tests/intel/kms_ccs.c
+++ b/tests/intel/kms_ccs.c
@@ -1171,8 +1171,7 @@ static void test_output(data_t *data, const int testnum)
igt_info("Testing with seed %d\n", data->seed);
if (data->flags & TEST_ALL_PLANES) {
- igt_display_require_output_on_pipe(&data->display,
- crtc->pipe);
+ igt_display_require_output_on_crtc(crtc);
for_each_plane_on_crtc(crtc,
data->plane) {
diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
index 41a3b71c3861..8b16a35ea70c 100644
--- a/tests/kms_plane_alpha_blend.c
+++ b/tests/kms_plane_alpha_blend.c
@@ -659,7 +659,7 @@ static bool pipe_check(data_t *data, igt_crtc_t *crtc,
igt_plane_t *plane;
bool plane_alpha = false, plane_blend = false, multiply = false;
- igt_display_require_output_on_pipe(display, crtc->pipe);
+ igt_display_require_output_on_crtc(crtc);
for_each_plane_on_crtc(crtc, plane) {
if (!igt_plane_has_prop(plane, IGT_PLANE_ALPHA))
continue;
diff --git a/tests/nouveau_crc.c b/tests/nouveau_crc.c
index 3137884dcfc6..98394674e463 100644
--- a/tests/nouveau_crc.c
+++ b/tests/nouveau_crc.c
@@ -340,8 +340,7 @@ int igt_main()
int dir;
data.crtc = igt_crtc_for_pipe(&data.display, pipe);
- igt_display_require_output_on_pipe(&data.display,
- data.crtc->pipe);
+ igt_display_require_output_on_crtc(data.crtc);
/* Disable the output from the previous iteration of pipe tests, if there is
* one
--
2.52.0
next prev parent reply other threads:[~2026-02-27 8:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 8:06 [PATCH i-g-t 00/17] lib/kms: Finish the igt_crtc_t API refactoring Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 01/17] lib/kms: Replace igt_pipe_has_valid_output() with igt_crtc_has_valid_output() Ville Syrjala
2026-02-27 10:42 ` Jani Nikula
2026-02-27 8:06 ` Ville Syrjala [this message]
2026-02-27 10:50 ` [PATCH i-g-t 02/17] lib/kms: Replace igt_display_require_output_on_pipe() with igt_display_require_output_on_crtc() Jani Nikula
2026-02-27 8:06 ` [PATCH i-g-t 03/17] lib/kms: Replace igt_get_single_output_for_pipe() with igt_get_single_output_for_crtc() Ville Syrjala
2026-02-27 10:22 ` Jani Nikula
2026-02-27 8:06 ` [PATCH i-g-t 04/17] lib/kms: Make the igt_*_bpc_*() interfaces more abstract Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 05/17] tests/kms: Use igt_crtc_name() Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 06/17] tests/kms: Clean up crtc->pipe comparions Ville Syrjala
2026-02-27 10:51 ` Jani Nikula
2026-02-27 8:06 ` [PATCH i-g-t 07/17] tests/vmwgfx/vmw_prime: Replace igt_pipe_crc_new() with igt_crtc_crc_new() Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 08/17] lib/kms: Prefer "crtc" over "pipe" in function names Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 09/17] tests/kms_color*: " Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 10/17] tests/kms: " Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 11/17] tests/kms_tiled_display: Remove mention of PIPE_NONE Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 12/17] tests/kms: Remove hand rolled get_vblank() stuff Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 13/17] lib/kms: Fix kmstest_get_vblank() docs Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 14/17] tests/kms: Pass crtc_index to kmstest_get_vbl_flag() Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 15/17] tests/kms: Pass crtc_index to kmstest_get_vblank() Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 16/17] lib/kms: Introduce igt_crtc_get_vbl_flag() Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 17/17] lib/kms: Introduce igt_crtc_get_vblank() Ville Syrjala
2026-02-27 10:55 ` [PATCH i-g-t 00/17] lib/kms: Finish the igt_crtc_t API refactoring Jani Nikula
2026-02-27 14:14 ` ✗ i915.CI.BAT: failure for " Patchwork
2026-02-27 14:24 ` ✓ Xe.CI.BAT: success " Patchwork
2026-02-27 23:28 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-04 5:58 ` ✓ Xe.CI.BAT: success for lib/kms: Finish the igt_crtc_t API refactoring (rev2) Patchwork
2026-03-04 6:19 ` ✓ i915.CI.BAT: " Patchwork
2026-03-05 5:01 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-05 8:15 ` ✗ 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=20260227080653.30389-3-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