amdgpu_bo_create_kernel(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 be
  • align β€” the alignment for the new BO (she likes things lined up)
  • domain β€” where to place it 🌈
  • bo_ptr β€” used to initialize BOs in structures
  • gpu_addr β€” the GPU addr of the pinned BO
  • cpu_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: for bo_ptr, a new BO is only created if bo_ptr points to NULL. that's the vibe check. don't come for her if you passed something else πŸ”₯

πŸ“ RETURN πŸ“

  • 0 on 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:


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