xf86-video-intel: src/sna/sna_display.c

Chris Wilson ickle at kemper.freedesktop.org
Sun Jul 26 11:59:29 PDT 2015


 src/sna/sna_display.c |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 6be2bea5f02d6155da7862e247b5d3b8935b6892
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Jul 26 19:58:53 2015 +0100

    sna: Double check for Present takeover before TearFree flips
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=91467#c17
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 9a66069..48c032d 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -1334,6 +1334,7 @@ static bool wait_for_shadow(struct sna *sna,
 			bo = sna->mode.shadow;
 		}
 	}
+	assert(!sna->mode.shadow_enabled);
 	sna->mode.shadow_enabled = true;
 
 	if (bo->refcnt > 1) {
@@ -8047,12 +8048,19 @@ void sna_mode_redisplay(struct sna *sna)
 	     region->extents.x2, region->extents.y2));
 
 	if (sna->mode.flip_active) {
-		sna->mode.shadow_enabled = false;
+		DBG(("%s: checking for %d outstanding flip completions\n",
+		     __FUNCTION__, sna->mode.flip_active));
+
+		sna->mode.dirty = true;
 		while (sna->mode.flip_active && sna_mode_wakeup(sna))
 			;
-		sna->mode.shadow_enabled = true;
+		sna->mode.dirty = false;
 
-		if (sna->mode.flip_active)
+		DBG(("%s: now %d outstanding flip completions (enabled? %d)\n",
+		     __FUNCTION__,
+		     sna->mode.flip_active,
+		     sna->mode.shadow_enabled));
+		if (sna->mode.flip_active || !sna->mode.shadow_enabled)
 			return;
 	}
 


More information about the xorg-commit mailing list