All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel/kms_dsc: Sort modes by clock to pick highest bandwidth mode
@ 2026-05-13 20:12 Swati Sharma
  2026-05-13 21:46 ` ✓ i915.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Swati Sharma @ 2026-05-13 20:12 UTC (permalink / raw)
  To: igt-dev; +Cc: Swati Sharma

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-05-14 23:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13 20:12 [PATCH i-g-t] tests/intel/kms_dsc: Sort modes by clock to pick highest bandwidth mode Swati Sharma
2026-05-13 21:46 ` ✓ i915.CI.BAT: success for " 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.