drm_gpuva_unlink(9)
β¨ drm_gpuva_unlink(9) β¨
okay bestie, welcome to the drm_gpuva_unlink(9) page from the Kernel API Manual π this is the little function that says "you're not on the list anymore, sweetie" to a GPU VA, and honestly it's giving uninvited-from-the-group-chat energy π
πΈ NAME πΈ
drm_gpuva_unlink β unlink a &drm_gpuva π¦
β SYNOPSIS β
void drm_gpuva_unlink (struct drm_gpuva *va );
π ARGUMENTS π
vaβ thedrm_gpuvato unlink π«Ά that's the one getting yeeted off the list.
π₯ DESCRIPTION π₯
So here's the tea β: this removes the given va from the GPU VA list of the drm_gem_object it is associated with. Bye bestie, no cap π
It also does a two-for-one deal β this removes the given va from the GPU VA list of the drm_gpuvm_bo and the drm_gpuvm_bo from the drm_gem_object it is associated with, in case this call unlinks the last drm_gpuva from the drm_gpuvm_bo. Like, if you're the last one to leave the party, you also turn off the lights β¨
For every drm_gpuva entry removed from the drm_gpuvm_bo, a reference of the latter is dropped. Every single one. Reference accounting is not a vibe you can skip π
β οΈ okay this part is important, fr fr: this function expects the caller to protect the GEM's GPUVA list against concurrent access using either the GEM's dma-resv or gpuva.lock mutex. You gotta hold one of those, or it's chaos π we do not stan data races.
π SEE ALSO π
- 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_link(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 bestie, you ate that π go unlink something (with the lock held, obviously π)
sign-off szn π: this lil gem lives in ./drivers/gpu/drm, dated October 2026 β mwah, study hard, ily β¨π
π¦ 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