summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-09-27 10:46:40 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-09-27 10:47:18 +0100
commit4c9265ebff496a4d4f974768e264bd65babff97e (patch)
tree8e075e611a3e7b344d2efd135729ddc8e1deb2d9 /src
parent47ac44159c0e3ea0c84510f1d58ac140344b5e69 (diff)
sna: Only flush the scanout if we successfully upload it to the GPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 9a6f50b2..fd771647 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -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);
}