drm_gpusvm_...nd_or_insert(9)
β¨ NAME β¨
drm_gpusvm_range_find_or_insert β Find or insert GPU SVM range
okay bestie, this is the drm_gpusvm_...nd_or_insert(9) page from the Kernel API Manual, section 9, and it's literally here to find or insert a GPU SVM range. β¨
π¦ SYNOPSIS π¦
struct drm_gpusvm_range * drm_gpusvm_range_find_or_insert (struct
drm_gpusvm *gpusvm , unsigned long fault_addr , unsigned long
gpuva_start , unsigned long gpuva_end , const struct drm_gpusvm_ctx *ctx
);
π ARGUMENTS π
gpusvmβ pointer to the GPU SVM structure. that's the main character πfault_addrβ fault address πgpuva_startβ start address of GPUVA which mirrors CPUgpuva_endβ end address of GPUVA which mirrors CPUctxβ GPU SVM context π«Ά
π DESCRIPTION π
This function finds or inserts a newly allocated GPU SVM range based on the fault address. periodt. πΈ
β οΈ bestie, do not forget this part: the caller must hold a lock to protect range lookup and insertion. no cap, that's the whole vibe check. π
π RETURN π
Pointer to the GPU SVM range on success, ERR_PTR on failure. slay when it works, handle the ERR_PTR when it doesn't πβ¨
π SEE ALSO π
Kernel file ./drivers/gpu/drm/drm_gpusvm.c, plus the whole reference squad in order: Overview(9), Locking(9), Partial Unmapping of Ranges(9), Examples(9), npages_in_range(9), drm_gpusvm_notifier_find(9), drm_gpusvm_range_find(9), drm_gpusvm_notifier_invalidate(9), drm_gpusvm_init(9), to_drm_gpusvm_notifier(9), drm_gpusvm_notifier_insert(9), drm_gpusvm_notifier_remove(9), drm_gpusvm_fini(9), drm_gpusvm_notifier_alloc(9), drm_gpusvm_notifier_free(9), to_drm_gpusvm_range(9), drm_gpusvm_range_insert(9), __drm_gpusvm_range_remove(9), drm_gpusvm_range_alloc(9), drm_gpusvm_hmm_pfn_to_order(9), drm_gpusvm_check_pages(9), drm_gpusvm_scan_mm(9), drm_gpusvm_range_chunk_size(9), drm_gpusvm_driver_lock_held(9), drm_gpusvm_find_vma_start(9), __drm_gpusvm_unmap_pages(9), __drm_gpusvm_free_pages(9), drm_gpusvm_free_pages(9), drm_gpusvm_range_remove(9), drm_gpusvm_range_get(9), drm_gpusvm_range_destroy(9), drm_gpusvm_range_put(9), drm_gpusvm_pages_valid(9), drm_gpusvm_pages_valid_unlocked(9), drm_gpusvm_get_pages(9), drm_gpusvm_unmap_pages(9), drm_gpusvm_range_evict(9), drm_gpusvm_has_mapping(9), drm_gpusvm_range_set_unmapped(9).
source/version: ./drivers/gpu/drm Β· date: October 2026. mwah, go slay those ranges πβ¨
π¦ 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