STRUCT DRM_GPUVA(9)
β¨ struct drm_gpuva(9) β¨
okay so bestie, welcome to the Kernel API Manual β this is the page for struct drm_gpuva, and it's literally the blueprint for tracking a GPU VA mapping. buckle up π
πΈ NAME πΈ
struct drm_gpuva β the structure that tracks a GPU VA mapping π
β¨ SYNOPSIS β¨
struct drm_gpuva {
struct drm_gpuvm *vm;
struct drm_gpuvm_bo *vm_bo;
enum drm_gpuva_flags flags;
struct {
u64 addr;
u64 range;
} va;
struct {
u64 offset;
struct drm_gem_object *obj;
struct list_head entry;
} gem;
struct {
struct rb_node node;
struct list_head entry;
u64 __subtree_last;
} rb;
};
π«Ά Members π«Ά
the top-level fields
vmβ thedrm_gpuvmthis object is associated with. it's giving "who's your parent" energy πvm_boβ thedrm_gpuvm_boabstraction for the mappeddrm_gem_objectflagsβ thedrm_gpuva_flagsfor this mapping π©vaβ structure containing the address and range of thedrm_gpuvava.addrβ the start address π
the gem struct
gemβ structure containing thedrm_gem_objectand its offsetgem.offsetβ the offset within thedrm_gem_objectgem.objβ the mappeddrm_gem_objectπ§gem.entryβ thelist_headto attach this object to adrm_gpuvm_bo
the rb struct
rbβ structure containing data to storedrm_gpuvas in a rb-tree πrb.nodeβ the rb-tree noderb.entryβ Thelist_headto additionally connectdrm_gpuvas in the same order they appear in the interval tree. This is useful to keep iteratingdrm_gpuvas from a start node found through the rb-tree while doing modifications on the rb-tree itself. no cap, this one's the MVP for mutation-safe loops π₯rb.__subtree_lastβ needed by the interval tree, holding last-in-subtree
π Description π
This structure represents a GPU VA mapping and is associated with a drm_gpuvm.
Typically, this structure is embedded in bigger driver structures. like, it's not out here living its own main character life β it's a supporting icon inside your driver's structs π
π SEE ALSO π
Kernel file ./include/drm/drm_gpuvm.h β and honestly the whole friend group:
enum drm_gpuva_flags(9)drm_gpuva_invalidate(9)drm_gpuva_invalidated(9)enum drm_gpuvm_flags(9)struct drm_gpuvm(9)drm_gpuvm_get(9)drm_gpuvm_resv_protected(9)drm_gpuvm_immediate_mode(9)drm_gpuvm_resv(9)drm_gpuvm_resv_obj(9)drm_gpuvm_is_extobj(9)drm_gpuvm_for_each_va_range(9)drm_gpuvm_for_each_va_range_safe(9)drm_gpuvm_for_each_va(9)drm_gpuvm_for_each_va_safe(9)struct drm_gpuvm_exec(9)drm_gpuvm_exec_unlock(9)drm_gpuvm_exec_resv_add_fence(9)drm_gpuvm_exec_validate(9)struct drm_gpuvm_bo(9)drm_gpuvm_bo_get(9)drm_gpuvm_bo_gem_evict(9)drm_gpuvm_bo_for_each_va(9)drm_gpuvm_bo_for_each_va_safe(9)enum drm_gpuva_op_type(9)struct drm_gpuva_op_map(9)struct drm_gpuva_op_unmap(9)struct drm_gpuva_op_remap(9)struct drm_gpuva_op_prefetch(9)struct drm_gpuva_op(9)struct drm_gpuva_ops(9)drm_gpuva_for_each_op(9)drm_gpuva_for_each_op_safe(9)drm_gpuva_for_each_op_from_reverse(9)drm_gpuva_for_each_op_reverse(9)drm_gpuva_first_op(9)drm_gpuva_last_op(9)drm_gpuva_prev_op(9)drm_gpuva_next_op(9)struct drm_gpuvm_map_req(9)struct drm_gpuvm_ops(9)drm_gpuva_op_remap_to_unmap_range(9)
this page lives in./include/drm, and it's dated October 2026 β the manual name on the tin isstruct drm_gpuva(9), and that's the whole vibe check. periodt π π
π¦ 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