Avoid tearing on tiled displays

This replaces !4771 (closed)

Tiled displays, like the LG UltraFine 5K, are supported in mutter, but their updates are not synchronized, which leads to tearing.

Based on feedback from the previous MR (!4771 (closed)), this series introduces a new class, MetaRenderTarget, and some helper functions for it. MetaRenderTarget holds N (N >= 1) MetaCrtc and MetaOutput objects. Objects that held a CRTC before, like MetaOnscreenNative can now hold a MetaRenderTarget.

This series also adjusts the Framebuffer for a tiled display to cover the whole display, which also implies that there is just one frame clock for the tiled display.

The new behavior is the default, but by setting the environment variable TILE_EN=0, it should fall back to the old behavior (one framebuffer per CRTC).

In my testing all tests pass, both with new behavior and TILE_EN=0, but I will watch any new pipelines here and address any issues that arise.

I will add that I'm daily driving this series on my own laptop running Fedora 43 and it's a great improvement: no more tearing!

I would really appreciate a review and any feedback at this point. Thanks to the folks here for all your hard work!

Fixes #1722

Edited by adlr

Merge request reports

Loading