drm_gpuva_insert(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_gpuva_insert(9) β€” from the Kernel API Manual (yes bestie, the kernel has a manual and it's iconic)

okay so real talk, this is a page straight out of the Kernel API Manual, and it's about exactly one thing: shoving a &drm_gpuva into a drm_gpuvm. tiny function, big main character energy. let's get into it 🫢


✨ NAME ✨

drm_gpuva_insert β€” literally just "insert a &drm_gpuva". that's the whole name. no notes. πŸ’…


🌸 SYNOPSIS 🌸

int drm_gpuva_insert (struct drm_gpuvm *gpuvm , struct drm_gpuva *va );

two pointers in, one int out. she's simple, she's elegant, she ate. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • gpuvm β€” the drm_gpuvm that our little drm_gpuva is getting inserted into. this is the house 🏠
  • va β€” the drm_gpuva itself, the one doing the moving-in. this is the new roommate πŸ¦‹

πŸ’– DESCRIPTION πŸ’–

so what she actually does: she inserts a drm_gpuva β€” one that already has a given address and range β€” into a drm_gpuvm. address? check. range? check. into the gpuvm? slayed. πŸ‘‘

and here's the part you need to know: it is safe to use this function while you're iterating the GPU VA space using the safe versions of the iteration helpers, specifically drm_gpuvm_for_each_va_safe and drm_gpuvm_for_each_va_range_safe. like, you can be mid-loop and insert and it's not gonna blow up on you. no cap. πŸ”₯

bestie please internalize that: safe iterators = you're allowed to call this. that's the vibe check that matters here. 🧚

⭐ RETURN ⭐

  • 0 on success πŸŽ‰
  • a negative error code on failure 😭

🌈 SEE ALSO 🌈

the whole extended friend group, fr fr β€” go read these too:


okay that's the whole page, you're officially educated πŸ’œ this little beauty lives in ./drivers/gpu/drm, dated October 2026 β€” so go forth, insert your gpuva, and remember: 0 means success, negative means go touch grass and read your error codes. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from