amdgpu_gart_map(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… amdgpu_gart_map(9) β€” from the Kernel API Manual, bestie

Okay so this is amdgpu_gart_map, straight out of the Kernel API Manual, and it's honestly that girl. Let's get into it ✨


🌸 NAME 🌸

amdgpu_gart_map β€” the one that maps dma_addresses into GART entries. That's it, that's the whole vibe πŸŽ€


✨ SYNOPSIS ✨

void amdgpu_gart_map (struct amdgpu_device *adev , uint64_t offset , int
pages , dma_addr_t *dma_addr , uint64_t flags , void *dst );

Not me copying this exactly because you NEED it exactly 🫢


πŸ’– ARGUMENTS πŸ’–

  • adev β€” amdgpu_device pointer. Your main character struct, fr.
  • offset β€” offset into the GPU's gart aperture. Where we're dropping this thing off πŸ’…
  • pages β€” number of pages to bind. Count 'em, bestie.
  • dma_addr β€” DMA addresses of pages. The slay locations in question.
  • flags β€” page table entry flags. Little personality settings for your entries ✨
  • dst β€” CPU address of the gart table. The destination, obviously, no cap.

πŸ¦‹ DESCRIPTION πŸ¦‹

So what it does: map the dma_addresses into GART entries β€” and that's for all asics, not just the cool ones πŸ’€

Returns 0 for success, -EINVAL for failure. Like yes it's declared void up in the synopsis, and the description is out here talking about return values β€” iykyk, we just report what the docs say, periodt 🌈


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file: ./drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c β€” go read it, it's giving source of truth πŸ“–

And the whole friend group, because none of them are doing it alone πŸ”₯


ngl this whole page lives in ./drivers/gpu/drm/amd/amdgpu, dated October 2026, under the name amdgpu_gart_map(9). That's the sign-off bestie, mwah πŸ’‹ 🧚
πŸ“¦ where this page comes from