amdgpu_cs_find_mapping(9)
π amdgpu_cs_find_mapping(9) β like, the Kernel API Manual one π
okay so bestie, welcome to the glow-up of amdgpu_cs_find_mapping(9). it's from the Kernel API Manual, it lives in ./drivers/gpu/drm/amd/amdgpu, and it's about finding a bo_va for a VM address. iconic of it, honestly.
β¨ NAME β¨
amdgpu_cs_find_mapping β find bo_va for VM address π
like, the whole personality is in the name. we're hunting for a bo_va by VM address, and that's it, that's the vibe.
π¦ SYNOPSIS π¦
int amdgpu_cs_find_mapping (struct amdgpu_cs_parser *parser , uint64_t
addr , struct amdgpu_bo **bo , struct amdgpu_bo_va_mapping **map );
four args, one int back. she's a little wordy but she ate π
πΈ ARGUMENTS πΈ
parserβ the command submission parser context. this is your group-chat history for the submission, everything goes through her.addrβ the VM address we're looking up. literally the address, no cap.boβ the resulting BO of the mapping that got found. she's the output, she gets filled in π«Άmapβ placeholder to return the found BO mapping. yes bestie, a placeholder β she's holding the spot for the mapping you found.
π§ DESCRIPTION π§
so what does she actually do? she searches the buffer objects in the command submission context for a certain virtual memory address.
- found it? π you get the allocation structure back.
- didn't find it?
NULL. that's it. that's the whole answer. π
ngl it's a simple little function and that's why we stan her β she knows exactly what she's about and she does not overcomplicate.
lowkey important: the "returns allocation structure when found, NULL otherwise" thing is the entire contract. don't go reading extra behaviour into it, bestie. she said what she said. π
π SEE ALSO π
the kernel file this beauty lives in, plus her whole friend group:
- Kernel file
./drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c amdgpu_cs_wait_ioctl(9)amdgpu_cs_get_fence(9)amdgpu_cs_wait_all_fences(9)amdgpu_cs_wait_any_fence(9)amdgpu_cs_wait_fences_ioctl(9)
fr fr go read those too, the whole squad is in ./drivers/gpu/drm/amd/amdgpu and they all slay in their own way π
and that's the page, bestie π sourced from ./drivers/gpu/drm/amd/amdgpu, dated October 2026, header amdgpu_cs_find_mapping(9), Kernel API Manual. mwah, go find those mappings πβ¨
π¦ 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