From cac7c8dc4b154d37ff27430aa7b714ac84f3d092 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 25 Jun 2016 10:36:38 +0100 Subject: [PATCH] sna: Skip wait_for_shadow() when shadow is temporarily disabled When recursing, we guard against unwanted waits by temporarily disabling the shadow. For the most part, we actually defer the wait to avoid recursion, but in a few instances detecting the recursion is hard (e.g. finishing a vblank and then performing the FakeFront copy). Here, we just ignore shadow (it should only be a read of valid data) and exit to avoid the assertion. Signed-off-by: Chris Wilson --- src/sna/sna_display.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 5785757a..2ec98357 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -1538,9 +1538,11 @@ static bool wait_for_shadow(struct sna *sna, assert(priv->move_to_gpu_data == sna); assert(sna->mode.shadow != priv->gpu_bo); - if (flags == 0 || pixmap != sna->front || !sna->mode.shadow_enabled) + if (flags == 0 || pixmap != sna->front) goto done; + if (!sna->mode.shadow_enabled) + return ret; assert(sna->mode.shadow_damage); if ((flags & MOVE_WRITE) == 0) {