linux_drm_syncobj_v1 ↗
Copyright
Copyright 2016 The Chromium Authors. Copyright 2017 Intel Corporation Copyright 2018 Collabora, Ltd Copyright 2021 Simon Ser Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- wp_linux_drm_syncobj_manager_v1 — global for providing explicit synchronization
- wp_linux_drm_syncobj_timeline_v1 — synchronization object timeline
- wp_linux_drm_syncobj_surface_v1 — per-surface explicit synchronization
protocol for providing explicit synchronization
This protocol allows clients to request explicit synchronization for buffers. It is tied to the Linux DRM synchronization object framework.
Synchronization refers to co-ordination of pipelined operations performed on buffers. Most GPU clients will schedule an asynchronous operation to render to the buffer, then immediately send the buffer to the compositor to be attached to a surface.
With implicit synchronization, ensuring that the rendering operation is complete before the compositor displays the buffer is an implementation detail handled by either the kernel or userspace graphics driver.
By contrast, with explicit synchronization, DRM synchronization object timeline points mark when the asynchronous operations are complete. When submitting a buffer, the client provides a timeline point which will be waited on before the compositor accesses the buffer, and another timeline point that the compositor will signal when it no longer needs to access the buffer contents for the purposes of the surface commit.
Linux DRM synchronization objects are documented at: https://dri.freedesktop.org/docs/drm/gpu/drm-mm.html#drm-sync-objects
Warning! The protocol described in this file is currently in the testing phase. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes can only be done by creating a new major version of the extension.
linux_drm_syncobj_v1
wp_linux_drm_syncobj_manager_v1
- destroy — destroy explicit synchronization factory object
- error
- get_surface — extend surface interface for explicit synchronization
- import_timeline — import a DRM syncobj timeline
global for providing explicit synchronization
This global is a factory interface, allowing clients to request explicit synchronization for buffers on a per-surface basis.
See wp_linux_drm_syncobj_surface_v1 for more information.
linux_drm_syncobj_v1
wp_linux_drm_syncobj_timeline_v1
- destroy — destroy the timeline
synchronization object timeline
This object represents an explicit synchronization object timeline imported by the client to the compositor.
linux_drm_syncobj_v1
wp_linux_drm_syncobj_surface_v1
- destroy — destroy the surface synchronization object
- error
- set_acquire_point — set the acquire timeline point
- set_release_point — set the release timeline point
per-surface explicit synchronization
This object is an add-on interface for wl_surface to enable explicit synchronization.
Each surface can be associated with only one object of this interface at any time.
Explicit synchronization is guaranteed to be supported for buffers created with any version of the linux-dmabuf protocol. Compositors are free to support explicit synchronization for additional buffer types. If at surface commit time the attached buffer does not support explicit synchronization, an unsupported_buffer error is raised.
As long as the wp_linux_drm_syncobj_surface_v1 object is alive, the compositor may ignore implicit synchronization for buffers attached and committed to the wl_surface. The delivery of wl_buffer.release events for buffers attached to the surface becomes undefined.
Clients must set both acquire and release points if and only if a non-null buffer is attached in the same surface commit. See the no_buffer, no_acquire_point and no_release_point protocol errors.
If at surface commit time the acquire and release DRM syncobj timelines are identical, the acquire point value must be strictly less than the release point value, or else the conflicting_points protocol error is raised.