mirror of
https://github.com/brl/mutter.git
synced 2025-02-23 00:14:09 +00:00

Regarding the sequence = 0 fallback: in some cases (moving a cursor plane on atomic amdgpu) we get sequence = 0 in the page flip callback. This seems like an amdgpu bug, so work around it by assuming a sequence delta of 1 (it is equal to 1 because of the sequence != 0 check above). Sequence can also legitimately be 0 if we're lucky during the 32-bit overflow, in which case assuming a delta of 1 will give more or less reasonable values on this and next presentation, after which it'll be back to normal. Sequence is also 0 on mode set fallback and when running nested, in which case assuming a delta of 1 every frame is the best we can do. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1484>