summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-06-25 10:36:38 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-06-25 10:36:38 +0100
commitcac7c8dc4b154d37ff27430aa7b714ac84f3d092 (patch)
tree1cf1d1ac32a6d9468269ee0b86349d534f87af24 /src/sna
parente827ef7811da992c6cc7bc9553f0f6f68287ce4b (diff)
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/sna_display.c4
1 files changed, 3 insertions, 1 deletions
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) {