staging/drm-lease: DRM lease protocol support
DRM leasing is a feature which allows the DRM master to "lease" a subset of its DRM resources to another DRM master via drmModeCreateLease, which returns a file descriptor for the new DRM master. We use this protocol to negotiate the terms of the lease and transfer this file descriptor to clients.
In less DRM-specific terms: this protocol allows Wayland compositors to give over their GPU resources (like displays) to a Wayland client to exclusively control.
The primary use-case for this is Virtual Reality headsets, which via the non-desktop DRM property are generally not used as desktop displays by Wayland compositors, and for latency reasons (among others) are most useful to games et al if they have direct control over the DRM resources associated with it. Basically, these are peripherals which are of no use to the compositor and may be of use to a client, but since they are tied up in DRM we need to use DRM leasing to get them into client's hands.
wlroots: https://github.com/swaywm/wlroots/pull/2821, Sway: https://github.com/swaywm/sway/pull/6159
- wlroots: https://github.com/swaywm/wlroots/pull/2929, Sway: https://github.com/swaywm/sway/pull/6284
- KWin: https://invent.kde.org/plasma/kwin/-/merge_requests/662, KWaylandServer: https://invent.kde.org/plasma/kwayland-server/-/merge_requests/163
- Vulkan extension:
https://github.com/KhronosGroup/Vulkan-Docs/pull/1001 https://github.com/KhronosGroup/Vulkan-Docs/pull/1450https://github.com/KhronosGroup/Vulkan-Docs/pull/1529 (merged)