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>
This commit is contained in:
Chris Wilson 2016-06-25 10:36:38 +01:00
parent e827ef7811
commit cac7c8dc4b
1 changed files with 3 additions and 1 deletions

View File

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