[igt-dev] [PATCH i-g-t 1/1] tests/kms_cursor_crc: Add vblank wait for restore image
Mohammed Khajapasha
mohammed.khajapasha at intel.com
Mon Mar 15 10:35:47 UTC 2021
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>
---
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