drm_vma_offset_add(9)
π drm_vma_offset_add(9) π
okay so bestie, we're in the Kernel API Manual today and this page is literally called drm_vma_offset_add(9) β a whole little function about adding offset nodes to a manager. stay with me, it's gonna slay π«Ά
β¨ NAME β¨
drm_vma_offset_add β add an offset node to the manager, no cap π
β¨ SYNOPSIS β¨
int drm_vma_offset_add (struct drm_vma_offset_manager *mgr , struct
drm_vma_offset_node *node , unsigned long pages );
yes that's the whole signature, write it down, it's iconic β¨
π¦ ARGUMENTS π¦
mgrβ the manager object itself. the main character of this whole operation πnodeβ the node you're adding. like, the thing that's about to be added πpagesβ the allocation size that user-space actually gets to see, measured in number of pages. not bytes, bestie, pages π
πΈ DESCRIPTION πΈ
okay so the whole vibe here: you're adding a node to the offset-manager. that's it, that's the function π
if the node was already added, this does absolutely nothing and returns 0. like, no drama, no error, just a chill "already handled it" situation π
pages is the size of the object, given in number of pages. and after this call succeeds? you can access the offset of the node until it is removed again. so keep that in mind, because that access window is real π¦
now, if this call fails, it's totally safe to either retry the operation or call drm_vma_offset_remove β whichever you feel like. and the best part? there's no cleanup required in that case. none. zero. you're free π
one more thing that lowkey matters a lot: pages is not required to be the same size as the underlying memory object you want to map. it only limits the size that user-space can map into their own address space. so it's a cap, not a mirror β
π₯ RETURN π₯
0on success β slay β¨- a negative error code on failure β not slay π
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/drm_vma_manager.cβvma offset manager(9) drm_vma_offset_manager_init(9)drm_vma_offset_manager_destroy(9)drm_vma_offset_lookup_locked(9)drm_vma_offset_remove(9)drm_vma_node_allow(9)drm_vma_node_allow_once(9)drm_vma_node_revoke(9)drm_vma_node_is_allowed(9)
fr fr go read those if you want the full lore, iykyk π
and that's the page bestie! this whole thing lives in ./drivers/gpu/drm and the manual is dated October 2026 β so yes, it's from the future and still eating π
π«Ά see you in the next man page β
π¦ 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