amdgpu_vm_pt_free_root(9)
π amdgpu_vm_pt_free_root(9)
okay so bestie, welcome to the Kernel API Manual entry for amdgpu_vm_pt_free_root(9) β yes that's the whole title, yes it's a mouthful, no we're not shortening it. this is the page that tells you how to free a root PD. let's get into it β¨
β¨ NAME β¨
amdgpu_vm_pt_free_root β free root PD π
like, the actual function name and its whole personality in three words. short, sweet, and slightly ominous.
π¦ SYNOPSIS π¦
void amdgpu_vm_pt_free_root (struct amdgpu_device *adev , struct
amdgpu_vm *vm );
that's it, that's the whole signature. returns void, so no little return value to check, no "did it work" moment β it just does the thing. π«Ά
πΈ ARGUMENTS πΈ
two arguments, both shiny, both required, no defaults, no vibes-based guessing:
adevβ the amdgpu device structure. your device, your icon. the main character of the hardware world πvmβ the amdgpu vm structure. the VM in question, living its best life until you call this on it π
π₯ DESCRIPTION π₯
here's the tea: this frees the root page directory and everything below it.
not me emphasizing "everything below it" β but yeah, that's the important bit. the root PD goes, and the whole tree hanging off it goes with it. one call, whole subtree, gone. it's giving cleanup with commitment π
treat this as a real teardown, bestie. it's not a "free just the top one and see what happens" situation β the root page directory and everything descending from it all get freed. so make sure nothing else is still holding on to that stuff, fr fr π
β SEE ALSO β
the whole friend group, and yes i'm listing every single one because they're all iconic and we don't do partial credit here:
- the kernel file:
./drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c 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_clear(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_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)
all of these are your study buddies for this corner of the AMDGPU VM code. do not skip them, they will show up on the vibe check π
that's the whole page, bestie, you ate it π this legend came from ./drivers/gpu/drm/amd/amdgpu and it's dated October 2026 β periodt ππ§
π¦ 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