drm_gpuvm_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ drm_gpuvm_init(9) ✨

okay bestie, welcome to the Kernel API Manual πŸ’… this one is drm_gpuvm_init β€” the function that literally brings your &drm_gpuvm to life. no cap, it's the setup step, so pay attention 🫢


πŸ’– NAME πŸ’–

drm_gpuvm_init β€” initialize a &drm_gpuvm 🌸


πŸŽ€ SYNOPSIS πŸŽ€

void drm_gpuvm_init (struct drm_gpuvm *gpuvm , const char *name , enum
drm_gpuvm_flags flags , struct drm_device *drm , struct drm_gem_object
*r_obj , u64 start_offset , u64 range , u64 reserve_offset , u64
reserve_range , const struct drm_gpuvm_ops *ops );

πŸ¦‹ ARGUMENTS πŸ¦‹

like, ten whole parameters. she's high-maintenance but iconic πŸ‘‘

  • gpuvm β€” pointer to the drm_gpuvm you're initializing. this is the main character of the whole function ✨
  • name β€” the name of the GPU VA space 🏷️
  • flags β€” the drm_gpuvm_flags for this GPUVM 🚩
  • drm β€” the drm_device this VM resides in πŸ–₯️
  • r_obj β€” the resv drm_gem_object providing the GPUVM's common dma_resv πŸ”’
  • start_offset β€” the start offset of the GPU VA space πŸ“
  • range β€” the size of the GPU VA space πŸ“
  • reserve_offset β€” the start of the kernel reserved GPU VA area 🧚
  • reserve_range β€” the size of the kernel reserved GPU VA area 🎯
  • ops β€” drm_gpuvm_ops called on drm_gpuvm_sm_map / drm_gpuvm_sm_unmap πŸ› οΈ

🌈 DESCRIPTION 🌈

so basically: the drm_gpuvm must be initialized with this function before use. like, no initialization = no vibes. it's giving mandatory pre-req πŸ’€

⚠️ important bestie alert: note that gpuvm must be cleared to 0 before calling this function. fr fr, zero it out first. and the given name is expected to be managed by the surrounding driver structures β€” so don't go freeing it all willy-nilly, that's the driver's job πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group πŸ’œ go read these:


and that's the whole page, bestie πŸ“ this lil manual came from ./drivers/gpu/drm, dated October 2026 β€” so go forth and initialize responsibly πŸ’« mwah πŸ’‹

πŸ“¦ where this page comes from