[PATCH v6] unstable/drm-lease: DRM lease protocol support
Pekka Paalanen
ppaalanen at gmail.com
Tue Sep 3 08:51:51 UTC 2019
On Tue, 03 Sep 2019 00:15:56 +0200
Sebastian Wick <sebastian at sebastianwick.net> wrote:
> On 2019-07-30 14:53, Drew DeVault wrote:
> > From: Marius Vlad <marius.vlad at collabora.com>
> >
> > 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.
>
> Talking about use-cases, I'm evaluating leasing for display calibration
> and profiling which requires leasing outputs which are are part of the
> desktop and also requires user interaction (keyboard, mice). Are there
> any ideas on how something like that would work?
>
> I think it would be great if it worked similar to fullscreen surfaces
> but input handling depends on having a surface but leasing an output is
> independent.
Hi,
sorry, I don't think that would work.
Your measurement app must become a KMS app, which is something other
color management people seemed to be quite opposed of. Compositors
probably would not allow leasing outputs used for the desktop. You
would not be able to get any input unless you had another output still
controlled by the compositor where to show a window, or you had access
to the kernel input devices which you don't.
If you want to write a KMS app for measurements, I'd recommend making
it a stand-alone app, not something using DRM leases. That way you can
assume there is no other program (usually a display server) already
running and owning the input and output devices.
DRM leasing is for kernel device access, not a fancy way to run an app
fullscreen.
Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20190903/20d804be/attachment.sig>
More information about the wayland-devel
mailing list