summaryrefslogtreecommitdiff
path: root/src/sna/sna_dri2.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-11-10 09:56:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2015-11-10 09:58:52 +0000
commit64dbcdd4de1fe1941196265d054272d7d93e5d59 (patch)
treedd2431605316acb4da845639001cc1d1f8397df8 /src/sna/sna_dri2.c
parent47f6c5b211c0458f2bf1e05a736e466bd8b64763 (diff)
sna/dri2: Add a specific recursion indicator for TearFree/DRI2
Avoid conflating the DRI3/Present flag for controlling TearFree by adding a separate flag to indicate when we are waiting inside the TearFree shadow handler to avoid recursion in DRI2. Reported-by: Andreas Reis <andreas.reis@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92873 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_dri2.c')
-rw-r--r--src/sna/sna_dri2.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index dae1e77e..e9d91591 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -2464,8 +2464,7 @@ static void chain_swap(struct sna_dri2_event *chain)
switch (chain->type) {
case SWAP_COMPLETE:
DBG(("%s: emitting chained vsync'ed blit\n", __FUNCTION__));
- if (chain->sna->mode.shadow &&
- !chain->sna->mode.shadow_enabled) {
+ if (chain->sna->mode.shadow && !chain->sna->mode.shadow_wait) {
/* recursed from wait_for_shadow(), simply requeue */
DBG(("%s -- recursed from wait_for_shadow(), requeuing\n", __FUNCTION__));
if (sna_next_vblank(chain))
@@ -2562,7 +2561,7 @@ void sna_dri2_vblank_handler(struct drm_event_vblank *event)
/* else fall through to blit */
case SWAP:
assert(info->signal);
- if (sna->mode.shadow && !sna->mode.shadow_enabled) {
+ if (sna->mode.shadow && !sna->mode.shadow_wait) {
/* recursed from wait_for_shadow(), simply requeue */
DBG(("%s -- recursed from wait_for_shadow(), requeuing\n", __FUNCTION__));
} else if (can_xchg(info->sna, draw, info->front, info->back)) {
@@ -2600,7 +2599,7 @@ void sna_dri2_vblank_handler(struct drm_event_vblank *event)
}
if (info->pending.bo) {
- if (sna->mode.shadow && !sna->mode.shadow_enabled) {
+ if (sna->mode.shadow && !sna->mode.shadow_wait) {
/* recursed from wait_for_shadow(), simply requeue */
DBG(("%s -- recursed from wait_for_shadow(), requeuing\n", __FUNCTION__));
if (sna_next_vblank(info))