sna: Only flush the scanout if we successfully upload it to the GPU

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-09-27 10:46:40 +01:00
parent 47ac44159c
commit 4c9265ebff
1 changed files with 3 additions and 3 deletions

View File

@ -15476,9 +15476,9 @@ static void sna_accel_flush(struct sna *sna)
sna_accel_disarm_timer(sna, FLUSH_TIMER);
sna->kgem.busy = busy;
if (priv) {
sna_pixmap_force_to_gpu(priv->pixmap,
MOVE_READ | MOVE_ASYNC_HINT);
if (priv &&
sna_pixmap_force_to_gpu(priv->pixmap,
MOVE_READ | MOVE_ASYNC_HINT)) {
kgem_scanout_flush(&sna->kgem, priv->gpu_bo);
assert(!priv->cpu);
}