Re: [PATCH i-g-t v3] tests/kms_plane: Skip CRC frame sequence check on MediaTek

Juha-Pekka Heikkilä <[email protected]>
Newsgroups org.freedesktop.lists.igt-dev
Message-ID <[email protected]>
Reviewed-by: Juha-Pekka Heikkila <[email protected]>

Do you need help merging this?

/Juha-Pekka

On 14/08/2026 20.28, Jason-JH Lin wrote:
> 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 <[email protected]>
> ---
>   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",
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.