[PATCH i-g-t 2/6] tests/intel/kms_cdclk: Modify highest resolution restriction

Swati Sharma swati2.sharma at intel.com
Mon Dec 30 19:03:11 UTC 2024


Currently, highres is considered as mode equal to 4K. Modify this
restriction to consider highres as >= 4K.

Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
---
 tests/intel/kms_cdclk.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tests/intel/kms_cdclk.c b/tests/intel/kms_cdclk.c
index f1a019eb7..e78d22e1d 100644
--- a/tests/intel/kms_cdclk.c
+++ b/tests/intel/kms_cdclk.c
@@ -165,8 +165,8 @@ static void test_plane_scaling(data_t *data, enum pipe pipe, igt_output_t *outpu
 
 		igt_output_set_pipe(output, pipe);
 		mode = *igt_output_get_highres_mode(output);
-		igt_require_f(mode.hdisplay == HDISPLAY_4K && mode.vdisplay == VDISPLAY_4K &&
-			      mode.vrefresh == VREFRESH, "4K mode not found on output %s.\n",
+		igt_require_f(mode.hdisplay >= HDISPLAY_4K && mode.vdisplay >= VDISPLAY_4K &&
+			      mode.vrefresh >= VREFRESH, "Mode >= 4K not found on output %s.\n",
 			      igt_output_name(output));
 
 		igt_output_override_mode(output, &mode);
@@ -219,8 +219,8 @@ static void test_mode_transition(data_t *data, enum pipe pipe, igt_output_t *out
 	mode = igt_output_get_mode(output);
 	mode_lo = *get_lowres_mode(output);
 	mode_hi = *igt_output_get_highres_mode(output);
-	igt_require_f(mode_hi.hdisplay == HDISPLAY_4K && mode_hi.vdisplay == VDISPLAY_4K &&
-		      mode_hi.vrefresh == VREFRESH, "4K mode not found on output %s.\n",
+	igt_require_f(mode_hi.hdisplay >= HDISPLAY_4K && mode_hi.vdisplay >= VDISPLAY_4K &&
+		      mode_hi.vrefresh >= VREFRESH, "Mode >= 4K not found on output %s.\n",
 		      igt_output_name(output));
 
 	igt_skip_on_f(mode_hi.hdisplay == mode_lo.hdisplay && mode_hi.vdisplay == mode_lo.vdisplay,
@@ -285,8 +285,8 @@ static void test_mode_transition_on_all_outputs(data_t *data)
 		height = max(height, mode->vdisplay);
 
 		mode_hi = *igt_output_get_highres_mode(output);
-		igt_require_f(mode_hi.hdisplay == HDISPLAY_4K && mode_hi.vdisplay == VDISPLAY_4K &&
-			      mode_hi.vrefresh == VREFRESH, "4K mode not found on output %s.\n",
+		igt_require_f(mode_hi.hdisplay >= HDISPLAY_4K && mode_hi.vdisplay >= VDISPLAY_4K &&
+			      mode_hi.vrefresh >= VREFRESH, "Mode >= 4K not found on output %s.\n",
 			      igt_output_name(output));
 
 		igt_output_set_pipe(output, i);
@@ -333,8 +333,8 @@ static void test_mode_transition_on_all_outputs(data_t *data)
 		igt_assert(mode);
 
 		mode_hi = *igt_output_get_highres_mode(output);
-		igt_require_f(mode_hi.hdisplay == HDISPLAY_4K && mode_hi.vdisplay == VDISPLAY_4K &&
-			      mode_hi.vrefresh == VREFRESH, "4K mode not found on output %s.\n",
+		igt_require_f(mode_hi.hdisplay >= HDISPLAY_4K && mode_hi.vdisplay >= VDISPLAY_4K &&
+			      mode_hi.vrefresh >= VREFRESH, "Mode >= 4K not found on output %s.\n",
 			      igt_output_name(output));
 
 		igt_output_override_mode(output, &mode_hi);
-- 
2.25.1



More information about the igt-dev mailing list