[PATCH v2] tests/kms_cursor_crc.: Test async cursor crc

Ville Syrjälä ville.syrjala at linux.intel.com
Wed Mar 12 11:28:51 UTC 2025


On Tue, Mar 11, 2025 at 10:00:02AM +0530, Shekhar Chauhan wrote:
> +	/* get the screen refresh rate, then wait for vblank, and
> +	 * wait for 1/5 of time of screen refresh and change image.
> +	 * change it mid screen to validate that the change happens
> +	 * at the end of the current frame.

The legacy cursor uapi doesn't specify whether the cursor updates
are synchronized to vblank or not. So this is testing for
hardware/driver specific behaviour.

> +	 */
> +	usleep(1.0f / data->refresh / 5.0f * 1e6);
> +
> +	changefunc(data, SECONDIMAGE);
> +	igt_display_commit(&data->display);
> +	igt_pipe_crc_get_current(data->drm_fd, data->pipe_crc, &crc2);
> +
> +	igt_assert_crc_equal(&crc1, &crc2);
> +
> +	igt_pipe_crc_get_current(data->drm_fd, data->pipe_crc, &crc2);
> +
> +	/* check next frame will be different as expected*/
> +	igt_assert_f(igt_find_crc_mismatch(&crc1, &crc2, NULL),
> +		     "crc values were not supposing to match!\n");

This could fail due to a false positive. If you really want to test
for CRC inequality I think you'd first have to make sure such an
inequality actually exists.

-- 
Ville Syrjälä
Intel


More information about the igt-dev mailing list