drm_gpuvm_prepare_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ drm_gpuvm_prepare_range(9) ✨

okay so this is a page from the Kernel API Manual, and bestie, it's about preparing all the BOs mapped inside a given range. it's giving "get your whole friend group ready before the group photo" energy ngl πŸ’…


🌸 NAME 🌸

drm_gpuvm_prepare_range β€” prepare all BOs mapped within a given range


πŸŽ€ SYNOPSIS πŸŽ€

int drm_gpuvm_prepare_range (struct drm_gpuvm *gpuvm , struct drm_exec
*exec , u64 addr , u64 range , unsigned int num_fences );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gpuvm β€” the drm_gpuvm πŸ’– like, the actual GPU VM we're working with
  • exec β€” the drm_exec locking context ✨ your ticket to the lock party
  • addr β€” the start address within the VA space πŸ“
  • range β€” the range to iterate within the VA space 🧚
  • num_fences β€” the amount of dma_fences to reserve πŸ”₯ no cap, this number matters

πŸ’œ DESCRIPTION πŸ’œ

So what it does: it calls drm_exec_prepare_obj for all drm_gem_objects mapped between addr and addr + range πŸ’« and if num_fences is zero, drm_exec_lock_obj is called instead. that's the whole vibe check β€” one little branch, two paths, both iconic πŸ‘‘


⭐ RETURN ⭐

0 on success, negative error code on failure. periodt. πŸ’…

fr fr, if you get a negative number back, something went sideways β€” that's your sign 🫢

🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/drm_gpuvm.c β€” and honestly the whole extended fam:

like, that's a whole contact list, iykyk πŸ“


and that's the page!! πŸŽ€ source is ./drivers/gpu/drm, dated October 2026 β€” mwah, go read some more manpages bestie, ily πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from