From f38d037b94aacdccb2aaa058bbe48d1c8079d604 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 27 May 2013 21:07:20 +0100 Subject: [PATCH] sna/video: Correct interpretation of 'sync' The 'sync' parameter past along XvPutImage is not a request for us to perform the operation synchronised to the vblank, rather a hint that the client wishes the operation to be synchronous. In Xorg, this is implemented as an immediate ShmCompletion event so make sure we flush the operation to hw in this case. Fixes regression from commit 195a51353c3af7bd253227da5f759f06cea01f73 [2.21.8] Author: Chris Wilson Date: Tue Apr 9 19:13:46 2013 +0100 sna/video: Convert to a pure Xv backend Reported-by: Matti Hamalainen Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65048 Signed-off-by: Chris Wilson --- src/sna/sna_video_textured.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c index 29f4d9d4..47f4e5d5 100644 --- a/src/sna/sna_video_textured.c +++ b/src/sna/sna_video_textured.c @@ -235,7 +235,7 @@ sna_video_textured_put_image(ClientPtr client, } } - if (crtc && sync && video->SyncToVblank != 0 && + if (crtc && video->SyncToVblank != 0 && sna_pixmap_is_scanout(sna, pixmap)) { kgem_set_mode(&sna->kgem, KGEM_RENDER, sna_pixmap(pixmap)->gpu_bo); flush = sna_wait_for_scanline(sna, pixmap, crtc, @@ -254,7 +254,7 @@ sna_video_textured_put_image(ClientPtr client, /* Push the frame to the GPU as soon as possible so * we can hit the next vsync. */ - if (flush) + if (flush || sync) kgem_submit(&sna->kgem); RegionUninit(&clip);