Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/kms_plane_scaling: Require at least 30 Hz refresh rate
@ 2024-10-25  8:42 Mika Kahola
  2024-10-25 10:11 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Mika Kahola @ 2024-10-25  8:42 UTC (permalink / raw)
  To: igt-dev; +Cc: Mika Kahola

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


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

end of thread, other threads:[~2024-10-28 17:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-25  8:42 [PATCH i-g-t] tests/kms_plane_scaling: Require at least 30 Hz refresh rate Mika Kahola
2024-10-25 10:11 ` ✓ Fi.CI.BAT: success for " 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

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