amdgpu_bo_kmap(9)
π 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β theamdgpu_bobuffer 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 π ):
amdgpu_object(9)amdgpu_bo_is_amdgpu_bo(9)amdgpu_bo_placement_from_domain(9)amdgpu_bo_create_reserved(9)amdgpu_bo_create_kernel(9)amdgpu_bo_create_isp_user(9)amdgpu_bo_create_kernel_at(9)amdgpu_bo_free_kernel(9)amdgpu_bo_free_isp_user(9)amdgpu_bo_create(9)amdgpu_bo_create_user(9)amdgpu_bo_create_vm(9)amdgpu_bo_kptr(9)amdgpu_bo_kunmap(9)amdgpu_bo_ref(9)amdgpu_bo_unref(9)amdgpu_bo_pin(9)amdgpu_bo_unpin(9)amdgpu_bo_init(9)amdgpu_bo_fini(9)amdgpu_bo_set_tiling_flags(9)amdgpu_bo_get_tiling_flags(9)amdgpu_bo_set_metadata(9)amdgpu_bo_get_metadata(9)amdgpu_bo_move_notify(9)amdgpu_bo_release_notify(9)amdgpu_bo_fault_reserve_notify(9)amdgpu_bo_fence(9)amdgpu_bo_sync_wait_resv(9)amdgpu_bo_sync_wait(9)amdgpu_bo_gpu_offset(9)amdgpu_bo_fb_aper_addr(9)amdgpu_bo_gpu_offset_no_check(9)amdgpu_bo_mem_stats_placement(9)amdgpu_bo_get_preferred_domain(9)amdgpu_bo_print_info(9)
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
- 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