drm_gpuvm_prepare_range(9)
β¨ drm_gpuvm_prepare_range(9) β¨
okay so this is a page from the Kernel API Manual, and bestie, it's about preparing all the BOs mapped inside a given range. it's giving "get your whole friend group ready before the group photo" energy ngl π
πΈ NAME πΈ
drm_gpuvm_prepare_range β prepare all BOs mapped within a given range
π SYNOPSIS π
int drm_gpuvm_prepare_range (struct drm_gpuvm *gpuvm , struct drm_exec
*exec , u64 addr , u64 range , unsigned int num_fences );
π¦ ARGUMENTS π¦
gpuvmβ thedrm_gpuvmπ like, the actual GPU VM we're working withexecβ thedrm_execlocking context β¨ your ticket to the lock partyaddrβ the start address within the VA space πrangeβ the range to iterate within the VA space π§num_fencesβ the amount ofdma_fencesto reserve π₯ no cap, this number matters
π DESCRIPTION π
So what it does: it calls drm_exec_prepare_obj for all drm_gem_objects mapped between addr and addr + range π« and if num_fences is zero, drm_exec_lock_obj is called instead. that's the whole vibe check β one little branch, two paths, both iconic π
β RETURN β
0 on success, negative error code on failure. periodt. π
fr fr, if you get a negative number back, something went sideways β that's your sign π«Ά
π SEE ALSO π
Kernel file ./drivers/gpu/drm/drm_gpuvm.c β and honestly the whole extended fam:
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_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_gpuvm_bo_unmap_ops_create(9)drm_gpuva_ops_free(9)
like, that's a whole contact list, iykyk π
and that's the page!! π source is ./drivers/gpu/drm, dated October 2026 β mwah, go read some more manpages bestie, 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