amdgpu_gart_map(9)
π 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 π₯
amdgpu_gart_dummy_page_init(9)amdgpu_gart_dummy_page_fini(9)amdgpu_gart_table_ram_alloc(9)amdgpu_gart_table_ram_free(9)amdgpu_gart_table_vram_alloc(9)amdgpu_gart_table_vram_free(9)amdgpu_gart_unbind(9)amdgpu_gart_map_vram_range(9)amdgpu_gart_map_gfx9_mqd(9)amdgpu_gart_bind(9)amdgpu_gart_invalidate_tlb(9)amdgpu_gart_init(9)
ngl this whole page lives in./drivers/gpu/drm/amd/amdgpu, dated October 2026, under the nameamdgpu_gart_map(9). That's the sign-off bestie, mwah π π§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms