sna: Make the post-flip delay explictit

As the kernel is inconsistent in enforcing this across generations,
handle the synchronisation of the pageflip explicity. Ultimately this
should be replaced with a tripple buffer mechanism.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-06-29 09:33:09 +01:00
parent 31caa43a21
commit 87c8f5a47e
1 changed files with 3 additions and 0 deletions

View File

@ -2825,11 +2825,14 @@ disable:
/* XXX only works if the kernel stalls fwrites to the current
* scanout whilst the flip is pending
*/
while (sna->mode.shadow_flip)
sna_mode_wakeup(sna);
(void)sna->render.copy_boxes(sna, GXcopy,
sna->front, new, 0, 0,
sna->front, old, 0, 0,
REGION_RECTS(region),
REGION_NUM_RECTS(region));
kgem_submit(&sna->kgem);
sna_pixmap(sna->front)->gpu_bo = old;
sna->mode.shadow = new;