Skip to content
Snippets Groups Projects

WIP: unstable/drm-lease: DRM lease protocol support (help wanted)

Closed Simon Ser requested to merge emersion/wayland-protocols:drm-lease into main
2 unresolved threads

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.

Signed-off-by: Marius Vlad marius.vlad@collabora.com Signed-off-by: Drew DeVault sir@cmpwn.com


I'm mainly uploading the patch on GitLab for visibility. Marius and Drew have stopped working on this. Let me know if you're interested to step up.

There are unresolved discussions on the mailing list.

WIP implementations:

Edited by Simon Ser

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Simon Ser unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Simon Ser changed title from WIP: unstable/drm-lease: DRM lease protocol support to WIP (help wanted): unstable/drm-lease: DRM lease protocol support

    changed title from WIP: unstable/drm-lease: DRM lease protocol support to WIP (help wanted): unstable/drm-lease: DRM lease protocol support

  • Simon Ser marked as a Work In Progress

    marked as a Work In Progress

  • Simon Ser changed title from WIP (help wanted): unstable/drm-lease: DRM lease protocol support to WIP: unstable/drm-lease: DRM lease protocol support (help wanted)

    changed title from WIP (help wanted): unstable/drm-lease: DRM lease protocol support to WIP: unstable/drm-lease: DRM lease protocol support (help wanted)

  • Simon Ser changed the description

    changed the description

  • I have written a implementation for KWin (not up for review yet) and I'm generally interested into helping with this.

    I'm not overly qualified (never really did anything with wayland protocols) but aside from some small complaints about the exact protocol (that I'll add here later today) I think the overall design is good.

37 leasing, and by the client to negotiate a lease request.
38
39 Warning! The protocol described in this file is experimental and
40 backward incompatible changes may be made. Backward compatible changes
41 may be added together with the corresponding interface version bump.
42 Backward incompatible changes are done by bumping the version number in
43 the protocol and interface names and resetting the interface version.
44 Once the protocol is to be declared stable, the 'z' prefix and the
45 version number in the protocol and interface names are removed and the
46 interface version number is reset.
47 </description>
48
49 <enum name="error">
50 <entry name="stopped_device" value="0"
51 summary="request sent to a device which has been stopped"/>
52 </enum>
  • 141 The compositor will send this event to indicate the DRM ID which
    142 represents the underlying connector which is being offered. Note that
    143 the final lease may include additional object IDs, such as CRTCs and
    144 planes.
    145 </description>
    146 <arg name="connector_id" type="int" summary="DRM Connector ID" />
    147 </event>
    148
    149 <event name="withdrawn">
    150 <description summary="lease offer withdrawn">
    151 Sent to indicate that the compositor will no longer honor requests for
    152 DRM leases which include this connector. The client may still issue a
    153 lease request including this connector, but the compositor will send
    154 zwp_drm_lease_v1.finished without issuing a lease fd.
    155 </description>
    156 </event>
  • Implementation: KWaylandServer, KWin

    So how do we proceed here?

  • Someone needs to go through the discussions we had on the mailing list and address these. Then submit a new MR in this repo.

    There were some open questions wrt. Xwayland integration as well, IIRC.

    Another thing that would be desirable is to resume work on the Vulkan extension. We don't necessarily need the Vulkan extension to merge this protocol, however it would be unfortunate to settle on a protocol that ends up being incompatible with the Vulkan extension.

    Edited by Simon Ser
  • Okay, I'll give it a try.

  • Daniel Stone changed target branch from master to main

    changed target branch from master to main

  • Xaver Hugl mentioned in merge request !67 (merged)

    mentioned in merge request !67 (merged)

  • This has been superseded by !67 (merged) which was recently merged, so closing.

  • closed

  • Please register or sign in to reply
    Loading