[igt-dev] [PATCH i-g-t 1/1] tests/kms_cursor_crc: Add vblank wait for restore image

Kahola, Mika mika.kahola at intel.com
Mon Mar 15 13:27:20 UTC 2021


> -----Original Message-----
> From: Khajapasha, Mohammed <mohammed.khajapasha at intel.com>
> Sent: Monday, March 15, 2021 12:36 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Kahola, Mika <mika.kahola at intel.com>; Heikkila, Juha-pekka <juha-
> pekka.heikkila at intel.com>
> Subject: [PATCH i-g-t 1/1] tests/kms_cursor_crc: Add vblank wait for restore
> image
> 
> Add igt_wait_for_vblank() once restore image is done and frontbuffer mark
> as dirty.
> 
> Cc: Juha-Pekka Heikkila <juha-pekka.heikkila at intel.com>
> Cc: Kahola, Mika <mika.kahola at intel.com>
> Signed-off-by: Mohammed Khajapasha
> <mohammed.khajapasha at intel.com>

Reviewed-by: Mika Kahola <mika.kahola at intel.com>

> ---
>  tests/kms_cursor_crc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index
> 0be8f7f8..3541ea06 100644
> --- a/tests/kms_cursor_crc.c
> +++ b/tests/kms_cursor_crc.c
> @@ -147,6 +147,7 @@ static bool cursor_visible(data_t *data, int x, int y)
> static void restore_image(data_t *data)  {
>  	cairo_t *cr;
> +	igt_display_t *display = &data->display;
> 
>  	/* rendercopy stripped in igt using cairo */
>  	cr = igt_get_cairo_ctx(data->drm_fd,
> @@ -157,6 +158,8 @@ static void restore_image(data_t *data)
>  	cairo_fill(cr);
>  	igt_put_cairo_ctx(cr);
>  	igt_dirty_fb(data->drm_fd, &data->primary_fb[FRONTBUFFER]);
> +	igt_wait_for_vblank(data->drm_fd,
> +			    display->pipes[data->pipe].crtc_offset);
>  }
> 
>  static void do_single_test(data_t *data, int x, int y)
> --
> 2.29.2.154.g7f7ebe054a



More information about the igt-dev mailing list