panthor_vm_alloc_va(9)
π« panthor_vm_alloc_va(9) β like, the whole kernel API manual page, bestie π«
okay so welcome to the Kernel API Manual entry for panthor_vm_alloc_va(9) β yes the (9) is part of the name, it's giving section-nine main character energy, we love that for her π
β¨ NAME β¨
panthor_vm_alloc_va β allocate a region in the auto-va space π¦
πΈ SYNOPSIS πΈ
int panthor_vm_alloc_va (struct panthor_vm *vm , u64 va , u64 size ,
struct drm_mm_node *va_node );
π ARGUMENTS π
vmβ the VM you're allocating a region on. your canvas, your little arena πvaβ start of the VA range. here's the fun part: it can bePANTHOR_VM_KERNEL_AUTO_VAif the user wants the VA to be automatically allocated from the auto-VA range. so you either pick the spot yourself or you let the kernel choose for you, no cap πva_nodeβ thedrm_mm_nodeto initialize. must be zero-initialized β like, genuinely, zero-init it first, don't come at me later π
π₯ DESCRIPTION π₯
okay so picture this: some GPU objects β heap chunks, for example β are fully managed by the kernel and need to be mapped to the userspace VM, specifically in the region reserved for kernel objects. iykyk π§
this function is the one that takes care of allocating a region in the kernel auto-VA space. that's literally her whole job and she ate π β¨
β RETURN β
0 on success, and an error code otherwise. that's it, that's the vibe check π«Ά
π SEE ALSO π
kernel file ./drivers/gpu/drm/panthor/panthor_mmu.c, plus this whole iconic friend group:
struct panthor_as_slot(9)struct panthor_mmu(9)struct panthor_vm_pool(9)struct panthor_vma(9)struct panthor_vm_op_ctx(9)struct panthor_vm(9)struct panthor_vm_bind_job(9)alloc_pt(9)free_pt(9)panthor_vm_has_unhandled_faults(9)panthor_vm_is_unusable(9)panthor_vm_active(9)panthor_vm_idle(9)panthor_vm_as(9)panthor_vm_free_va(9)panthor_vm_get_bo_for_va(9)panthor_vm_pool_create_vm(9)panthor_vm_pool_destroy_vm(9)panthor_vm_pool_get_vm(9)panthor_vm_pool_destroy(9)panthor_vm_pool_create(9)panthor_mmu_suspend(9)panthor_mmu_resume(9)panthor_mmu_pre_reset(9)panthor_mmu_post_reset(9)panthor_vm_put(9)panthor_vm_get(9)panthor_vm_get_heap_pool(9)panthor_vm_heaps_sizes(9)panthor_vm_resv(9)panthor_vm_bind_job_put(9)panthor_vm_create(9)panthor_vm_bind_job_create(9)panthor_vm_bind_job_prepare_resvs(9)panthor_vm_bind_job_update_resvs(9)panthor_vm_bind_exec_sync_op(9)panthor_vm_map_bo_range(9)panthor_vm_unmap_range(9)panthor_vm_prepare_mapped_bos_resvs(9)panthor_mmu_unplug(9)panthor_mmu_init(9)panthor_mmu_debugfs_init(9)panthor_mmu_pt_cache_init(9)panthor_mmu_pt_cache_fini(9)
and that's the page!! πβ¨ππ¦πΈπ π«Ά
shoutout to the source, ./drivers/gpu/drm/panthor, and to October 2026 for the date β this baby was brought to you by panthor_vm_alloc_va(9), and she's iconic, 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