drm_gpuva_link(9)
π
drm_gpuva_link β the drm_gpuva_link(9) glow-up
okay so bestie, welcome to drm_gpuva_link(9) from the Kernel API Manual β¨ this is a kernel-page moment, lowercase void, capital vibes π
πΈ NAME
drm_gpuva_link β link a &drm_gpuva π«Ά
β¨ SYNOPSIS
void drm_gpuva_link (struct drm_gpuva *va , struct drm_gpuvm_bo *vm_bo
);
π ARGUMENTS
vaβ thedrm_gpuvato link πvm_boβ thedrm_gpuvm_boto add thedrm_gpuvato π
π¦ DESCRIPTION
So here's the whole thing, and it's actually so clean: this adds the given va to the GPU VA list of the drm_gpuvm_bo, and it adds the drm_gpuvm_bo to the drm_gem_object it is associated with. Two links, one function, we love a multitasker π
And the refcount lore: for every drm_gpuva entry added to the drm_gpuvm_bo, an additional reference of the latter is taken. That's just how it goes, no cap π
β οΈ okay this part is the serious part, bestie: this function expects the caller to protect the GEM's GPUVA list against concurrent access, using either the GEM'sdma-resvorgpuva.lockmutex. Your locking era is your responsibility β the function is not doing it for you π don't come crying to me when it races.
π₯ SEE ALSO
the group chat, basically β everybody's here πΈ
- Kernel file
./drivers/gpu/drm/drm_gpuvm.c Overview(9),Split and Merge(9),Madvise Logic - Splitting and Traversal(9),Locking(9),Examples(9)get_next_vm_bo_from_list(9),for_each_vm_bo_in_list(9),restore_vm_bo_list(9)drm_gpuvm_bo_is_zombie(9),drm_gpuvm_bo_list_add(9),drm_gpuvm_bo_list_del_init(9),drm_gpuvm_bo_list_del(9)drm_gpuvm_range_valid(9),drm_gpuvm_resv_object_alloc(9),drm_gpuvm_init(9),drm_gpuvm_put(9)drm_gpuvm_prepare_vm(9),drm_gpuvm_prepare_objects(9),drm_gpuvm_prepare_range(9)drm_gpuvm_exec_lock(9),drm_gpuvm_exec_lock_array(9),drm_gpuvm_exec_lock_range(9)drm_gpuvm_validate(9),drm_gpuvm_resv_add_fence(9)drm_gpuvm_bo_create(9),drm_gpuvm_bo_put(9),drm_gpuvm_bo_put_deferred(9),drm_gpuvm_bo_deferred_cleanup(9),drm_gpuvm_bo_find(9),drm_gpuvm_bo_obtain_locked(9),drm_gpuvm_bo_obtain_prealloc(9),drm_gpuvm_bo_extobj_add(9),drm_gpuvm_bo_evict(9)drm_gpuva_insert(9),drm_gpuva_remove(9),drm_gpuva_unlink(9),drm_gpuva_unlink_defer(9)drm_gpuva_find_first(9),drm_gpuva_find(9),drm_gpuvm_interval_empty(9)drm_gpuva_map(9),drm_gpuva_remap(9),drm_gpuva_unmap(9)drm_gpuvm_sm_map(9),drm_gpuvm_sm_unmap(9),drm_gpuvm_sm_map_exec_lock(9),drm_gpuvm_sm_unmap_exec_lock(9)drm_gpuvm_sm_map_ops_create(9),drm_gpuvm_madvise_ops_create(9),drm_gpuvm_sm_unmap_ops_create(9),drm_gpuvm_prefetch_ops_create(9),drm_gpuvm_bo_unmap_ops_create(9),drm_gpuva_ops_free(9)
that's the whole page, slay π§ and for the receipts: this one lives in ./drivers/gpu/drm and it's dated October 2026 β iconic, timeless, 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