drm_gpuvm_init(9)
β¨ drm_gpuvm_init(9) β¨
okay bestie, welcome to the Kernel API Manual π
this one is drm_gpuvm_init β the function that literally brings your &drm_gpuvm to life. no cap, it's the setup step, so pay attention π«Ά
π NAME π
drm_gpuvm_init β initialize a &drm_gpuvm πΈ
π SYNOPSIS π
void drm_gpuvm_init (struct drm_gpuvm *gpuvm , const char *name , enum
drm_gpuvm_flags flags , struct drm_device *drm , struct drm_gem_object
*r_obj , u64 start_offset , u64 range , u64 reserve_offset , u64
reserve_range , const struct drm_gpuvm_ops *ops );
π¦ ARGUMENTS π¦
like, ten whole parameters. she's high-maintenance but iconic π
gpuvmβ pointer to thedrm_gpuvmyou're initializing. this is the main character of the whole function β¨nameβ the name of the GPU VA space π·οΈflagsβ thedrm_gpuvm_flagsfor this GPUVM π©drmβ thedrm_devicethis VM resides in π₯οΈr_objβ the resvdrm_gem_objectproviding the GPUVM's commondma_resvπstart_offsetβ the start offset of the GPU VA space πrangeβ the size of the GPU VA space πreserve_offsetβ the start of the kernel reserved GPU VA area π§reserve_rangeβ the size of the kernel reserved GPU VA area π―opsβdrm_gpuvm_opscalled ondrm_gpuvm_sm_map/drm_gpuvm_sm_unmapπ οΈ
π DESCRIPTION π
so basically: the drm_gpuvm must be initialized with this function before use. like, no initialization = no vibes. it's giving mandatory pre-req π
β οΈ important bestie alert: note thatgpuvmmust be cleared to 0 before calling this function. fr fr, zero it out first. and the givennameis expected to be managed by the surrounding driver structures β so don't go freeing it all willy-nilly, that's the driver's job π
π SEE ALSO π
the whole friend group π go read these:
- 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_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_gpuvm_bo_unmap_ops_create(9)
- drm_gpuva_ops_free(9)
and that's the whole page, bestie π this lil manual came from ./drivers/gpu/drm, dated October 2026 β so go forth and initialize responsibly π« 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