Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kahola <mika.kahola@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Mika Kahola <mika.kahola@intel.com>
Subject: [PATCH i-g-t] tests/kms_plane_scaling: Require at least 30 Hz refresh rate
Date: Fri, 25 Oct 2024 11:42:51 +0300	[thread overview]
Message-ID: <20241025084251.14116-1-mika.kahola@intel.com> (raw)

With HDMI dummies we may end up testing a mode that doesn't really
resemble real life scenario like 4k mode with 17Hz refresh rate, which
can lead issues when executing a test. Therefore, the patch proposes
for intel-max-src-size to be tested with with real life refresh rate
such as 30 Hz or higher.

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 tests/kms_plane_scaling.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index a55720ed9..c8c9aee31 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -215,6 +215,7 @@ typedef struct {
 struct invalid_paramtests {
 	const char *testname;
 	uint32_t planesize[2];
+	uint32_t vrefresh;
 	struct {
 		enum igt_atomic_plane_properties prop;
 		uint32_t value;
@@ -225,6 +226,7 @@ static const struct invalid_paramtests intel_paramtests[] = {
 	{
 		.testname = "intel-max-src-size",
 		.planesize = {3840, 2160},
+		.vrefresh = 30,
 	},
 };
 
@@ -1220,13 +1222,14 @@ static void invalid_parameter_tests(data_t *d)
 	}
 }
 
-static drmModeModeInfo *find_mode(data_t *data, igt_output_t *output, const uint32_t planesize[])
+static drmModeModeInfo *find_mode(data_t *data, igt_output_t *output, const struct invalid_paramtests *test)
 {
 	drmModeModeInfo *mode = NULL;
 
 	for (int i = 0; i < output->config.connector->count_modes; i++) {
-		if (output->config.connector->modes[i].hdisplay == planesize[0] &&
-		    output->config.connector->modes[i].vdisplay == planesize[1] ) {
+		if (output->config.connector->modes[i].hdisplay == test->planesize[0] &&
+		    output->config.connector->modes[i].vdisplay == test->planesize[1] &&
+		    output->config.connector->modes[i].vrefresh >= test->vrefresh) {
 			if (mode &&
 			    mode->vrefresh < output->config.connector->modes[i].vrefresh)
 				continue;
@@ -1568,7 +1571,7 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
 						 * Need to find mode with lowest vrefresh else
 						 * we can exceed cdclk limits.
 						 */
-						mode = find_mode(&data, output, intel_paramtests[index].planesize);
+						mode = find_mode(&data, output, &intel_paramtests[index]);
 						if (mode) {
 							igt_dynamic_f("pipe-%s-%s",
 								       kmstest_pipe_name(pipe), igt_output_name(output))
-- 
2.43.0


             reply	other threads:[~2024-10-25  8:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-25  8:42 Mika Kahola [this message]
2024-10-25 10:11 ` ✓ Fi.CI.BAT: success for tests/kms_plane_scaling: Require at least 30 Hz refresh rate Patchwork
2024-10-25 10:39 ` ✓ CI.xeBAT: " Patchwork
2024-10-25 14:01 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-10-26 21:21 ` ✗ CI.xeFULL: " Patchwork
2024-10-28 17:08 ` [PATCH i-g-t] " Juha-Pekka Heikkila

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=20241025084251.14116-1-mika.kahola@intel.com \
    --to=mika.kahola@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