drm_gpuvm_sm_map(9)
π NAME π
okay bestie, welcome to drm_gpuvm_sm_map(9) in the Kernel API Manual β this one is literally drm_gpuvm_sm_map, and it calls the &drm_gpuva_op split/merge steps β¨
πΈ SYNOPSIS πΈ
int drm_gpuvm_sm_map (struct drm_gpuvm *gpuvm , void *priv , const
struct drm_gpuvm_map_req *req );
π ARGUMENTS π
gpuvmβ thedrm_gpuvmrepresenting the GPU VA space, aka the main-character struct for this whole vibe check πprivβ pointer to a driver private data structure; your little backstage pass π«Άreqβ ptr tostruct drm_gpuvm_map_reqβ the request itself, no cap
π¦ DESCRIPTION π¦
This function iterates the given range of the GPU VA space. It utilizes the drm_gpuvm_ops to call back into the driver providing the split and merge steps. β¨
Drivers may use these callbacks to update the GPU VA space right away within the callback. In case the driver decides to copy and store the operations for later processing neither this function nor drm_gpuvm_sm_unmap is allowed to be called before the drm_gpuvm's view of the GPU VA space was updated with the previous set of operations. To update the drm_gpuvm's view of the GPU VA space drm_gpuva_insert, drm_gpuva_destroy_locked and/or drm_gpuva_destroy_unlocked should be used. π₯
A sequence of callbacks can contain map, unmap and remap operations, but the sequence of callbacks might also be empty if no operation is required, e.g. if the requested mapping already exists in the exact same way. it's giving "nothing to do here, bestie" π
There can be an arbitrary amount of unmap operations, a maximum of two remap operations and a single map operation. The latter one represents the original map operation requested by the caller. π
π RETURN π
0 on success or a negative error code β slay when it's zero, sad little negative when it's not π
π 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(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_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) π§
and that's the whole page, bestie β signing off from the ./drivers/gpu/drm corner of the universe, dated October 2026 ππ
π¦ 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