amdgpu_vm_pt_clear(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… amdgpu_vm_pt_clear β€” from the Kernel API Manual, bestie

okay so picture this: you're deep in the AMDGPU DRM driver, the manual you're reading is literally called the Kernel API Manual, and the vibe is page tables. yes, those page tables. this one's about wiping the PDs/PTs clean before anything else moves in 🧹✨


✨ NAME ✨

amdgpu_vm_pt_clear β€” it literally initially clears the PDs/PTs, like spring cleaning but for page directories and page tables πŸŽ€


🌸 SYNOPSIS 🌸

int amdgpu_vm_pt_clear (struct amdgpu_device *adev , struct amdgpu_vm
*vm , struct amdgpu_bo_vm *vmbo , bool immediate );

no cap, that's the whole signature. four arguments, one int coming back at you 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • adev β€” an amdgpu_device pointer. the device, the main character, the whole reason we're here πŸ‘‘
  • vm β€” the VM you want to clear the BO from. yes, that VM πŸ’œ
  • vmbo β€” the BO that's getting cleared. be nice to it 🌈
  • immediate β€” if you set this, it uses an immediate update. no waiting around, we go now ⚑

πŸ’€ DESCRIPTION πŸ’€

okay this is the important part, do not scroll past 🚨

Root PD needs to be reserved when calling this.

like fr fr β€” reserve the root PD before you call this. that's the rule, that's the vibe check, that's the whole thing πŸ’…


⭐ RETURN ⭐

  • 0 on success πŸŽ‰ slay
  • errno otherwise 😭 it's giving error

πŸ”₯ SEE ALSO πŸ”₯

the kernel file for this one lives right here, ./drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c β€” go read it, iykyk πŸ“–

and the whole friend group, aka the sibling functions, all chillin' in section 9:


and that's the whole page, bestie πŸ’– this one came out of ./drivers/gpu/drm/amd/amdgpu, dated October 2026 β€” go forth and clear those page tables responsibly πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from