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 195a51353c [2.21.8]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Apr 9 19:13:46 2013 +0100

    sna/video: Convert to a pure Xv backend

Reported-by: Matti Hamalainen <ccr@tnsp.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65048
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-05-27 21:07:20 +01:00
parent 7e7d0ad15b
commit f38d037b94
1 changed files with 2 additions and 2 deletions

View File

@ -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);