public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel/kms_cdclk: Skip CDCLK bump validation when dotclocks match
@ 2026-04-10 12:41 Swati Sharma
  2026-04-10 18:33 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Swati Sharma @ 2026-04-10 12:41 UTC (permalink / raw)
  To: igt-dev; +Cc: Swati Sharma, Ville Syrjälä

When the highest and lowest resolution modes share the same dotclock,
no CDCLK bump is expected.

Skip CDCLK bump validation when the highres and lowres modes have the
same dotclock, replacing the previous resolution-based is_equal() check
with a dotclock comparison via has_same_dotclock().

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 tests/intel/kms_cdclk.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/tests/intel/kms_cdclk.c b/tests/intel/kms_cdclk.c
index 662bdbe43..48bd7276f 100644
--- a/tests/intel/kms_cdclk.c
+++ b/tests/intel/kms_cdclk.c
@@ -84,11 +84,9 @@ static bool is_4k(drmModeModeInfo mode)
 	        mode.vrefresh >= VREFRESH);
 }
 
-static bool is_equal(drmModeModeInfo mode_hi, drmModeModeInfo mode_lo)
+static bool has_same_dotclock(drmModeModeInfo mode_hi, drmModeModeInfo mode_lo)
 {
-	return (mode_hi.hdisplay == mode_lo.hdisplay &&
-		mode_hi.vdisplay == mode_lo.vdisplay &&
-		mode_hi.vrefresh == mode_lo.vrefresh);
+	return mode_hi.clock == mode_lo.clock;
 }
 
 static drmModeModeInfo *get_lowres_mode(igt_output_t *output)
@@ -204,7 +202,7 @@ static void test_mode_transition(data_t *data, igt_crtc_t *crtc,
 	igt_require_f(is_4k(mode_hi), "Mode >= 4K not found on output %s\n",
 	              igt_output_name(output));
 
-	igt_skip_on_f(is_equal(mode_hi, mode_lo), "Highest and lowest mode resolutions are same; no transition\n");
+	igt_skip_on_f(has_same_dotclock(mode_hi, mode_lo), "Highest and lowest modes have same dotclock; no CDCLK bump expected\n");
 
 	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
 
@@ -278,8 +276,8 @@ static void test_mode_transition_on_all_outputs(data_t *data)
 
 		mode_lowres[count] = *get_lowres_mode(output);
 
-		if (is_equal(mode_highres[count], mode_lowres[count])) {
-			igt_info("Highest and lowest mode resolutions are same on output %s; no transition will occur, skipping\n",
+		if (has_same_dotclock(mode_highres[count], mode_lowres[count])) {
+			igt_info("Highest and lowest modes have same dotclock on output %s; no CDCLK bump expected, skipping\n",
 				  igt_output_name(output));
 			continue;
 		}
-- 
2.25.1


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

end of thread, other threads:[~2026-04-14  9:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-10 12:41 [PATCH i-g-t] tests/intel/kms_cdclk: Skip CDCLK bump validation when dotclocks match Swati Sharma
2026-04-10 18:33 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-04-10 18:48 ` ✓ i915.CI.BAT: " Patchwork
2026-04-11  7:20 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-11 19:27 ` ✓ i915.CI.Full: success " Patchwork
2026-04-14  9:53 ` [PATCH i-g-t] " Karthik B S

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