diff options
authorMichel Dänzer <>2016-03-24 17:42:47 +0900
committerAdam Jackson <>2016-03-29 16:42:30 -0400
commit07ad2fde78f07e98caaf3e9b6b67af15359fefe4 (patch)
parente8f785f82ec8d3a76ae377c7430b1945180cba00 (diff)
present: Only requeue for next MSC after flip failure
This code was added to deal with the driver present hook failing, in which case we need to wait for the next MSC before executing the presentation. However, it could also take effect in cases where the driver incorrectly thinks the current MSC matches the target one (e.g. due to the kernel interface only supporting 32-bit MSC values), in which case it could result in the presentation getting requeued over and over. To prevent such issues, check specifically for the target MSC immediately following the current MSC. Bugzilla: Signed-off-by: Michel Dänzer <> Reviewed-by: Keith Packard <> (cherry picked from commit 3b385105b2d19a1c55e9779ae88d775185eea231)
1 files changed, 1 insertions, 1 deletions
diff --git a/present/present.c b/present/present.c
index 55f6aa7b1..105e2bf47 100644
--- a/present/present.c
+++ b/present/present.c
@@ -726,7 +726,7 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
/* If present_flip failed, we may have to requeue for the target MSC */
- if (msc_is_after(vblank->target_msc, crtc_msc) &&
+ if (vblank->target_msc == crtc_msc + 1 &&
Success == present_queue_vblank(screen,