Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Subject: [PATCH i-g-t 3/3] tests/kms_color: Update all tests to use high resolution mode
Date: Fri, 24 May 2024 15:42:02 +0530	[thread overview]
Message-ID: <20240524101202.2735010-3-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20240524101202.2735010-1-bhanuprakash.modem@intel.com>

Instead of using the default mode, use the mode with highest
possible resolution.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_color.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index 645a03537..75d28477b 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -771,6 +771,8 @@ static void test_cleanup(data_t *data)
 {
 	igt_pipe_crc_free(data->pipe_crc);
 	data->pipe_crc = NULL;
+	if (data->mode)
+		free(data->mode);
 }
 
 static void
@@ -785,7 +787,9 @@ run_gamma_degamma_tests_for_pipe(data_t *data, enum pipe p,
 	 */
 	data->color_depth = 8;
 	data->drm_format = DRM_FORMAT_XRGB8888;
-	data->mode = igt_output_get_mode(data->output);
+	data->mode = malloc(sizeof(drmModeModeInfo));
+	igt_assert(data->mode);
+	memcpy(data->mode, output_mode_with_max_resolution(data->output), sizeof(drmModeModeInfo));
 
 	if (!pipe_output_combo_valid(data, p))
 		goto out;
@@ -824,7 +828,9 @@ run_ctm_tests_for_pipe(data_t *data, enum pipe p,
 	data->color_depth = 8;
 	delta = 1.0 / (1 << data->color_depth);
 	data->drm_format = DRM_FORMAT_XRGB8888;
-	data->mode = igt_output_get_mode(data->output);
+	data->mode = malloc(sizeof(drmModeModeInfo));
+	igt_assert(data->mode);
+	memcpy(data->mode, output_mode_with_max_resolution(data->output), sizeof(drmModeModeInfo));
 
 	if (!pipe_output_combo_valid(data, p))
 		goto out;
-- 
2.43.2


  parent reply	other threads:[~2024-05-24 10:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Bhanuprakash Modem [this message]
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 high resolution mode 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

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=20240524101202.2735010-3-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@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