include/drm/drm_gpuvm.h
Source file repositories/reference/linux-study-clean/include/drm/drm_gpuvm.h
File Facts
- System
- Linux kernel
- Corpus path
include/drm/drm_gpuvm.h- Extension
.h- Size
- 35895 bytes
- Lines
- 1305
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/dma-resv.hlinux/list.hlinux/llist.hlinux/rbtree.hlinux/types.hdrm/drm_device.hdrm/drm_gem.hdrm/drm_exec.h
Detected Declarations
struct drm_gpuvmstruct drm_gpuvm_bostruct drm_gpuvm_opsstruct drm_gpuvastruct drm_gpuvmstruct drm_gpuvm_execstruct drm_gpuvm_bostruct drm_gpuva_op_mapstruct drm_gpuva_op_unmapstruct drm_gpuva_op_remapstruct drm_gpuva_op_prefetchstruct drm_gpuva_opstruct drm_gpuva_opsstruct drm_gpuvm_map_reqstruct drm_gpuvm_opsenum drm_gpuva_flagsenum drm_gpuvm_flagsenum drm_gpuva_op_typefunction drm_gpuva_invalidatefunction drm_gpuva_invalidatedfunction drm_gpuvm_getfunction drm_gpuvm_resv_protectedfunction drm_gpuvm_immediate_modefunction drm_gpuvm_resvfunction __drm_gpuva_nextfunction drm_gpuvm_exec_unlockfunction drm_gpuvm_exec_resv_add_fencefunction drm_gpuvm_exec_validatefunction drm_gpuvm_bo_getfunction drm_gpuvm_bo_gem_evictfunction drm_gem_for_each_gpuvm_bofunction drm_gpuva_init_from_opfunction drm_gpuva_op_remap_to_unmap_range
Annotated Snippet
struct drm_gpuva {
/**
* @vm: the &drm_gpuvm this object is associated with
*/
struct drm_gpuvm *vm;
/**
* @vm_bo: the &drm_gpuvm_bo abstraction for the mapped
* &drm_gem_object
*/
struct drm_gpuvm_bo *vm_bo;
/**
* @flags: the &drm_gpuva_flags for this mapping
*/
enum drm_gpuva_flags flags;
/**
* @va: structure containing the address and range of the &drm_gpuva
*/
struct {
/**
* @va.addr: the start address
*/
u64 addr;
/*
* @range: the range
*/
u64 range;
} va;
/**
* @gem: structure containing the &drm_gem_object and its offset
*/
struct {
/**
* @gem.offset: the offset within the &drm_gem_object
*/
u64 offset;
/**
* @gem.obj: the mapped &drm_gem_object
*/
struct drm_gem_object *obj;
/**
* @gem.entry: the &list_head to attach this object to a &drm_gpuvm_bo
*/
struct list_head entry;
} gem;
/**
* @rb: structure containing data to store &drm_gpuvas in a rb-tree
*/
struct {
/**
* @rb.node: the rb-tree node
*/
struct rb_node node;
/**
* @rb.entry: The &list_head to additionally connect &drm_gpuvas
* in the same order they appear in the interval tree. This is
* useful to keep iterating &drm_gpuvas from a start node found
* through the rb-tree while doing modifications on the rb-tree
* itself.
*/
struct list_head entry;
/**
* @rb.__subtree_last: needed by the interval tree, holding last-in-subtree
*/
u64 __subtree_last;
} rb;
};
int drm_gpuva_insert(struct drm_gpuvm *gpuvm, struct drm_gpuva *va);
void drm_gpuva_remove(struct drm_gpuva *va);
void drm_gpuva_link(struct drm_gpuva *va, struct drm_gpuvm_bo *vm_bo);
void drm_gpuva_unlink(struct drm_gpuva *va);
void drm_gpuva_unlink_defer(struct drm_gpuva *va);
struct drm_gpuva *drm_gpuva_find(struct drm_gpuvm *gpuvm,
u64 addr, u64 range);
struct drm_gpuva *drm_gpuva_find_first(struct drm_gpuvm *gpuvm,
u64 addr, u64 range);
struct drm_gpuva *drm_gpuva_find_prev(struct drm_gpuvm *gpuvm, u64 start);
struct drm_gpuva *drm_gpuva_find_next(struct drm_gpuvm *gpuvm, u64 end);
Annotation
- Immediate include surface: `linux/dma-resv.h`, `linux/list.h`, `linux/llist.h`, `linux/rbtree.h`, `linux/types.h`, `drm/drm_device.h`, `drm/drm_gem.h`, `drm/drm_exec.h`.
- Detected declarations: `struct drm_gpuvm`, `struct drm_gpuvm_bo`, `struct drm_gpuvm_ops`, `struct drm_gpuva`, `struct drm_gpuvm`, `struct drm_gpuvm_exec`, `struct drm_gpuvm_bo`, `struct drm_gpuva_op_map`, `struct drm_gpuva_op_unmap`, `struct drm_gpuva_op_remap`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.