Skip to content

Support zwp_buffer_release_v1.fenced_release for buffers backing KMS planes

Previously, buffers that we used directly as the content of KMS planes were only able to emit zwp_buffer_release_v1.immediate_release events. This MR adds support for fenced_release events for such cases, too. The fence used as the release fence originates from the KMS out fence of the next atomic commit.

The second to last commit in this MR adds release fence support, but the fenced_release event will be still emitted at the same time as the previous immediate_release event.

The last commit is an attempt to release the buffer earlier, which I am posting as an RFC commit, since I am still unsure about its correctness under all scenarios.

For testing I used a hacked version of simple-dmabuf-egl. The current version unfortunately can't be used to test this, since all its buffers end up being GL rendered for two reasons: 1. Using the dmabuf Y_INVERT flag, not currently supported by compositor-drm 2. The selected format+modifiers may not be scanout-able. There are workarounds for these, which may be worth implementing so that we have an easy way to test the KMS plane release fence scenario.

Edited by Daniel Stone

Merge request reports