sna: Ensure we flush scanout even when otherwise idle.

Reported-by: Zdenek Kabelac <zdenek.kabelac@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=50477
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-05-30 08:50:44 +01:00
parent 10ca765ad3
commit 08a630dc5e
1 changed files with 3 additions and 2 deletions

View File

@ -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));