Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v3] tests/kms_plane: Skip CRC frame sequence check on MediaTek
@ 2026-08-14 17:28 Jason-JH Lin
  2026-08-14 18:50 ` ✓ i915.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jason-JH Lin @ 2026-08-14 17:28 UTC (permalink / raw)
  To: igt-dev, Karthik B S, Swati Sharma, Kamil Konieczny,
	Ville Syrjala, Juha-Pekka Heikkilä, Fei Shao
  Cc: Jani, Jason-JH Lin, Paul-PL Chen, Lancelot Wu, Manasi Navare,
	Gil Dekel, Yacoub, Project_Global_Chrome_Upstream_Group

MediaTek's DRM driver uses an internal per-commit CRC queue that
reports CRC entries with a frame number offset due to pipeline delay
(3 vblanks after commit). This causes crc->frame > expected_vblank,
which fails the exact-match validation in capture_crc().

Since igt_pipe_crc_get_for_frame() already guarantees crc->frame >=
vblank via its internal loop, the exact-match check is overly strict
for queued CRC drivers. Skip it on MediaTek while preserving the
validation for other platforms.

Signed-off-by: Jason-JH Lin <jason-jh.lin@mediatek.com>
---
 tests/kms_plane.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 12dfbfe1d82b..14d2d810f1a0 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -766,6 +766,15 @@ static void capture_crc(data_t *data, unsigned int vblank, igt_crc_t *crc)
 {
 	igt_pipe_crc_get_for_frame(data->drm_fd, data->pipe_crc, vblank, crc);
 
+	/*
+	 * Platforms with an internal CRC queue (e.g. MediaTek) report CRC
+	 * entries with a frame number greater than the requested vblank due
+	 * to pipeline delay. Since igt_pipe_crc_get_for_frame() already
+	 * guarantees crc->frame >= vblank, skip the exact-match check.
+	 */
+	if (is_mtk_device(data->drm_fd))
+		return;
+
 	igt_fail_on_f(!igt_skip_crc_compare && !igt_run_in_simulation() &&
 		      crc->has_valid_frame && crc->frame != vblank,
 		      "Got CRC for the wrong frame (got %u, expected %u). CRC buffer overflow?\n",
-- 
2.43.0


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

end of thread, other threads:[~2026-08-17 12:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-14 17:28 [PATCH i-g-t v3] tests/kms_plane: Skip CRC frame sequence check on MediaTek Jason-JH Lin
2026-08-14 18:50 ` ✓ i915.CI.BAT: success for " Patchwork
2026-08-14 18:56 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-14 21:37 ` ✓ Xe.CI.FULL: " Patchwork
2026-08-16 18:41 ` [PATCH i-g-t v3] " Juha-Pekka Heikkilä
2026-08-17 12:58 ` Kamil Konieczny

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