amdgpu_bo_create_reserved(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… amdgpu_bo_create_reserved(9) β€” like, the whole glow-up

okay so bestie, welcome to the Kernel API Manual, section 9, where we talk about amdgpu_bo_create_reserved. it's giving "kernel-internal buffer object, but make it reserved." no cap, this one's a baddie ✨


🌸 NAME 🌸

amdgpu_bo_create_reserved β€” create a reserved BO for kernel use πŸŽ€


✨ SYNOPSIS ✨

int amdgpu_bo_create_reserved (struct amdgpu_device *adev , unsigned
long size , int align , u32 domain , struct amdgpu_bo **bo_ptr , u64
*gpu_addr , void **cpu_addr );

like, that's the whole signature. she's long but she's iconic πŸ’…


🫢 ARGUMENTS 🫢

  • adev β€” the amdgpu device object. the main character, honestly πŸ‘‘
  • size β€” how big your new BO should be πŸ“
  • align β€” the alignment for the new BO. yes it matters, don't skip it πŸ™ˆ
  • domain β€” where to place it. location, location, location πŸ¦‹
  • bo_ptr β€” used to initialize BOs in structures πŸ”₯
  • gpu_addr β€” the GPU addr of the pinned BO. pinned = she's staying put ⭐
  • cpu_addr β€” optional CPU address mapping. optional bestie, key word optional πŸ’œ

🧚 DESCRIPTION 🧚

so what does she actually do? she allocates and pins a BO for kernel internal use, then hands it back to you still reserved. that's the whole vibe. allocated, pinned, reserved, done. periodt πŸ’€


πŸ’€ NOTE πŸ’€

real talk for a sec: for bo_ptr, the new BO is only created if bo_ptr points to NULL. like, if it's not NULL, nothing gets made. iykyk πŸ™ˆ

🌈 RETURN 🌈

  • 0 on success πŸŽ‰
  • a negative error code otherwise 😭 (she said "no" and she meant it)

πŸ”₯ SEE ALSO πŸ”₯

kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_object.c πŸ’–

and the whole friend group, fr fr:

amdgpu_object(9), amdgpu_bo_is_amdgpu_bo(9), amdgpu_bo_placement_from_domain(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_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)


okay that's the whole page!! πŸŽ€ she lives in ./drivers/gpu/drm/amd/amdgpu, she's dated October 2026, and she's serving Kernel API Manual energy from the amdgpu_bo_create_reserved(9) page. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from