From 6edac1e6fcb14bb8c7b79680f54393e14876f852 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 30 May 2012 08:50:44 +0100 Subject: [PATCH] sna: Ensure we flush scanout even when otherwise idle. Reported-by: Zdenek Kabelac Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50477 Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 72bb893..8f2fdea 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -11924,11 +11924,12 @@ static bool sna_accel_do_flush(struct sna *sna) return priv->cpu_damage || !__kgem_flush(&sna->kgem, priv->gpu_bo); } } else { - if (priv->cpu_damage == NULL && priv->gpu_bo->exec == NULL) { + if (priv->cpu_damage == NULL && + !__kgem_flush(&sna->kgem, priv->gpu_bo)) { DBG(("%s -- no pending write to scanout\n", __FUNCTION__)); } else { sna->timer_active |= 1 << FLUSH_TIMER; - sna->timer_ready |= 1 << FLUSH_TIMER; + sna->timer_ready |= 1 << FLUSH_TIMER; sna->timer_expire[FLUSH_TIMER] = sna->time + sna->vblank_interval / 2; DBG(("%s (time=%ld), starting\n", __FUNCTION__, (long)sna->time)); -- 1.7.10