Skip to content

Add wp_linux_drm_device protocol

Scott Anderson requested to merge ascent/wayland-protocols:drm-device into master

This protocol is very much still an RFC. Perhaps its more protocol boilerplate than it's worth. Future weston and/or wlroots implementations would come once it's decided whether this protocol is a good idea or not.

See also
!8 (merged)
https://lists.freedesktop.org/archives/wayland-devel/2019-June/040672.html


This protocol is a "shared infrastructure" for other protocols handling DRM devices. Currently dmabuf-hints and drm-leases are what this is intended for.

This is in the 'wp' namespace as it is generally applicable across all compositors.

This is a server-side global type of protocol, like wl_output is.

There are events for giving the path to the primary and render nodes. They are specified as paths into /dev/dri. Alternatively this could have been done as minor numbers or as a file descriptor. Each approach has its advantages, but looking through several other projects, DRM devices being found in /dev/dri is an assumption that is hardcoded in a lot of different places. Instead of worrying about sandboxes putting things in weird places, we just explicitly state that /dev/dri needs to be used. More than this would break if it wasn't. Flatpak already does this.

There is also a "dynamic property" describing how the device is being used.

The scanout bit says the device is the current DRM master. This is intended to be used for a DRM leasing protocol, and specifies whether it's valid to ask for a lease on that device. Due to VT switches, the compositor can gain/lose DRM master, so this usage event would be sent again.

The rendering bit could potentially help device selection in some clients, by telling them the ones they should ignore.

Signed-off-by: Scott Anderson scott@anderso.nz

Edited by Scott Anderson

Merge request reports

Loading