Skip to content

feat: add linux-drm-syncobj-v1 support#3956

Open
ewgdg wants to merge 1 commit into
niri-wm:mainfrom
ewgdg:feat/linux-drm-syncobj-v1
Open

feat: add linux-drm-syncobj-v1 support#3956
ewgdg wants to merge 1 commit into
niri-wm:mainfrom
ewgdg:feat/linux-drm-syncobj-v1

Conversation

@ewgdg
Copy link
Copy Markdown

@ewgdg ewgdg commented May 2, 2026

Adds linux-drm-syncobj-v1 support for dmabuf-backed surfaces.

  • Exposes the protocol when the DRM import device supports syncobj eventfd.
  • Uses syncobj acquire points as commit blockers.
  • Falls back to the existing implicit dmabuf blocker path when no acquire point is pending.

Closes #843

Testing

  • Ran cargo tests.
  • Ran niri on DRM backend; journal shows exposing DRM syncobj protocol.
  • Tested an Xwayland Proton game (Diablo IV) on an NVIDIA GPU; it previously froze and no longer freezes with this change.

Not tested:

  • VT switch / suspend-resume / hotplug.

This PR intentionally keeps drm-syncobj support separate from the delayed-blocker / transaction cleanup work in #1449 / Smithay#1720. The acquire-point / dmabuf readiness logic is encapsulated in the dmabuf_readiness module, while the existing pre-commit hook structure stays mostly unchanged. That keeps the code shape close to the current implementation and should avoid making a future delayed-blocker / transaction cleanup harder.

@sabisho
Copy link
Copy Markdown

sabisho commented May 2, 2026

finally!

@mati865
Copy link
Copy Markdown

mati865 commented May 2, 2026

Cc previous attempt in #1792

@witchlliee
Copy link
Copy Markdown

Can't wait for fifo as well! Thank you for this.

@ewgdg
Copy link
Copy Markdown
Author

ewgdg commented May 2, 2026

I reviewed some of the previous attempts, including cmeissl’s work, before opening this PR. My read is that the Smithay delayed-blocker change is an elegant way to model niri’s transaction handling and reduce duplicated pre-commit hook handling, but it is orthogonal to drm-syncobj itself. I think it is valuable enough to be handled as a separate PR rather than making explicit sync depend on it.

To make the split more concrete: #1449 was opened as a PoC and tracks Smithay#1720, which changes the transaction/blocker model. That seems like a broader compositor/Smithay design change rather than a requirement for exposing linux-drm-syncobj-v1 itself. Because Smithay#1720 is still draft, tying drm-syncobj to it also ties this feature to a larger external review path.

This PR is intentionally aiming for the least intrusive path for drm-syncobj support. The acquire-point / dmabuf readiness logic is encapsulated in the dmabuf_readiness module, while the existing pre-commit hook structure stays mostly unchanged. That keeps the code shape close to the current implementation and should avoid making a future delayed-blocker / transaction cleanup harder.

@Sempyos Sempyos added area:wayland Wayland protocols, problems with Wayland handling pr kind:feature New features and functionality labels May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:wayland Wayland protocols, problems with Wayland handling pr kind:feature New features and functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explicit sync/drm-syncobj support

5 participants