amdgpu_bo_create_kernel(9)
π amdgpu_bo_create_kernel(9)
okay so bestie, welcome to the Kernel API Manual β¨ this one's all about amdgpu_bo_create_kernel β the little helper that makes a buffer object for kernel-side use. let's get into it π«Ά
πΈ NAME πΈ
amdgpu_bo_create_kernel β create BO for kernel use π
β¨ SYNOPSIS β¨
int amdgpu_bo_create_kernel (struct amdgpu_device *adev , unsigned long
size , int align , u32 domain , struct amdgpu_bo **bo_ptr , u64
*gpu_addr , void **cpu_addr );
like, yes, that's a lot of parameters. she's high-maintenance but she delivers π
π ARGUMENTS π
adevβ the amdgpu device object, aka the main character π§sizeβ how big the new BO is gonna bealignβ the alignment for the new BO (she likes things lined up)domainβ where to place it πbo_ptrβ used to initialize BOs in structuresgpu_addrβ the GPU addr of the pinned BOcpu_addrβ optional CPU address mapping (optional!! key word!! π)
π¦ DESCRIPTION π¦
so basically this function allocates and pins a BO for kernel internal use. allocates and pins. both. she does it all π
and here's the slay part: this function is exported so that the V4L2 isp device β which lives external to the drm device β can create and access the kernel BO. it's giving "open door policy" β¨ iykyk
β NOTE β
okay listen up because this is important fr fr: forbo_ptr, a new BO is only created ifbo_ptrpoints toNULL. that's the vibe check. don't come for her if you passed something else π₯
π RETURN π
0on success π- negative error code otherwise π
periodt.
π SEE ALSO π
the kernel file lives right here: ./drivers/gpu/drm/amd/amdgpu/amdgpu_object.c π
and the whole friend group:
amdgpu_object(9)amdgpu_bo_is_amdgpu_bo(9)amdgpu_bo_placement_from_domain(9)amdgpu_bo_create_reserved(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_kmap(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)
and that's the whole page bestie π
β¨ this one came out of ./drivers/gpu/drm/amd/amdgpu, dated October 2026 β go off, kernel docs, you ate ππ¦π
π¦ 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