amdgpu_bo_set_metadata(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… amdgpu_bo_set_metadata β€” set metadata

okay so bestie, welcome to the kernel API manual for amdgpu_bo_set_metadata(9) β€” yes that's the whole title, and yes it's giving "short but iconic." She's a tiny function with a big job and I'm obsessed. Let's get into it πŸŽ€


✨ SYNOPSIS ✨

int amdgpu_bo_set_metadata (struct amdgpu_bo *bo , void *metadata , u32
metadata_size , uint64_t flags );

literally the whole entire signature, character for character, no cap πŸ’…


🌸 ARGUMENTS 🌸

  • bo β€” the amdgpu_bo buffer object. the main character, the one we're decorating 🫢
  • metadata β€” the new metadata. fresh out the box ✨
  • metadata_size β€” size of the new metadata. yes she comes with a size, we measure πŸ“
  • flags β€” flags of the new metadata. the little vibe settings 🚩

πŸ¦‹ DESCRIPTION πŸ¦‹

So what she does: sets the buffer object's metadata, its size, and its flags. all three, in one lil call πŸ‘‘

And where does she live in the wild? She's used via GEM ioctl. that's the whole route, iykyk 🌈


⭐ RETURN ⭐

  • 0 for success πŸŽ‰
  • or a negative error code on failure 😭 (she tried her best)

πŸ”₯ SEE ALSO πŸ”₯

okay this part is a whole friend group, strap in β€” somebody's gotta know everybody:

Kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

like I said. the whole group chat. also note amdgpu_bo_get_metadata(9) is right there β€” that's her sister, she reads what this one writes 🧚


pro tip from me to you: this page lives in ./drivers/gpu/drm/amd/amdgpu and the version stamp says October 2026, so if you're reading this from the future, hi bestie πŸ‘‹πŸ’œ

and that's the page!! mwah, go set some metadata, you absolute icon πŸ“πŸ’–

πŸ“¦ where this page comes from