Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jason-JH Lin <jason-jh.lin@mediatek.com>
To: igt-dev@lists.freedesktop.org,
	"Karthik B S" <karthik.b.s@intel.com>,
	"Swati Sharma" <swati2.sharma@intel.com>,
	"Kamil Konieczny" <kamil.konieczny@linux.intel.com>,
	"Ville Syrjala" <ville.syrjala@linux.intel.com>,
	"Juha-Pekka Heikkilä" <juhapekka.heikkila@gmail.com>,
	"Fei Shao" <fshao@chromium.org>
Cc: Jani <jani.nikula@intel.com>,
	Jason-JH Lin <jason-jh.lin@mediatek.com>,
	Paul-PL Chen <paul-pl.chen@mediatek.com>,
	Lancelot Wu <Lancelot.Wu@mediatek.com>,
	Manasi Navare <navaremanasi@google.com>,
	Gil Dekel <gildekel@google.com>, Yacoub <markyacoub@chromium.org>,
	<Project_Global_Chrome_Upstream_Group@mediatek.com>
Subject: [PATCH i-g-t v3] tests/kms_plane: Skip CRC frame sequence check on MediaTek
Date: Sat, 15 Aug 2026 01:28:36 +0800	[thread overview]
Message-ID: <20260814172940.3190510-1-jason-jh.lin@mediatek.com> (raw)

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


             reply	other threads:[~2026-08-14 17:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14 17:28 Jason-JH Lin [this message]
2026-08-14 18:50 ` ✓ i915.CI.BAT: success for tests/kms_plane: Skip CRC frame sequence check on MediaTek 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

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=20260814172940.3190510-1-jason-jh.lin@mediatek.com \
    --to=jason-jh.lin@mediatek.com \
    --cc=Lancelot.Wu@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=fshao@chromium.org \
    --cc=gildekel@google.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=juhapekka.heikkila@gmail.com \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=karthik.b.s@intel.com \
    --cc=markyacoub@chromium.org \
    --cc=navaremanasi@google.com \
    --cc=paul-pl.chen@mediatek.com \
    --cc=swati2.sharma@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /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