STRUCT DRM_MODE_CREATE_LEASE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct drm_mode_create_lease(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” yes we're reading kernel docs together, this is our bonding time, and honestly? it's giving main character energy. sit down, grab a strawberry πŸ“, and let's talk about making a lease. no not an apartment lease, a drm lease. iykyk.


✨ NAME ✨

struct drm_mode_create_lease β€” literally just: Create lease πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the vibe, copy it exactly pls, no typos in my house:

struct drm_mode_create_lease {
    __u64 object_ids;
    __u32 object_count;
    __u32 flags;
    __u32 lessee_id;
    __u32 fd;
 };

🌸 Members 🌸

the whole squad, one by one:

  • object_ids β€” a Pointer to an array of object ids, and those ids are __u32. your little list of faves πŸ’…
  • object_count β€” the Number of object ids. yes, you have to count them. yes, it matters.
  • flags β€” the flags for the new FD, like O_CLOEXEC, etc. little settings for your shiny new file descriptor ✨
  • lessee_id β€” Return: a unique identifier for the lessee. that's you, you're the lessee, you're iconic πŸ‘‘
  • fd β€” Return: the file descriptor to the new drm_master file. your ticket, your golden pass 🎟️

πŸ’œ Description πŸ’œ

so what does it do? it Leases mode resources, which creates another drm_master. that's the whole thing. two masters, one vibe. 🫢

but β€” and this is the part where you gotta pay attention ngl β€” the object_ids array must reference at least one CRTC, one connector and one plane if DRM_CLIENT_CAP_UNIVERSAL_PLANES is enabled. all three. no skipping. 🚨

alternatively (and this is so funny to me), the lease can be completely empty. empty lease supremacy. zero objects, zero problems. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

the extended universe, the whole friend group, the lore β€” read these next bestie, they're all linked from Kernel file ./include/uapi/drm/drm_mode.h:


that's the whole page bestie, you ate that fr fr πŸ’…βœ¨

so like, this came from ./include/uapi/drm and it's dated October 2026 β€” yes, the future. we're reading future docs. slay. πŸ¦‹πŸŒˆβ­ and the page name is struct drm_m...create_lease(9) if you ever need to cite it, but honestly just tell people you know kernel drm now. periodt. πŸ’–

πŸ“¦ where this page comes from