Skip to content

Initial support for DRM async page flip v2#1948

Open
cmeissl wants to merge 3 commits intomasterfrom
feature/async_pageflip
Open

Initial support for DRM async page flip v2#1948
cmeissl wants to merge 3 commits intomasterfrom
feature/async_pageflip

Conversation

@cmeissl
Copy link
Copy Markdown
Collaborator

@cmeissl cmeissl commented Feb 28, 2026

Description

This is based on #1335, but takes a slightly different route.
Instead of calculating the PresentationMode inside DrmCompositor::render_frame it expects to receive
the desired mode.

This should allow the following things:

  • more stable async page flip handling
    the implicit handling might not have enough information about user-preference and calculating it
    per frame could result in flip-flip between sync and async page flip which should be avoided imo
  • implicit disable overlay planes (potentially allowing them in a future PR)
    this should increase the chance that we can fulfill the async request
  • keep the decision a compositor policy

Note: This won't work as is on some intel hardware, because not all formats support async page flips.
I will try to come up with a solution, but that can wait for another day.

There is also a new environment variable in anvil to test this, running with ANVIL_FORCE_TEARING=1 should
enable it.

@PolyMeilex I opened a separate PR because I did not like to overwrite your wonderful work, but I kept you
as the main author. I hope you don't mind.

Checklist

@cmeissl cmeissl force-pushed the feature/async_pageflip branch 4 times, most recently from 34c75fb to 5d6e9d7 Compare February 28, 2026 21:43
@cmeissl cmeissl mentioned this pull request Mar 1, 2026
1 task
@PolyMeilex
Copy link
Copy Markdown
Member

Works as expected on my integrated AMD Radeon cards 👌

@EmanuelKroell
Copy link
Copy Markdown

Works as expected in Niri with very minor changes to it on AMD :) Thank you for the good work

@urayde
Copy link
Copy Markdown

urayde commented Apr 5, 2026

Using #1946 + #1949 on NVIDIA Turing (with the nvidia-open proprietary driver) works fine, both on niri and anvil.

Worth noting that DRM debugger reports the following message:
[drm:drm_atomic_check_prop_changes] [PROP:18:IN_FENCE_FD] No prop can be changed during async flip
Couldn't reproduce it on other compositors such as Sway or Hyprland.

@shibahaczix
Copy link
Copy Markdown

I've been waiting for this for so long... 🥹

@cmeissl cmeissl force-pushed the feature/async_pageflip branch from 5d6e9d7 to 80c793c Compare April 9, 2026 18:49
Co-Authored-By: Christian Meissl <meissl.christian@gmail.com>
@cmeissl cmeissl force-pushed the feature/async_pageflip branch from 80c793c to f8a8f0f Compare April 9, 2026 18:55
@cmeissl cmeissl marked this pull request as ready for review April 9, 2026 18:56
@cmeissl
Copy link
Copy Markdown
Collaborator Author

cmeissl commented Apr 9, 2026

IN_FENCE_FD

Hm, IN_FENCE_FD was excluded from the things that are allowed to change, yeah. But as far as I know this limitation has been removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants