STRUCT DRM_GPUVM_BO(9)
π struct drm_gpuvm_bo(9) β Kernel API Manual π
okay so this is the Kernel API Manual entry for struct drm_gpuvm_bo, and it's basically the situationship between a drm_gpuvm and a drm_gem_object. It's giving "indirection that makes everything faster," bestie. Let's get into it. π¦β¨
πΈ NAME πΈ
struct drm_gpuvm_bo β structure representing a &drm_gpuvm and &drm_gem_object combination. π
β¨ SYNOPSIS β¨
struct drm_gpuvm_bo {
struct drm_gpuvm *vm;
struct drm_gem_object *obj;
bool evicted;
struct kref kref;
struct {
struct list_head gpuva;
struct {
struct list_head gem;
struct list_head extobj;
struct list_head evict;
struct llist_node bo_defer;
} entry;
} list;
};
π Members π
vmβ thedrm_gpuvmthatobjis mapped in. It's a reference counted pointer, so handle with care, queen. πobjβ thedrm_gem_objectbeing mapped invm. Also a reference counted pointer. πevictedβ tells you whether thedrm_gem_objectis evicted; this field is protected by thedrm_gem_object's dma-resv lock. No cap. πkrefβ the reference count for thisdrm_gpuvm_bo. Keep track, bestie. πlistβ structure containing alllist_heads.list.gpuvaβ the list of linkeddrm_gpuvas.
It is safe to access entries from this list as long as the GEM's gpuva lock is held. See also struct drm_gem_object. π«Ά
list.entryβ structure containing alllist_headsserving as entry.list.entry.gemβ list entry to attach to the gpuva list on thedrm_gem_object.list.entry.evictβ list entry to attach to thedrm_gpuvm's evict list.list.entry.bo_deferβ list entry to attach to thedrm_gpuvm'sbo_deferlist.
π Description π
This structure is an abstraction representing a drm_gpuvm and drm_gem_object combination. It serves as an indirection to accelerate iterating all drm_gpuvas within a drm_gpuvm backed by the same drm_gem_object. Iconic behavior, honestly. β¨
Furthermore it is used to cache evicted GEM objects for a certain GPU-VM to accelerate validation. Lowkey a speedrun strat. π₯
Typically, drivers want to create an instance of a struct drm_gpuvm_bo once a GEM object is mapped first in a GPU-VM and release the instance once the last mapping of the GEM object in this GPU-VM is unmapped. Periodt. π
π¦ SEE ALSO π¦
Kernel file ./include/drm/drm_gpuvm.h is the main character here, and it's bringing the whole crew:
enum drm_gpuva_flags(9)struct drm_gpuva(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)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)
okay that's the whole entire page, bestie β signed off from ./include/drm, October 2026, for struct drm_gpuvm_bo(9). πβ¨π
π¦ 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