From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t 07/17] tests/intel/kms_dsc*: Use igt_crtc_t instead of enum pipe
Date: Wed, 11 Feb 2026 18:33:54 +0200 [thread overview]
Message-ID: <20260211163404.2018-8-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 tests/intel/kms_dsc*.
The data.pipe thing complicates this one, so it was mostly done
by hand. Mainly I wanted to get the tests/intel/kms_dsc_helper.c
part out of the way.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tests/intel/kms_dsc.c | 15 +++++++--------
tests/intel/kms_dsc_helper.c | 8 +++++---
tests/intel/kms_dsc_helper.h | 3 ++-
3 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/tests/intel/kms_dsc.c b/tests/intel/kms_dsc.c
index ab9793f5168a..f832500b7eeb 100644
--- a/tests/intel/kms_dsc.c
+++ b/tests/intel/kms_dsc.c
@@ -79,7 +79,7 @@ typedef struct {
igt_output_t *output;
int input_bpc;
int disp_ver;
- enum pipe pipe;
+ igt_crtc_t *crtc;
bool limited;
} data_t;
@@ -164,8 +164,7 @@ static void update_display(data_t *data, uint32_t test_type)
force_dsc_fractional_bpp_enable(data->drm_fd, data->output);
}
- igt_output_set_crtc(output,
- igt_crtc_for_pipe(display, data->pipe));
+ igt_output_set_crtc(output, data->crtc);
primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
igt_skip_on(!igt_plane_has_format_mod(primary, data->plane_format,
@@ -227,7 +226,7 @@ static void update_display(data_t *data, uint32_t test_type)
restore_force_dsc_fractional_bpp_en();
if (test_type & TEST_DSC_BPC) {
- current_bpc = igt_get_pipe_current_bpc(data->drm_fd, data->pipe);
+ current_bpc = igt_get_pipe_current_bpc(data->drm_fd, data->crtc->pipe);
igt_skip_on_f(data->input_bpc != current_bpc,
"Input bpc = %d is not equal to current bpc = %d\n",
data->input_bpc, current_bpc);
@@ -236,7 +235,7 @@ static void update_display(data_t *data, uint32_t test_type)
igt_assert_f(enabled,
"Default DSC enable failed on connector: %s pipe: %s\n",
output->name,
- kmstest_pipe_name(data->pipe));
+ igt_crtc_name(data->crtc));
reset:
test_reset(data);
@@ -265,10 +264,10 @@ static void test_dsc(data_t *data, uint32_t test_type, int bpc,
data->plane_format = plane_format;
data->input_bpc = bpc;
data->output = output;
- data->pipe = crtc->pipe;
+ data->crtc = crtc;
if (!is_dsc_supported_by_sink(data->drm_fd, data->output) ||
- !check_gen11_dp_constraint(data->drm_fd, data->output, data->pipe))
+ !check_gen11_dp_constraint(data->drm_fd, data->output, data->crtc))
continue;
if (igt_get_output_max_bpc(data->drm_fd, output->name) < MIN_DSC_BPC) {
@@ -293,7 +292,7 @@ static void test_dsc(data_t *data, uint32_t test_type, int bpc,
if (test_type & TEST_DSC_BPC)
snprintf(&name[2][0], LEN, "-%dbpc", data->input_bpc);
- igt_dynamic_f("pipe-%s-%s%s%s%s", kmstest_pipe_name(data->pipe), data->output->name,
+ igt_dynamic_f("pipe-%s-%s%s%s%s", igt_crtc_name(data->crtc), data->output->name,
&name[0][0], &name[1][0], &name[2][0])
update_display(data, test_type);
diff --git a/tests/intel/kms_dsc_helper.c b/tests/intel/kms_dsc_helper.c
index cea4304e48d3..77165b41f4bc 100644
--- a/tests/intel/kms_dsc_helper.c
+++ b/tests/intel/kms_dsc_helper.c
@@ -84,14 +84,16 @@ bool is_dsc_supported_by_sink(int drmfd, igt_output_t *output)
return true;
}
-bool check_gen11_dp_constraint(int drmfd, igt_output_t *output, enum pipe pipe)
+bool check_gen11_dp_constraint(int drmfd, igt_output_t *output,
+ igt_crtc_t *crtc)
{
uint32_t devid = intel_get_drm_devid(drmfd);
drmModeConnector *connector = output->config.connector;
if ((connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) &&
- (pipe == PIPE_A) && IS_GEN11(devid)) {
- igt_info("DSC not supported on pipe %s on %s in gen11 platforms\n", kmstest_pipe_name(pipe), output->name);
+ (crtc->pipe == PIPE_A) && IS_GEN11(devid)) {
+ igt_info("DSC not supported on pipe %s on %s in gen11 platforms\n",
+ kmstest_pipe_name(crtc->pipe), output->name);
return false;
}
diff --git a/tests/intel/kms_dsc_helper.h b/tests/intel/kms_dsc_helper.h
index 4dbd88fe7b95..ee419c849836 100644
--- a/tests/intel/kms_dsc_helper.h
+++ b/tests/intel/kms_dsc_helper.h
@@ -28,7 +28,8 @@ void restore_force_dsc_en(void);
void kms_dsc_exit_handler(int sig);
bool is_dsc_supported_by_sink(int drmfd, igt_output_t *output);
bool is_dsc_supported_by_source(int drmfd);
-bool check_gen11_dp_constraint(int drmfd, igt_output_t *output, enum pipe pipe);
+bool check_gen11_dp_constraint(int drmfd, igt_output_t *output,
+ igt_crtc_t *crtc);
bool check_gen11_bpc_constraint(int drmfd, int input_bpc);
void force_dsc_output_format(int drmfd, igt_output_t *output,
enum dsc_output_format output_format);
--
2.52.0
next prev 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 ` [PATCH i-g-t 06/17] tests/intel/kms_psr2_su: Use igt_crtc_t instead of enum pipe Ville Syrjala
2026-02-11 16:33 ` Ville Syrjala [this message]
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-8-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