From 4c9265ebff496a4d4f974768e264bd65babff97e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 27 Sep 2013 10:46:40 +0100 Subject: [PATCH] sna: Only flush the scanout if we successfully upload it to the GPU Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 6 +++--- 1 file 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); }