amdgpu_bo_get_metadata(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” your amdgpu_bo buffer 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_size shall not be less than metadata_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 🌸:

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