summaryrefslogtreecommitdiff
path: root/src/sna/sna_dri2.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-12-02 10:06:46 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2015-12-02 14:52:33 +0000
commitc4565979572b61cf7fc0b931333c032c88b259f1 (patch)
tree8f14cd85968079c15f4e9fa6e37c61df78760772 /src/sna/sna_dri2.c
parentda9ad388a0657b85fcf9a5f78ae1e75d0052dc52 (diff)
sna/dri2: Emit the outstanding signal when eliding a swap
When we do the exchange for the next swap, we should emit any pending completion signal for the previous buffer. 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.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index c0930249..33cf3d9e 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -2791,6 +2791,7 @@ sna_dri2_flip_continue(struct sna_dri2_event *info)
info->sna->dri2.flip_pending == info);
info->sna->dri2.flip_pending = info;
info->queued = true;
+ info->signal = info->type == FLIP_THROTTLE;
return true;
}
@@ -3062,17 +3063,18 @@ sna_dri2_schedule_flip(ClientPtr client, DrawablePtr draw, xf86CrtcPtr crtc,
}
DBG(("%s: executing xchg of pending flip: flip_continue=%d, keepalive=%d, chain?=%d\n", __FUNCTION__, info->flip_continue, info->keepalive, current_msc < *target_msc));
sna_dri2_xchg(draw, front, back);
- info->flip_continue = FLIP_COMPLETE;
info->keepalive = KEEPALIVE;
- signal = info->signal;
- info->signal = true;
if (xorg_can_triple_buffer() &&
current_msc < *target_msc) {
DBG(("%s: chaining flip\n", __FUNCTION__));
- info->type = FLIP_THROTTLE;
+ info->flip_continue = FLIP_THROTTLE;
goto out;
- } else
+ } else {
+ info->flip_continue = FLIP_COMPLETE;
+ signal = info->signal;
+ info->signal = true;
goto new_back;
+ }
}
info = sna_dri2_add_event(sna, draw, client, crtc);