drm_suballoc_insert(9)
π drm_suballoc_insert(9)
okay so this is a page from the Kernel API Manual β it's the drm_suballoc_insert(9) manual, and we are literally about to make it make sense π«Ά
TL;DR: initialize a suballocation and insert a hole. That's the whole vibe. β¨
π SYNOPSIS π
int drm_suballoc_insert (struct drm_suballoc_manager *sa_manager ,
struct drm_suballoc *sa , size_t size , bool intr , size_t align );
no cap, that's the signature, copy it exactly bestie π
πΈ ARGUMENTS πΈ
sa_managerβ pointer to thesa_manager. your manager. the one in charge πsaβ Thestruct drm_suballoc. yes that one πsizeβ number of bytes we want to suballocate. how much you're claiming, in bytes πintrβ Whether to perform waits interruptible. and listen, this should typically always be true β οΈ β the only exception is if the caller needs to propagate a non-interruptible context from above layers. so like, don't just set it to false for funsies πalignβ Alignment. Must not exceed the default manager alignment, fr fr. Ifalignis zero, then the manager alignment is used. zero = "you pick for me" energy π¦
β¨ DESCRIPTION β¨
Try to make a suballocation on a pre-allocated suballoc object of size size β and that size will be rounded up to the alignment specified in drm_suballoc_manager_init. it's giving "close enough, we'll pad it" πβ¨
π₯ RETURN π₯
zero on success, errno on failure. so if you get 0, you ate. if you get an errno, that's your sign to go read the errno πΈ
π SEE ALSO π
Kernel file ./drivers/gpu/drm/drm_suballoc.c β go read the source, iykyk π
drm_suballoc_manager_init(9)drm_suballoc_manager_fini(9)drm_suballoc_event(9)drm_suballoc_alloc(9)drm_suballoc_new(9)drm_suballoc_free(9)
bestie reminder: align must not exceed the default manager alignment. that's not a suggestion, that's a rule π
okay that's the whole page!! mwah π this one came from ./drivers/gpu/drm, dated October 2026 β go forth and suballocate responsibly, you're gonna slay π§ββοΈβ
π¦ 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