amdgpu_bo_get_metadata(9)
π amdgpu_bo_get_metadata(9) β get metadata
okay so bestie, welcome to the Kernel API Manual β¨ you're about to learn how to yoink a buffer object's metadata, and honestly? it's giving lowkey simple. let's go π«Ά
πΈ NAME πΈ
amdgpu_bo_get_metadata β the one where you get metadata π¦
β¨ SYNOPSIS β¨
int amdgpu_bo_get_metadata (struct amdgpu_bo *bo , void *buffer , size_t
buffer_size , uint32_t *metadata_size , uint64_t *flags );
like, five arguments, one int back. no cap, that's literally the whole vibe check π₯
π ARGUMENTS π
boβ youramdgpu_bobuffer object bestie, the main character πbufferβ where the returned metadata goes πbuffer_sizeβ the size of the buffer, yes ma'am πmetadata_sizeβ the size of the returned metadata, so you know how much you actually got πΈflagsβ the flags of the returned metadata π©
π¦ DESCRIPTION π¦
so the way that this works: it gets the buffer object's metadata, β¨ and β¨ its size, β¨ and β¨ its flags. all three. iconic.
π¨ important caveat bestie:buffer_sizeshall not be less thanmetadata_size. like, please don't. it's not a suggestion fr fr.
and where do you use it? via GEM ioctl π iykyk.
π RETURN π
returns 0 for success, or a negative error code on failure. simple as that, periodt π
π SEE ALSO π
kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_object.c π
and then, ok, deep breath, 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_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_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)
like, that's the whole group chat. read them. they ate ππ₯
and that's the page, bestie! π§ this little gem lives in ./drivers/gpu/drm/amd/amdgpu, it's dated October 2026, and it's brought to you by the Kernel API Manual π go get that metadata, you absolute icon ππ
π¦ 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