STRUCT DRM_MODE_GET_LEASE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay bestie, welcome to the Kernel API Manual β€” yes that's the manual name, and yes this page is a whole little struct, and no it is not boring, i promise 🫢


🌸 NAME 🌸

struct drm_mode_get_lease β€” Get Lease ✨ (that's it. that's the whole name. short, sweet, iconic.)


πŸŽ€ SYNOPSIS πŸŽ€

like, here's the vibe, literally copied character for character so u don't have to trust my memory:

struct drm_mode_get_lease {
    __u32 count_objects;
    __u32 pad;
    __u64 objects_ptr;
 };

three members. one struct. the way that it just sits there being useful πŸ’…


πŸ¦‹ Members πŸ¦‹

okay so these are the actual fields, and ngl they all pull their weight:

  • count_objects β€” Number of leased objects. πŸ“

and listen, this one is doing double duty, lowkey main character energy: on input it gives the length of the array. on output it gives the total number. no more than the input number will be written back, so u can do two calls β€” one to get the size, then one to get the data. that's the trick, iykyk. ✨

  • pad β€” Padding. literally just vibes and alignment, bestie. it is padding. that's the job. respect it πŸ™ˆ
  • objects_ptr β€” Pointer to objects. πŸ’œ

specifically a Pointer to __u32 array of object ids. so like, the actual goods live over there, this is just the address of the party πŸ”₯


🌈 Description 🌈

Get leased objects. πŸŽ€

that's the whole description. short king. it gets the leased objects, and it does it slayfully. periodt πŸ’…


⭐ SEE ALSO ⭐

okay this list is long but every single one is here, no cap, no skipping, we are not leaving anyone out of the group chat:

like... that's the whole extended universe right there πŸ§šπŸ’«


ok and before u go β€” this page lives in ./include/uapi/drm, and it's dated October 2026, so if ur reading this in the future, hi, hope the leases are leased πŸ’–

go get those object ids bestie, ur gonna do amazing πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from