drm_exec_init(9)
π 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β thedrm_execobject you're about to initialize. this is the main character of the whole function, no cap π«Άflagsβ controls locking behavior. go look at theDRM_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 π
- Kernel file
./drivers/gpu/drm/drm_exec.c Overview(9)drm_exec_fini(9)drm_exec_cleanup(9)drm_exec_lock_obj(9)drm_exec_unlock_obj(9)drm_exec_prepare_obj(9)drm_exec_prepare_array(9)
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
- 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