[mutter] clutter/frame-clock: Ignore missing presentation timestamps
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/frame-clock: Ignore missing presentation timestamps
- Date: Wed, 10 Aug 2022 14:25:46 +0000 (UTC)
commit b4fff403b89f516ce239f9fc39d526deaee1eb17
Author: Dor Askayo <dor askayo gmail com>
Date: Sun Jun 26 11:19:18 2022 +0300
clutter/frame-clock: Ignore missing presentation timestamps
In some hardware configurations, presentation timestamps could be
missing from some page flip events, leading to a temporary loss of
vblank synchronization.
This occurs at least with AMD GPUs for atomic commits that only update
the cursor plane. [0]
In those cases, it's better to calculate the next update time
according to the last valid presentation timestamp instead of relying
on the dispatch lateness.
[0] https://gitlab.freedesktop.org/drm/amd/-/issues/2030
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2481>
clutter/clutter/clutter-frame-clock.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c
index ad306225c8..cf740adc3b 100644
--- a/clutter/clutter/clutter-frame-clock.c
+++ b/clutter/clutter/clutter-frame-clock.c
@@ -270,7 +270,8 @@ clutter_frame_clock_notify_presented (ClutterFrameClock *frame_clock,
}
#endif
- frame_clock->last_presentation_time_us = frame_info->presentation_time;
+ if (frame_info->presentation_time > 0)
+ frame_clock->last_presentation_time_us = frame_info->presentation_time;
frame_clock->got_measurements_last_frame = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]