summaryrefslogtreecommitdiff
path: root/present
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-02-24 16:52:59 +0900
committerAdam Jackson <ajax@redhat.com>2016-03-11 13:14:30 -0500
commite457e93e5d33cbec387e40051fbabf6cf76d6af3 (patch)
treed512c5d833b01d43cd48dff887696fbb4491899f /present
parenteb5108b87017128f394ae31b5b7cd85dd8819bca (diff)
present: Only requeue if target MSC is not reached after an unflip
While present_pixmap decrements target_msc by 1 for present_queue_vblank, it leaves the original vblank->target_msc intact. So incrementing the latter for requeueing resulted in the requeued presentation being executed too late. Also, no need to requeue if the target MSC is already reached. This further reduces stutter when a popup menu appears on top of a flipping fullscreen window. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit b4ac7b142fa3c536e9b283cfd34b94d82c03aac6)
Diffstat (limited to 'present')
-rw-r--r--present/present.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/present/present.c b/present/present.c
index 7f9fc17c3..62865be69 100644
--- a/present/present.c
+++ b/present/present.c
@@ -582,10 +582,8 @@ present_check_flip_window (WindowPtr window)
xorg_list_for_each_entry(vblank, &window_priv->vblank, window_list) {
if (vblank->queued && vblank->flip && !present_check_flip(vblank->crtc, window, vblank->pixmap, vblank->sync_flip, NULL, 0, 0)) {
vblank->flip = FALSE;
- if (vblank->sync_flip) {
+ if (vblank->sync_flip)
vblank->requeue = TRUE;
- vblank->target_msc++;
- }
}
}
}
@@ -622,7 +620,8 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
if (vblank->requeue) {
vblank->requeue = FALSE;
- if (Success == present_queue_vblank(screen,
+ if (msc_is_after(vblank->target_msc, crtc_msc) &&
+ Success == present_queue_vblank(screen,
vblank->crtc,
vblank->event_id,
vblank->target_msc))