Go to index / Go to protocols

weston_direct_display ↗

weston_direct_display
weston_direct_display_v1

Version 2
Compositor Support
Version 1
weston 15.0.1

weston direct display

Weston extension to instruct the compositor to avoid any import of the dmabuf created by 'linux-dmabuf' protocol other than the display controller.

Compositors are already going to use direct scan-out as much as possible but there's no assurance that while doing so, they won't first import the dmabuf in to the GPU. This extension assures the client that the compositor will never attempt to import in to the GPU and pass it directly to the display controller.

Clients can make use of this extension to pass the dmabuf buffer to the display controller, potentially increasing the performance and lowering the bandwidth usage.

Lastly, clients can make use of this extension in tandem with content-protection one thus avoiding any GPU interaction and providing a secure-content path. Also, in some cases, the memory where dmabuf are allocated are in specially crafted memory zone which would be seen as an illegal memory access when the GPU will attempt to read it.

WARNING: This interface by design might break screenshoting functionality as compositing might be involved while doing that. Also, do note, that in case the dmabufer provided can't be imported by KMS, the client connection will be terminated.

WARNING: This extension requires 'linux-dmabuf' protocol and 'zwp_linux_buffer_params_v1' be already created by 'zwp_linux_buffer_v1'.

weston_direct_display_v1
enum error {
    params_already_used = 0,
    already_set = 1,
}
Available since version 2
  • params_already_used — dmabuf params already used
  • already_set — already set
weston_direct_display_v1
request enable(
    dmabuf: object<zwp_linux_buffer_params_v1>,
)
  • dmabuf — enable direct-display for dmabuf buffer

forward buffer to display controller

This request tells the compositor not to import the dmabuf to the GPU in order to bypass it entirely, such that the buffer will be directly scanned-out by the display controller. If HW is not capable/or there aren't any available resources to directly scan-out the buffer, a placeholder should be installed in-place by the compositor. The compositor may perform checks on the dmabuf and refuse to create a wl_buffer if the dmabuf seems unusable for being used directly.

Assumes that 'zwp_linux_buffer_params_v1' was already created by 'zwp_linux_dmabuf_v1_create_params'.

weston_direct_display_v1
request destroy()
Destructor

    destroy factory object

    Destroys the factory object, but does not affect any other objects.