Atomic Async Page Flips Proposed, Valve's Gamescope Compositor Has Support Pending

Written by Michael Larabel in Valve on 25 August 2022 at 06:15 AM EDT. 9 Comments
VALVE
Async page flipping via DRM_MODE_PAGE_FLIP_ASYNC has been available with the Direct Rendering Manager's legacy API but hasn't been supported by the atomic mode-setting interface. However, a proposed patch series would add that atomic async flip support and wire it up initially for the AMDGPU DRM driver. Meanwhile Valve's Gamescope compositor in user-space would be ready to make use of it.

DRM_MODE_PAGE_FLIP_ASYNC has been part of the Linux kernel for nearly a decade but hasn't been wired up for the modern DRM/KMS driver code path with atomic commits. Going this route for atomic async page flips can help with better performance by not waiting for a vblank but at the possibility of on-screen tearing. Simon Ser sent out this patch series with "gaming use-cases" in mind.

Besides the DRM core changes for dealing with async page-flips via the atomic user-space API, the patch series ends with enabling the atomic async page-flips capability for the AMDGPU driver with GPUs supporting Display Core Next (DCN). The patch series was tested with an unnamed AMD Picasso APU's integrated graphics.

Further tieing the motivation for the kernel patch series into benefiting Valve's Linux gaming push is that there is already patches pending for their Gamescope compositor. This pull request for the Gamescope compositor was opened yesterday and would add an "--immediate-flips" option. Running in the immediate flips mode would set DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP for supported drivers/hardware to possibly improve the gaming performance but at the risk of screen tearing.


This immediate flipping mode could obviously be of much interest to Steam Deck users with Gamescope, in addition to traditional Linux desktop gaming. For the moment the kernel patches are just sitting on the mailing list while we'll see if there is enough interest and approval for getting them into DRM-Next ahead of the v6.1 cycle.
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