wsi/wayland: Be able to use FIFO protocol without commit-timing
In the current implementation, if commit-timing is not supported, FIFO would regress back to using legacy frame callback on top of using FIFO barriers which is nonsensical. This can still deadlock, meaning FIFO becomes meaningless.
This MR relaxed this requirement, and allows FIFO to work without having a hard requirement on commit-timing. It's expected that commit-timing path will be used everywhere, but this allows for a smoother introduction of FIFO into the ecosystem.
As outlined by the comments in the commits there are two hazards which can happen:
- PresentWait on the latest submitted presentID could stall indefinitely. This could happen on a compositor which does not implement commit-timing, but also never signals present complete until occluded surface is visible. To avoid potential lockups here, there is a timeout for these waits to ensure forward progress.
- Occluded surface may run unthrottled. This is objectively better than locking up completely, but this also only happens on a hypothetical compositor that does not implement commit-timing, but also does not implement any kind of throttling for occluded FIFO surfaces. This set should be empty in real world.
The existing implementation also had bugs. When a timestamp was not used even with commit-timing, some PresentWait forward progress guarantees would not be met. This could happen on the very first present (no observed refresh cycle), or when MAILBOX was used. Add a more robust workaround for present wait to deal with edge cases like these.