Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/3] tests/kms_color_helper: Add a helper to get high resolution mode
@ 2024-05-24 10:12 Bhanuprakash Modem
  2024-05-24 10:12 ` [PATCH i-g-t 2/3] tests/kms_color: Add connector name to dynamic subtests Bhanuprakash Modem
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Bhanuprakash Modem @ 2024-05-24 10:12 UTC (permalink / raw)
  To: igt-dev; +Cc: Bhanuprakash Modem

Add a helper to get the mode with highest possible resolution.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_color_helper.c | 14 ++++++++++++++
 tests/kms_color_helper.h |  1 +
 2 files changed, 15 insertions(+)

diff --git a/tests/kms_color_helper.c b/tests/kms_color_helper.c
index 143dff43e..f7d5a0931 100644
--- a/tests/kms_color_helper.c
+++ b/tests/kms_color_helper.c
@@ -24,11 +24,25 @@
 
 #include "kms_color_helper.h"
 
+drmModeModeInfo *output_mode_with_max_resolution(igt_output_t *output)
+{
+	igt_info("Default mode: ");
+	kmstest_dump_mode(igt_output_get_mode(output));
+
+	igt_sort_connector_modes(output->config.connector, sort_drm_modes_by_res_dsc);
+
+	igt_info("High resolution mode: ");
+	kmstest_dump_mode(&output->config.connector->modes[0]);
+
+	return &output->config.connector->modes[0];
+}
+
 bool pipe_output_combo_valid(data_t *data, enum pipe pipe)
 {
 	bool ret = true;
 
 	igt_output_set_pipe(data->output, pipe);
+	igt_output_override_mode(data->output, data->mode);
 	if (!intel_pipe_output_combo_valid(&data->display))
 		ret = false;
 	igt_output_set_pipe(data->output, PIPE_NONE);
diff --git a/tests/kms_color_helper.h b/tests/kms_color_helper.h
index 23463b944..8162c440d 100644
--- a/tests/kms_color_helper.h
+++ b/tests/kms_color_helper.h
@@ -69,6 +69,7 @@ typedef struct {
 	color_t coeffs[];
 } gamma_lut_t;
 
+drmModeModeInfo *output_mode_with_max_resolution(igt_output_t *output);
 bool pipe_output_combo_valid(data_t *data, enum pipe pipe);
 bool panel_supports_deep_color(int fd, char *output_name);
 uint64_t get_max_bpc(igt_output_t *output);
-- 
2.43.2


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

end of thread, other threads:[~2024-06-27  5:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-24 10:12 [PATCH i-g-t 1/3] tests/kms_color_helper: Add a helper to get high resolution mode Bhanuprakash Modem
2024-05-24 10:12 ` [PATCH i-g-t 2/3] tests/kms_color: Add connector name to dynamic subtests Bhanuprakash Modem
2024-06-27  5:17   ` Karthik B S
2024-05-24 10:12 ` [PATCH i-g-t 3/3] tests/kms_color: Update all tests to use high resolution mode Bhanuprakash Modem
2024-05-24 12:05 ` ✓ CI.xeBAT: success for series starting with [i-g-t,1/3] tests/kms_color_helper: Add a helper to get " Patchwork
2024-05-24 12:13 ` ✓ Fi.CI.BAT: " Patchwork
2024-05-24 14:43 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-25 10:37 ` ✓ Fi.CI.IGT: success " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox