drm_gpuvm_b...p_ops_create(9)
π drm_gpuvm_bo_unmap_ops_create β Kernel API Manual energy
okay so bestie, this is a page straight out of the Kernel API Manual, and we're talking about drm_gpuvm_bo_unmap_ops_create. it's giving "niche GPU virtual memory lore" and honestly? obsessed. let's get into it π
β¨ NAME β¨
drm_gpuvm_bo_unmap_ops_create β creates the &drm_gpuva_ops to unmap a GEM πΈ
π¦ SYNOPSIS π¦
struct drm_gpuva_ops * drm_gpuvm_bo_unmap_ops_create (struct drm_gpuvm_bo *vm_bo );
like, you hand it a vm_bo and it hands you back ops. main character function behaviour fr fr π«
π ARGUMENTS π
vm_boβ thedrm_gpuvm_boabstraction. that's it, that's the whole input, she's low maintenance π
π DESCRIPTION π
so what does she do. this function creates a list of operations to perform unmapping for every GPUVA attached to a GEM. every single one. no cap.
the list can be iterated with drm_gpuva_for_each_op and consists out of an arbitrary amount of unmap operations β like, "arbitrary amount" is doing a lot of work in that sentence but that's literally what the docs say, so. π
after the caller finished processing the returneddrm_gpuva_ops, they must be freed withdrm_gpuva_ops_free. that's not a suggestion bestie, that's a must. memory leaks are not the vibe π
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. so like... lock up before you show up, yk? π₯
π RETURN π
a pointer to the drm_gpuva_ops on success, an ERR_PTR on failure. so check your pointers, bestie, ERR_PTR is not a real one π
β SEE ALSO β
the whole friend group, honestly. iconique lineup:
- Kernel file
./drivers/gpu/drm/drm_gpuvm.cOverview(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(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_gpuva_ops_free(9)
so there you have it. huge slay, deeply specific, extremely kernel. this whole page lives at ./drivers/gpu/drm, dated October 2026, and the whole thing is filed under drm_gpuvm_b...p_ops_create(9) in case you need to find her again. mwah πβ¨
π¦ 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