drm_suballoc_new(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ drm_suballoc_new(9) ✨

okay so this is a page from the Kernel API Manual, and it's about drm_suballoc_new β€” the little function that goes "here bestie, have a chunk of that big allocation" πŸŽ€


πŸ’– NAME πŸ’–

drm_suballoc_new β€” make a suballocation. that's it, that's the whole vibe ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

struct drm_suballoc * drm_suballoc_new (struct drm_suballoc_manager
*sa_manager , size_t size , gfp_t gfp , bool intr , size_t align );

it gives you back a struct drm_suballoc *, no cap 🫢


🌸 ARGUMENTS 🌸

  • sa_manager β€” pointer to the sa_manager. literally just the manager you're carving your chunk out of πŸ‘‘
  • size β€” number of bytes we want to suballocate. like, how much you're asking for πŸ’…
  • gfp β€” the gfp flags used for memory allocation. typically GFP_KERNEL, but the argument is provided for suballocations from reclaim context, or where the caller wants to avoid pipelining rather than wait for reclaim. iykyk πŸ”₯
  • intr β€” whether to perform waits interruptible. this should typically always be true, unless the caller needs to propagate a non-interruptible context from above layers. so like… default to true, bestie πŸ™ˆ
  • align β€” alignment. must not exceed the default manager alignment. if align is zero, then the manager alignment is used. rules are rules 🌈

πŸ’œ DESCRIPTION πŸ’œ

try to make a suballocation of size size, which will be rounded up to the alignment specified in specified in drm_suballoc_manager_init. yes, the original says "specified in specified in" β€” that's the actual text, i'm not gonna lie to you 😭 (and yeah, that's drm_suballoc_manager_init doing the specifying, so keep that in your notes πŸ“)


⭐ RETURN ⭐

a new suballocated bo, or an ERR_PTR. so… check it, bestie, don't just rawdog it πŸ’€


πŸŽ€ SEE ALSO πŸŽ€

the whole suballoc friend group, obsessed 🫢


and that's the page!! this one came from the ./drivers/gpu/drm corner of the kernel, dated October 2026, in the Kernel API Manual β€” slay, go suballocate something responsibly πŸ’…βœ¨

πŸ“¦ where this page comes from