DRM LEASING(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm leasing (Kernel API Manual bestie era) πŸ’…

okay so welcome to the Kernel API Manual page for drm leasing ✨ the whole vibe is this: DRM leases provide information about whether a DRM master may control a DRM mode setting object. This enables the creation of multiple DRM masters that manage subsets of display resources. slay.

The original DRM master of a device 'owns' the available drm resources. It may create additional DRM masters and 'lease' resources which it controls to the new DRM master. This gives the new DRM master control over the leased resources until the owner revokes the lease, or the new DRM master is closed. Some helpful terminology, bestie:

  • 'owner' β€” a struct drm_master that is not leasing objects from another struct drm_master, and hence 'owns' the objects. The owner can be identified as the struct drm_master for which drm_master.lessor is NULL.
  • 'lessor' β€” a struct drm_master which is leasing objects to one or more other struct drm_master. Currently, lessees are not allowed to create sub-leases, hence the lessor is the same as the owner.
  • 'lessee' β€” a struct drm_master which is leasing objects from some other struct drm_master. Each lessee only leases resources from a single lessor recorded in drm_master.lessor, and holds the set of objects that it is leasing in drm_master.leases.
  • 'lease' β€” a contract between the lessor and lessee that identifies which resources may be controlled by the lessee. All of the resources that are leased must be owned by or leased to the lessor, and lessors are not permitted to lease the same object to multiple lessees.

The set of objects any struct drm_master 'controls' is limited to the set of objects it leases (for lessees) or all objects (for owners). No cap.

Objects not controlled by a struct drm_master cannot be modified through the various state manipulating ioctls, and any state reported back to user space will be edited to make them appear idle and/or unusable. For instance, connectors always report 'disconnected', while encoders report no possible crtcs or clones. 🫠

Since each lessee may lease objects from a single lessor, display resource leases form a tree of struct drm_master. As lessees are currently not allowed to create sub-leases, the tree depth is limited to 1. All of these get activated simultaneously when the top level device owner changes through the SETMASTER or DROPMASTER IOCTL, so drm_device.master points to the owner at the top of the lease tree (i.e. the struct drm_master for which drm_master.lessor is NULL). The full list of lessees that are leasing objects from the owner can be searched via the owner's drm_master.lessee_idr. 🌈

✨ SEE ALSO ✨

  • Kernel file ./drivers/gpu/drm/drm_lease.c πŸ’–

xoxo, this page is brought to you by source/version: ./drivers/gpu/drm; date: October 2026; page: drm leasing(9) πŸ«ΆπŸ’…

πŸ“¦ where this page comes from