amdgpu_cs_find_mapping(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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