drm_exec_prepare_array(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_exec_prepare_array(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ β€” yes we're in the kernel docs now, and honestly? we're thriving. this one's all about drm_exec_prepare_array, which is literally the helper that prepares a whole array of objects for you. no cap. 🫢


✨ NAME ✨

drm_exec_prepare_array β€” the helper to prepare an array of objects 🌸


πŸŽ€ SYNOPSIS πŸŽ€

int drm_exec_prepare_array (struct drm_exec *exec , struct
       drm_gem_object **objects , unsigned int num_objects , unsigned int
       num_fences );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • exec β€” the drm_exec object holding the state, she's the main character here πŸ‘‘
  • objects β€” array of GEM objects to prepare, the whole squad πŸ“
  • num_objects β€” how many GEM objects are in that array, like, the headcount
  • num_fences β€” number of fences to reserve on each GEM object πŸ”₯

πŸ’– DESCRIPTION πŸ’–

So what it does is prepare all the GEM objects in an array β€” the entire lineup, not just one β€” and it aborts on the first error, like "nope, we're done here" πŸ’€. After locking each GEM object, it reserves num_fences on it. periodt. πŸ’…


πŸ”₯ RETURN πŸ”₯

  • -EDEADLOCK β€” on contention (it's giving drama 😭)
  • -EALREADY β€” when the object is already locked
  • -ENOMEM β€” when memory allocation failed
  • 0 β€” for success ✨ slay

🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/drm_exec.c Overview(9), drm_exec_init(9), drm_exec_fini(9), drm_exec_cleanup(9), drm_exec_lock_obj(9), drm_exec_unlock_obj(9), drm_exec_prepare_obj(9) β€” go read them, iykyk πŸ“š


and that's the page, bestie! 🧚 this gorgeous little manual comes from ./drivers/gpu/drm and it's dated October 2026 β€” literally iconic, no notes πŸ’œπŸŽ€

πŸ“¦ where this page comes from