drm_suballoc_new(9)
β¨ 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. typicallyGFP_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. ifalignis 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 π
- Kernel file
./drivers/gpu/drm/drm_suballoc.c drm_suballoc_manager_init(9),drm_suballoc_manager_fini(9),drm_suballoc_event(9),drm_suballoc_alloc(9),drm_suballoc_insert(9),drm_suballoc_free(9)
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
- 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