From 58e3fcfc2d44348be0c43e27715fef5cc42bf99f 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..8ee6d84 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->exec)) { 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