drm_exec_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_exec_init (kernel API manual, section 9)

okay so bestie, welcome to drm_exec_init β€” the glow-up ritual where a drm_exec object gets born ✨


πŸŽ€ NAME πŸŽ€

drm_exec_init β€” initialize a drm_exec object. that's it, that's the whole vibe. it's giving "first step of the whole saga" energy πŸ‘‘


✨ SYNOPSIS ✨

void drm_exec_init (struct drm_exec *exec , u32 flags , unsigned nr );

three args, no drama, no return value (it's void, she doesn't owe you a status code πŸ’…).


πŸ¦‹ ARGUMENTS πŸ¦‹

  • exec β€” the drm_exec object you're about to initialize. this is the main character of the whole function, no cap 🫢
  • flags β€” controls locking behavior. go look at the DRM_EXEC_* defines for the full menu, iykyk πŸ”₯
  • nr β€” the initial # of objects. lowkey the starting headcount πŸ“

🌸 DESCRIPTION 🌸

So what does she actually do? She initializes the object and makes sure we can track locked objects. that's the whole job. tracking is literally the point, periodt πŸ’–

And about nr: if nr is non-zero, it gets used as the initial objects table size ✨. But either way β€” zero or not β€” the table will grow (which means it gets re-allocated) on demand. so like, don't stress about sizing it perfectly up front, she'll re-alloc when she needs to, slay 🌈

ngl the "re-allocated on demand" bit is the key takeaway: your table isn't fixed, it grows. that's the whole plot twist πŸ’€

πŸ” SEE ALSO πŸ”

like, the whole friend group honestly 🫢 go read them, they're all iconique πŸ‘‘


and that's the page!! 🧚 this lil manual drop lives in ./drivers/gpu/drm and is dated October 2026 β€” mwah, ily, go initialize something safely bestie πŸ’œπŸŽ€

πŸ“¦ where this page comes from