public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t 06/17] tests/intel/kms_psr2_su: Use igt_crtc_t instead of enum pipe
Date: Wed, 11 Feb 2026 18:33:53 +0200	[thread overview]
Message-ID: <20260211163404.2018-7-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20260211163404.2018-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Convert the use of enum pipe to igt_crtc_t in
tests/intel/kms_psr2_su.

The pipes[] array (afterwards crtcs[]) complicates this
one sufficiently that the conversion was done by hand.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tests/intel/kms_psr2_su.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/tests/intel/kms_psr2_su.c b/tests/intel/kms_psr2_su.c
index f7652f165a2d..95bd4f605ff8 100644
--- a/tests/intel/kms_psr2_su.c
+++ b/tests/intel/kms_psr2_su.c
@@ -292,13 +292,12 @@ static void cleanup(data_t *data, igt_output_t *output)
 	igt_remove_fb(data->drm_fd, &data->fb[0]);
 }
 
-static int check_psr2_support(data_t *data, enum pipe pipe)
+static int check_psr2_support(data_t *data, igt_crtc_t *crtc)
 {
 	int status;
 
 	igt_output_t *output;
 	igt_display_t *display = &data->display;
-	igt_crtc_t *crtc = igt_crtc_for_pipe(display, pipe);
 
 	igt_display_reset(display);
 	output = data->output;
@@ -317,8 +316,8 @@ int igt_main()
 	igt_crtc_t *crtc;
 	int r, i;
 	igt_output_t *outputs[IGT_MAX_PIPES * IGT_MAX_PIPES];
-	int pipes[IGT_MAX_PIPES * IGT_MAX_PIPES];
-	int n_pipes = 0;
+	igt_crtc_t *crtcs[IGT_MAX_PIPES * IGT_MAX_PIPES];
+	int n_crtcs = 0;
 
 	igt_fixture() {
 		struct itimerspec interval;
@@ -357,10 +356,10 @@ int igt_main()
 
 		for_each_crtc_with_valid_output(&data.display, crtc,
 						data.output) {
-			if (check_psr2_support(&data, crtc->pipe)) {
-				pipes[n_pipes] = crtc->pipe;
-				outputs[n_pipes] = data.output;
-				n_pipes++;
+			if (check_psr2_support(&data, crtc)) {
+				crtcs[n_crtcs] = crtc;
+				outputs[n_crtcs] = data.output;
+				n_crtcs++;
 			}
 		}
 	}
@@ -372,11 +371,10 @@ int igt_main()
 			data.format = *format++;
 			igt_describe("Test that selective update works when screen changes");
 			igt_subtest_with_dynamic_f("%s-%s", op_str(data.op), igt_format_str(data.format)) {
-				for (i = 0; i < n_pipes; i++) {
-					igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipes[i]),
-							igt_output_name(outputs[i])) {
-						igt_output_set_crtc(outputs[i],
-								    igt_crtc_for_pipe(outputs[i]->display, pipes[i]));
+				for (i = 0; i < n_crtcs; i++) {
+					igt_dynamic_f("pipe-%s-%s", igt_crtc_name(crtcs[i]),
+						      igt_output_name(outputs[i])) {
+						igt_output_set_crtc(outputs[i], crtcs[i]);
 						if (data.op == FRONTBUFFER &&
 						    intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 12) {
 							/*
-- 
2.52.0


  parent reply	other threads:[~2026-02-11 16:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11 16:33 [PATCH i-g-t 00/17] tests/kms: Use igt_crtc_t instead of enum pipe Ville Syrjala
2026-02-11 16:33 ` [PATCH i-g-t 01/17] tests/kms_plane_alpha_blend: " Ville Syrjala
2026-02-11 16:33 ` [PATCH i-g-t 02/17] tests/kms: Remove unused 'pipe' function parameters Ville Syrjala
2026-02-11 16:33 ` [PATCH i-g-t 03/17] tests/kms: Remove const qualifier from " Ville Syrjala
2026-02-11 16:33 ` [PATCH i-g-t 04/17] tests/intel/kms_busy: Use 'enum pipe' instead of 'int' Ville Syrjala
2026-02-11 16:33 ` [PATCH i-g-t 05/17] tests/kms_atomic_interruptible: s/crtc/drm_crtc/ Ville Syrjala
2026-02-11 16:33 ` Ville Syrjala [this message]
2026-02-11 16:33 ` [PATCH i-g-t 07/17] tests/intel/kms_dsc*: Use igt_crtc_t instead of enum pipe Ville Syrjala
2026-02-11 16:33 ` [PATCH i-g-t 08/17] tests/kms_cursor_legacy: " Ville Syrjala
2026-02-11 16:33 ` [PATCH i-g-t 09/17] tests/kms_color*: " Ville Syrjala
2026-02-11 16:33 ` [PATCH i-g-t 10/17] tests/kms_atomic_transition: " Ville Syrjala
2026-02-11 16:33 ` [PATCH i-g-t 11/17] tests/kms_plane: " Ville Syrjala
2026-02-11 16:33 ` [PATCH i-g-t 12/17] tests/intel/kms_pipe_b_c_ivb: " Ville Syrjala
2026-02-11 16:34 ` [PATCH i-g-t 13/17] tests/kms_vrr: " Ville Syrjala
2026-02-11 16:34 ` [PATCH i-g-t 14/17] tests/kms_display_modes: " Ville Syrjala
2026-02-11 16:34 ` [PATCH i-g-t 15/17] tests/kms_rotation_crc: " Ville Syrjala
2026-02-11 16:34 ` [PATCH i-g-t 16/17] tests/kms_properties: " Ville Syrjala
2026-02-11 16:34 ` [PATCH i-g-t 17/17] tests/kms: " Ville Syrjala
2026-02-11 17:35 ` ✗ Xe.CI.BAT: failure for " Patchwork
2026-02-11 17:47 ` ✓ i915.CI.BAT: success " Patchwork
2026-02-12  6:18 ` ✗ i915.CI.Full: failure " Patchwork
2026-02-12  9:42 ` [PATCH i-g-t 00/17] " Jani Nikula
2026-02-13  2:09 ` ✗ Xe.CI.FULL: failure for " 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=20260211163404.2018-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