From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Swati Sharma <swati2.sharma@intel.com>
Subject: [PATCH i-g-t] tests/intel/kms_dsc: Sort modes by clock to pick highest bandwidth mode
Date: Thu, 14 May 2026 01:42:24 +0530 [thread overview]
Message-ID: <20260513201224.2421654-1-swati2.sharma@intel.com> (raw)
Replace igt_output_get_highres_mode() with sort_drm_modes_by_clk_dsc()
to select the mode with the highest pixel clock. When multiple modes
share the same resolution but differ in refresh rate, the resolution-based
sort is ambiguous and may pick the wrong mode. Sorting by clock descending
ensures the highest bandwidth mode is selected, which is most likely to
trigger DSC.
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
tests/intel/kms_dsc.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/intel/kms_dsc.c b/tests/intel/kms_dsc.c
index 69f335da3..605ad2d5c 100644
--- a/tests/intel/kms_dsc.c
+++ b/tests/intel/kms_dsc.c
@@ -170,7 +170,12 @@ static void update_display(data_t *data, uint32_t test_type)
igt_skip_on(!igt_plane_has_format_mod(primary, data->plane_format,
DRM_FORMAT_MOD_LINEAR));
- mode = igt_output_get_highres_mode(output);
+ /* Sort modes by clock descending to pick the highest bandwidth mode,
+ * which is most likely to trigger DSC. This handles cases where
+ * multiple modes share the same resolution but differ in refresh rate.
+ */
+ igt_sort_connector_modes(output->config.connector, sort_drm_modes_by_clk_dsc);
+ mode = &output->config.connector->modes[0];
do {
if (data->output_format != DSC_FORMAT_RGB && index > 0)
--
2.25.1
next reply other threads:[~2026-05-13 20:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 20:12 Swati Sharma [this message]
2026-05-13 21:46 ` ✓ i915.CI.BAT: success for tests/intel/kms_dsc: Sort modes by clock to pick highest bandwidth mode Patchwork
2026-05-13 22:18 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-14 7:52 ` [PATCH i-g-t] " Nautiyal, Ankit K
2026-05-14 23:00 ` ✗ Xe.CI.FULL: failure for " Patchwork
2026-05-14 23:35 ` ✗ 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=20260513201224.2421654-1-swati2.sharma@intel.com \
--to=swati2.sharma@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