mirror of
https://github.com/X11Libre/xserver.git
synced 2026-01-26 14:03:17 +00:00
Many Intel GPUs can't switch between sync and async flips willy nilly. Sometimes that change itself will take one extra frame. This means that constant ping-pong between sync and async flips is only going to cause problems. Stay in async flip mode as long as the client is requesting it. The present protocol spec does say: "If 'options' contains PresentOptionAsync, and the 'target-msc' is less than or equal to the current msc for 'window', then the operation will be performed as soon as possible, not necessarily waiting for the next vertical blank interval." So there is an expectation that a future target-msc will still be respected even when PresentOptionAsync is specified. Staying in async flip mode won't actually change that given that present_scmd_pixmap() takes the flip mode into account when calculating exec_msc. So visually the flip should still happen on the correct target_msc regardles of whether we executed it as sync or async. Signed-off-by: notbabaisyou <though-went-some-simple@proton.me>