create_dmamap_sg_bo(9)
π create_dmamap_sg_bo β it's a Kernel API Manual moment, bestie
okay so welcome to the create_dmamap_sg_bo(9) page, a certified kernel-API classic, and honestly? she's lowkey iconic for what she does. let's get into it π«Ά
β¨ NAME β¨
create_dmamap_sg_bo β literally creates a amdgpu_bo object so it can reflect all the info about a USERPTR or DOOREBELL or MMIO BO. that's the whole vibe. no cap.
πΈ SYNOPSIS πΈ
int create_dmamap_sg_bo (struct amdgpu_device *adev , struct kgd_mem
*mem , struct amdgpu_bo **bo_out );
like, look at her signature. so clean. so demure. π
π ARGUMENTS π
adevβ the device for which the dmamap BO is being created. it's giving "who is this for" energy, and the answer is this device πmemβ the BO of the peer device that's getting DMA mapped. she's the main character supplying the parameters used to build the dmamap BO πbo_outβ the output parameter, updated with the handle of the dmamap BO. yes bestie, she's an out-param, she comes back changed β¨
π¦ SEE ALSO π¦
first up, the kernel file herself, no cap:
./drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
and then the whole friend group β go say hi, they all ate:
reuse_dmamap(9)amdgpu_amdkfd_reserve_mem_limit(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_pin_bo(9)amdgpu_amdkfd_gpuvm_unpin_bo(9)amdgpu_amdkfd_map_gtt_bo_to_gart(9)
and that's the page!! π quick little sign-off for the receipts: this one lives under ./drivers/gpu/drm/amd/amdgpu, it's dated October 2026, and the whole thing is filed under create_dmamap_sg_bo(9). slay, periodt, go read the source ππ
π¦ 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