Implement tearing with front buffer rendering
There's three reasons for why I want to do this:
- progress on the kernel side for tearing on atomic modesetting is moving at a glacial pace
- the currently proposed API is very limited. With front buffer rendering, you could do tearing without adhering to those limitations
- even ignoring API and driver problems there's also hardware limitations; some hardware can't do async pageflips at all, some can only do it if no overlays are in use etc
Front buffer rendering also has some disadvantages that need to be kept in mind:
- rendering directly to the front buffer can lead to very bad artifacts. We'd need to render to an offscreen buffer and blit that to the front buffer to reduce those, which introduces overhead
- when using tiled buffers, even a simple blit can potentially cause noticeable glitches. It might be a requirement to use a linear buffer for scanout
On the implementation side the complexity shouldn't be too high; the main things to consider are that this will introduce a shadow buffer again and that we need to avoid doing atomic commits that wouldn't actually update any planes because the same buffer is re-used.