amdgpu_ttm_map_buffer(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… amdgpu_ttm_map_buffer(9) β€” the kernel API manual, but make it cute

okay so bestie, welcome to the amdgpu_ttm_map_buffer page from the Kernel API Manual ✨ this one's a little function with a big job and honestly? she ate.


🌸 NAME 🌸

amdgpu_ttm_map_buffer β€” literally just: map memory into the GART windows 🫢


πŸŽ€ SYNOPSIS πŸŽ€

int amdgpu_ttm_map_buffer (struct amdgpu_ttm_buffer_entity *entity ,
struct ttm_buffer_object *bo , struct ttm_resource *mem , struct
amdgpu_res_cursor *mm_cur , unsigned int window , bool tmz , uint64_t
*size , uint64_t *addr , bool *vm_needs_flush );

like, nine whole arguments. she's high-maintenance but she delivers πŸ’…


✨ ARGUMENTS ✨

  • entity β€” the entity that's gonna run the window setup job. she's the main character here, no cap πŸ‘‘
  • bo β€” the buffer object we're mapping. the what πŸ’–
  • mem β€” the memory object we're mapping. also the what, but different πŸ¦‹
  • mm_cur β€” the range to map. just the slice we care about, periodt 🌸
  • window β€” which GART window to use. you gotta pick one, bestie, no window-hopping πŸ™ˆ
  • tmz β€” whether we should set up a TMZ enabled mapping. yes/no situation fr fr
  • size β€” in: number of bytes to map, out: number of bytes mapped. she's doing double duty and honestly? iconic πŸ”₯
  • addr β€” the resulting address inside the MC address space. where it ended up living ✨
  • vm_needs_flush β€” out param πŸ’« set to true if a GART window was programmed (that means a VMID 0 flush is needed), or false for a direct address. so like, a little note passed back to you 🫢

πŸ’œ DESCRIPTION πŸ’œ

So what does she actually do? Setup one of the GART windows to access a specific piece of memory β€” or, alternatively, just return the physical address for local memory. two vibes, one function. we love a flexible queen 🌈


πŸ” SEE ALSO πŸ”

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

and her whole friend group, because she does not go anywhere alone:


πŸ’€ reminder bestie: size and addr are out params and vm_needs_flush is out β€” so don't come crying when your values change after the call, that's literally the whole point πŸ“

and that's the page! this one lives under ./drivers/gpu/drm/amd/amdgpu in the October 2026 edition of the Kernel API Manual, so if you're reading this in October 2026... hi, ily, go map some buffers πŸ§šπŸ’– ⭐

πŸ“¦ where this page comes from