diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-11-06 20:41:03 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-11-06 20:41:03 +0000 |
commit | b1015d4de0cb040dc47ebfbef1114b65269f6f36 (patch) | |
tree | 5d34e9cd40326c499eb74a1eb6690838c612b8cf | |
parent | 198246201fe9a07a60b4e1084dcf9ba2e06b5ef5 (diff) |
sna/dri2: Protect against a new possible recursion during TearFree
With the introduction of a new SwapEvent that may trigger a copy, we
need to add another check for recursion from a TearFree flip event.
References: https://bugs.freedesktop.org/show_bug.cgi?id=92751#c14
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_dri2.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index 1fad39ff..dae1e77e 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -2600,6 +2600,13 @@ void sna_dri2_vblank_handler(struct drm_event_vblank *event) } if (info->pending.bo) { + if (sna->mode.shadow && !sna->mode.shadow_enabled) { + /* recursed from wait_for_shadow(), simply requeue */ + DBG(("%s -- recursed from wait_for_shadow(), requeuing\n", __FUNCTION__)); + if (sna_next_vblank(info)) + return; + } + assert(info->pending.bo->active_scanout > 0); info->pending.bo->active_scanout--; |