amdgpu_vm_pt_clear(9)
π 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β anamdgpu_devicepointer. 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 β
0on success π slayerrnootherwise π 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:
amdgpu_vm_pt_level_shift(9)amdgpu_vm_pt_num_entries(9)amdgpu_vm_pt_entries_mask(9)amdgpu_vm_pt_size(9)amdgpu_vm_pt_parent(9)amdgpu_vm_pt_start(9)amdgpu_vm_pt_descendant(9)amdgpu_vm_pt_sibling(9)amdgpu_vm_pt_ancestor(9)amdgpu_vm_pt_next(9)amdgpu_vm_pt_first_dfs(9)amdgpu_vm_pt_continue_dfs(9)amdgpu_vm_pt_next_dfs(9)amdgpu_vm_pt_create(9)amdgpu_vm_pt_alloc(9)amdgpu_vm_pt_free(9)amdgpu_vm_pt_free_list(9)amdgpu_vm_pt_add_list(9)amdgpu_vm_pt_free_root(9)amdgpu_vm_pde_update(9)amdgpu_vm_pte_update_noretry_flags(9)amdgpu_vm_pte_fragment(9)amdgpu_vm_ptes_update(9)amdgpu_vm_pt_map_tables(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
- 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