amdgpu_amdkfd_gpuvm_pin_bo(9)
π 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):
reuse_dmamap(9)amdgpu_amdkfd_reserve_mem_limit(9)create_dmamap_sg_bo(9)amdgpu_amdkfd_remove_all_eviction_fences(9)create_sg_table(9)kfd_mem_dmamap_sg_bo(9)kfd_mem_dmaunmap_sg_bo(9)reserve_bo_and_vm(9)reserve_bo_and_cond_vms(9)unreserve_bo_and_vms(9)amdgpu_amdkfd_gpuvm_unpin_bo(9)amdgpu_amdkfd_map_gtt_bo_to_gart(9)
π§ 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
- 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