STRUCT DRM_MODE_CREATE_LEASE(9)
π 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, likeO_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 newdrm_masterfile. 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:
overview(9)struct drm_mode_modeinfo(9)struct drm_mode_get_plane(9)struct drm_mode_get_connector(9)struct drm_mode_property_enum(9)struct drm_mode_get_property(9)struct drm_mode_fb_cmd2(9)enum drm_colorop_type(9)enum drm_colorop_lut3d_interpolation_type(9)enum drm_colorop_lut1d_interpolation_type(9)struct drm_plane_size_hint(9)struct hdr_metadata_infoframe(9)struct hdr_output_metadata(9)DRM_MODE_PAGE_FLIP_EVENT(9)DRM_MODE_PAGE_FLIP_ASYNC(9)DRM_MODE_PAGE_FLIP_FLAGS(9)struct drm_mode_create_dumb(9)DRM_MODE_ATOMIC_TEST_ONLY(9)DRM_MODE_ATOMIC_NONBLOCK(9)DRM_MODE_ATOMIC_ALLOW_MODESET(9)DRM_MODE_ATOMIC_FLAGS(9)struct drm_mode_create_blob(9)struct drm_mode_destroy_blob(9)struct drm_mode_list_lessees(9)struct drm_mode_get_lease(9)struct drm_mode_revoke_lease(9)struct drm_mode_rect(9)struct drm_mode_closefb(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms