summaryrefslogtreecommitdiff
path: root/present
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-11-25 17:34:05 +0900
committerAdam Jackson <ajax@redhat.com>2017-01-11 15:04:12 -0500
commit27a2772cf3a1bcd656efdf653a7504597911dbc4 (patch)
tree91d79d158b40c8a588ba4c51e84c518d794d2c80 /present
parent943e3cbeb0139d719589fc07c4f471195e4efe0a (diff)
present: Only call present_flip_notify if vblank->queued == FALSE
We are no longer using the present_flip_queue list only for presents which have already been submitted to the driver for page flipping, but also for those which we are queueing up to be flipped later, marked with vblank->queued == TRUE. We were incorrectly calling present_flip_notify for such entries, failing the assertion in present_flip_notify (or presumably resulting in other undesirable behaviour with assertions disabled). Reproduction recipe: Run the JavaFX test case referenced by https://bugs.freedesktop.org/show_bug.cgi?id=98831#c6 and alt-tab out of it while it's fullscreen. May take a few attempts to hit the assertion failure. Fixes: bab0f450a719 ("present: Fix presentation of flips out of order") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98854 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit e473b2bc016adacfe3fa47fdf6a8ce9f8cddff62)
Diffstat (limited to 'present')
-rw-r--r--present/present.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/present/present.c b/present/present.c
index a7ca06e36..ef8904537 100644
--- a/present/present.c
+++ b/present/present.c
@@ -536,7 +536,10 @@ present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc)
}
xorg_list_for_each_entry(vblank, &present_flip_queue, event_queue) {
if (vblank->event_id == event_id) {
- present_flip_notify(vblank, ust, msc);
+ if (vblank->queued)
+ present_execute(vblank, ust, msc);
+ else
+ present_flip_notify(vblank, ust, msc);
return;
}
}