sdma_v4_4_2_vm_write_pte(9)
π sdma_v4_4_2_vm_write_pte(9) π
okay bestie, so we're deep in the Kernel API Manual today β like, section 9, kernel-space, no userspace shenanigans. This one's a function page. Buckle up π
β¨ NAME β¨
sdma_v4_4_2_vm_write_pte β literally just updating PTEs by writing them manually, by hand, the old-fashioned way π«Ά
β¨ SYNOPSIS β¨
void sdma_v4_4_2_vm_write_pte (struct amdgpu_ib *ib , uint64_t pe ,
uint64_t value , unsigned count , uint32_t incr );
no cap, that's the whole signature. she takes five args and returns nothing (void, she gives nothing back, main character energy π
).
β¨ ARGUMENTS β¨
ibβ the indirect buffer you're filling with commands. this is the canvas, the vibe receptacle π¨peβ the addr of the page entry. yes, addr, not address, that's how the page spells it, don't come for me πvalueβ the dst addr to write intope. the destination. the final form. the glow-up β¨countβ number of page entries to update. how many of them we're doing. could be one, could be a whole squad π―ββοΈincrβ increase next addr byincrbytes. the step size, the stride, the little hop between entries π¦
β¨ DESCRIPTION β¨
Update PTEs by writing them manually using sDMA.
that's it. that's the whole description. no hand-holding, no lore, just: you want those page table entries updated? you write them. manually. with sDMA doing the work. it's giving "do it yourself but make it hardware-accelerated" π₯
lowkey iconic that the description is one sentence long and still eats π
π SEE ALSO π
first up, the kernel file herself lives right here β go read the source, bestie:
./drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c
and then the whole friend group, the entire sdma_v4_4_2 squad, all of them, in order, no one left behind π«Ά:
sdma_v4_4_2_init_microcode(9)sdma_v4_4_2_ring_get_rptr(9)sdma_v4_4_2_ring_get_wptr(9)sdma_v4_4_2_ring_set_wptr(9)sdma_v4_4_2_page_ring_get_wptr(9)sdma_v4_4_2_page_ring_set_wptr(9)sdma_v4_4_2_ring_emit_ib(9)sdma_v4_4_2_ring_emit_hdp_flush(9)sdma_v4_4_2_ring_emit_fence(9)sdma_v4_4_2_inst_gfx_stop(9)sdma_v4_4_2_inst_rlc_stop(9)sdma_v4_4_2_inst_page_stop(9)sdma_v4_4_2_inst_ctx_switch_enable(9)sdma_v4_4_2_inst_enable(9)sdma_v4_4_2_gfx_resume(9)sdma_v4_4_2_page_resume(9)sdma_v4_4_2_inst_rlc_resume(9)sdma_v4_4_2_inst_load_microcode(9)sdma_v4_4_2_inst_start(9)sdma_v4_4_2_ring_test_ring(9)sdma_v4_4_2_ring_test_ib(9)sdma_v4_4_2_vm_copy_pte(9)sdma_v4_4_2_vm_set_pte_pde(9)sdma_v4_4_2_ring_pad_ib(9)sdma_v4_4_2_ring_emit_pipeline_sync(9)sdma_v4_4_2_ring_emit_vm_flush(9)sdma_v4_4_2_emit_copy_buffer(9)sdma_v4_4_2_emit_fill_buffer(9)sdma_v4_4_2_update_reset_mask(9)
like, that's twenty-nine siblings. big family. love that for them π
ngl bestie, PTEs are serious business β you're touching page tables here. write them wrong and the whole VM vibe checks out permanently. be careful, mwah π
and that's the page! π¦ source dir is ./drivers/gpu/drm/amd/amdgpu, and the manual's dated October 2026 β so this page is, like, from the future?? 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