[PATCH] unstable/drm-lease: DRM lease protocol support
ppaalanen at gmail.com
Fri Jun 28 07:52:43 UTC 2019
On Thu, 27 Jun 2019 15:46:27 -0400
Drew DeVault <sir at cmpwn.com> wrote:
> From: Marius Vlad <marius-cristian.vlad at nxp.com>
> Simple protocol extension to manage DRM lease. Based on the work by Keith
> Packard in , respectively .
>  https://cgit.freedesktop.org/mesa/drm/commit/?id=c4171535389d72e9135c9615cecd07b346fd6d7e
>  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v4.15-rc9&id=62884cd386b876638720ef88374b31a84ca7ee5f
> Signed-off-by: Marius Vlad <marius-cristian.vlad at nxp.com>
> Signed-off-by: Drew DeVault <sir at cmpwn.com>
you write a lot of good explanations and rationale below, but then you
mark it to be ignored by git-am so it will never end up in the commit
message. I think that would be a loss. Don't be afraid to add "too
much" rationale in commit messages, it cannot hurt (it's not in the
code that people will read repeatedly and it doesn't need maintaining),
but it certainly can help posterity when questions arise.
> This updates Marius's original patch series implementing DRM leasing for
> Wayland. This cleans up the XML style, reworks resource lifetimes, adds
> a little link to xdg-output, and a few other changes.
> A server-side implementation of this protocol is under development and
> available here:
> I've also rigged up Keith Packard's kmscube fork to support leasing from
> Wayland instead of X:
> Run `./kmscube -l` to test it. While doing the research for this
> protocol there was also some discussions in wlroots which may be
> 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
> 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.
> Previously there were some musings about the security considerations.
> This version of the protocol allows the compositor to consider the lease
> request in its own time, perhaps presenting the user with a dialog to
> consent to the lease. Additionally, leased connectors can be added and
> removed at the compositor's whim, and race conditions have been
> considered to avoid disagreement between the client and compositor as to
> which connectors are available for lease - the compositor being the
> ultimate authority.
> In the coming weeks I intend to work on patches for Vulkan and Xwayland
> adding support for this protocol, respectively to allow Vulkan clients
> to utilize DRM leasing on Wayland and to allow X11 clients utilizing the
> xrandr lease request to fulfill their leases through Xwayland.
> Makefile.am | 1 +
> unstable/drm-lease/README | 4 +
> unstable/drm-lease/drm-lease-unstable-v1.xml | 203 +++++++++++++++++++
> 3 files changed, 208 insertions(+)
> create mode 100644 unstable/drm-lease/README
> create mode 100644 unstable/drm-lease/drm-lease-unstable-v1.xml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the wayland-devel