amdgpu_bo_kmap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… amdgpu_bo_kmap(9)

okay so bestie, welcome to the kernel API manual (that's the manual name, yes, we're fancy like that) β€” today's main character is amdgpu_bo_kmap, and she is literally the girl who takes your buffer object and gives it a kernel virtual address. no cap. πŸ¦‹


✨ NAME ✨

amdgpu_bo_kmap β€” map an &amdgpu_bo buffer object πŸŽ€


🌸 SYNOPSIS 🌸

int amdgpu_bo_kmap (struct amdgpu_bo *bo , void **ptr );

🫢 ARGUMENTS 🫢

  • bo β€” the amdgpu_bo buffer object that's getting mapped. she's the one. πŸ‘‘
  • ptr β€” the kernel virtual address that gets returned to you. it's an out-param, so she hands you the address here. πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

So here's the tea: it calls ttm_bo_kmap to set up the kernel virtual mapping, and then it calls amdgpu_bo_kptr to get the kernel virtual address. that's it, that's the whole plot. two calls, zero drama. slay. ✨


⭐ RETURN ⭐

0 for success, or a negative error code on failure. fr fr, check it β€” don't just assume it worked. 😭


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file: ./drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

and the whole friend group (yes, all of them, i'm not leaving anyone out of the group chat πŸ’…):


ok and finally the lil sign-off: this page lives in ./drivers/gpu/drm/amd/amdgpu, and it's dated October 2026. mwah πŸ’‹ go map some buffers, bestie. πŸ§šπŸ’œ
πŸ“¦ where this page comes from