amdgpu_gart_map_vram_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… amdgpu_gart_map_vram_range(9) β€” like, the Kernel API Manual edition πŸŽ€

okay bestie, welcome to the glow-up of amdgpu_gart_map_vram_range(9). this is the Kernel API Manual page for the function that maps VRAM pages into the GART page table, and we're gonna get into it. no cap, it's shorter than your fave's attention span, so let's go ✨


🌸 NAME 🌸

amdgpu_gart_map_vram_range β€” map VRAM pages into the GART page table

like, the whole vibe: VRAM pages get mapped into the GART page table. that's it, that's the tweet πŸ¦‹


✨ SYNOPSIS ✨

void amdgpu_gart_map_vram_range (struct amdgpu_device *adev , uint64_t
pa , uint64_t start_page , uint64_t num_pages , uint64_t flags , void
*dst );

it's giving "void function, six arguments, zero notes" πŸ’… copy it exactly, don't be cute with it.


🫢 ARGUMENTS 🫢

  • adev β€” amdgpu_device pointer. literally just the device pointer, bestie πŸŽ€
  • pa β€” physical address of the first page to be mapped. like, page one, the origin story ✨
  • start_page β€” first page to map in the GART aperture. where it all begins in the GART world πŸ‘‘
  • num_pages β€” number of pages to be mapped. the whole count, no skipped pages πŸ™ˆ
  • flags β€” page table entry flags. the lil settings for the PTE, iconic 🌈
  • dst β€” valid CPU address of GART table, cannot be null. like, fr fr, it cannot be null. do not test it πŸ’€

πŸ’– DESCRIPTION πŸ’–

Binds a BO that is allocated in VRAM to the GART page table (all ASICs).

so basically: you've got this BO chilling in VRAM, and this function binds it to the GART page table. and yes, it works on all ASICs β€” universal queen behavior πŸ‘‘βœ¨

Useful when a kernel BO is located in VRAM but needs to be accessed from the GART address space.

that's the moment. kernel BO in VRAM, needs that GART address space access, and this is the function for the job πŸ”₯


πŸ¦‹ SEE ALSO πŸ¦‹

the friend group, in the order they appear in the group chat:

Kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c


⚠️ small vibe check: dst is a valid CPU address of GART table and it cannot be null. that's the one hard rule on this whole page, so don't fumble it πŸ™ˆ

and that's the page, bestie! this lil masterpiece lives at ./drivers/gpu/drm/amd/amdgpu, dated October 2026, and it's literally titled amdgpu_gart_map_vram_range(9) πŸŽ€ mwah, go map some pages πŸ’œ

πŸ“¦ where this page comes from