xf86-video-modesetting X.Org Driver Sees Patch For "TearFree" Page Flipping

Written by Michael Larabel in X.Org on 30 November 2022 at 04:15 PM EST. 10 Comments
X.ORG
While several X.Org DDX drivers in the past have implemented a "TearFree" xorg.conf driver option to try to eliminate screen tearing when running an X.Org Server without a composited environment, the xf86-video-modesetting generic DDX that is widely used has lacked that option. That is until a developer finally stepped up and has pending support for the "TearFree" option.

Hardware-specific DDX drivers like xf86-video-amdgpu and the long unmaintained xf86-video-intel drivers have long offered a "TearFree" option in an attempt to provide tear-free screen rendering by engaging hardware-specific page-flipping mechanisms. But these days the xf86-video-modesetting DDX is increasingly being used for those still relying upon an X.Org Server and particularly if not using a composited window manager the screen tearing can still be an issue on the Linux desktop as we approach 2023.


Independent developer Sultan Alsawaf has managed to write a generic TearFree implementation for the xf86-vide-modesetting driver that can be optionally enabled. Sultan summarized the work as:
This adds support for TearFree page flips to eliminate tearing without the use of a compositor. It allocates two shadow buffers for each CRTC, a back buffer and a front buffer, and uses damage tracking to minimize excessive copying between buffers and skip unnecessary flips when the screen's contents remain unchanged. It works on transformed screens too, such as rotated and scaled CRTCs.

TearFree doesn't allow DRI clients to perform page flips since TearFree already performs page flips itself, and TearFree flips are preferable since they utilize damage tracking, whereas DRI flips do not.

TearFree is disabled by default.

The TearFree support for this DDX driver is around 300 lines of new code and is currently pending review via this X.Org Server merge request.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week