xwayland/present: Skip queued flip when a new one becomes ready
commit0d9a54aa975e050ba044271a48c037416b5d54ca
authorMichel Dänzer <mdaenzer@redhat.com>
Fri, 26 Apr 2024 10:44:52 +0000 (26 12:44 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 2 May 2024 08:17:35 +0000 (2 08:17 +0000)
treefbcc1542fdadede0d2b14897d9f316ecaf0e6f82
parent80f74b0e44ebf78424384fb32592ebabb55a48d9
xwayland/present: Skip queued flip when a new one becomes ready

If multiple flips become ready for the same MSC, we would previously
execute them all sequentially, one per MSC for sync flips. This could
result in an unbounded flip queue and corresponding memory consumption.

With implicit sync, leave the mailbox handling to the compositor for
async flips though.

v2:
* Use present_vblank_rec::sync_flip.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1664
Fixes: e1f16fb1aca5 ("xwayland: don't scrap pending present requests")
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1511>
hw/xwayland/xwayland-present.c