amdgpu_amdkfd_gpuvm_pin_bo(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– amdgpu_amdkfd_gpuvm_pin_bo(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual entry for amdgpu_amdkfd_gpuvm_pin_bo β€” yes that's a mouthful, no I will not be shortening it, it's iconic as-is πŸ’…


✨ NAME ✨

amdgpu_amdkfd_gpuvm_pin_bo β€” pins a BO using the following criteria πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int amdgpu_amdkfd_gpuvm_pin_bo (struct amdgpu_bo *bo , u32 domain );

like, that's the whole signature, look at her go 😭


🌸 ARGUMENTS 🌸

  • bo β€” the handle of the buffer object that's getting pinned. that's your main character right there πŸ‘‘
  • domain β€” the domain the BO should be pinned into. yes, you gotta tell it where to live 🏠

πŸ’œ DESCRIPTION πŸ’œ

so here's the vibe check on what actually happens:

  • USERPTR BOs are UNPINNABLE and will return error. fr fr, do not try it, it's giving "no ❌"
  • every other BO type (GTT, VRAM, MMIO and DOORBELL) gets its PIN count incremented. and ngl, it's totally valid to PIN a BO multiple times β€” stack those pins, slay πŸ”₯

⭐ RETURN ⭐

ZERO if it pinned successfully 🫢 β€” Non-Zero if there was an error πŸ’€


🌈 SEE ALSO 🌈

the kernel file, bestie, in all her glory:

./drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

and the whole friend group of related pages (iykyk):


🧚 quick reminder: this page comes from ./drivers/gpu/drm/amd/amdgpu, dated October 2026, in the Kernel API Manual. that's the whole sign-off bestie β€” go pin some BOs responsibly πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from