amdgpu_gart_unbind(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… amdgpu_gart_unbind(9) β€” a Kernel API Manual moment

okay so bestie, welcome to the Kernel API Manual, and today's main character is amdgpu_gart_unbind(9) ✨ she's a void, she's a function, and she's here to evict some pages from the GART. let's get into it 🫢


✨ NAME ✨

amdgpu_gart_unbind β€” unbind pages from the gart page table πŸŽ€

lowkey the whole point. she unbinds. that's the vibe check and she passed it πŸ’…


🌸 SYNOPSIS 🌸

void amdgpu_gart_unbind (struct amdgpu_device *adev , uint64_t offset ,
       int pages );

no return value, no drama, just vibes πŸ”₯ (well β€” mostly no drama. read the DESCRIPTION, iykyk πŸ‘€)


πŸ¦‹ ARGUMENTS πŸ¦‹

  • adev β€” amdgpu_device pointer 🌈 like, the whole GPU device struct, the main character of the entire file tbh
  • offset β€” offset into the GPU's gart aperture πŸ’œ this is where you're pointing, fr fr
  • pages β€” number of pages to unbind ⭐ not a suggestion, the actual count, be so for real with this number

πŸ’– DESCRIPTION πŸ’–

okay so here's the lore: amdgpu_gart_unbind unbinds the requested pages from the gart page table and replaces them with the dummy page (all asics). yes bestie, all of them β€” every single asic, no exceptions, we love an inclusive icon πŸ‘‘

then the return situation is genuinely sending me: it returns 0 for success, -EINVAL for failure β€” except the function is declared void 😭 so yeah, that's just what the page says, we do not question the ancestors, we report the facts periodt πŸ’€

ngl the void-vs-return-value thing is a little cursed, but it's literally in the original docs so we're keeping it word for word, no cap πŸ™ˆ

🌈 SEE ALSO 🌈

the whole friend group 🫢 start with the kernel file itself:

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

and then the extended crew, in order, all of them, no one left out πŸ’œ:

like yes, amdgpu_gart_bind(9) is right there and she's the literal opposite of this one β€” they're giving sibling energy, obsessed 🧚


and that's the page bestie!! 🌸 this little gem lives in ./drivers/gpu/drm/amd/amdgpu, and this edition is the October 2026 one β€” go off, you ate, mwah πŸ’‹πŸ’…

πŸ“¦ where this page comes from