drivers/gpu/drm/lima/lima_vm.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/lima/lima_vm.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/lima/lima_vm.h- Extension
.h- Size
- 1539 bytes
- Lines
- 65
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
drm/drm_mm.hlinux/kref.h
Detected Declarations
struct lima_devicestruct lima_vm_pagestruct lima_vmfunction lima_vm_put
Annotated Snippet
struct lima_vm_page {
u32 *cpu;
dma_addr_t dma;
};
struct lima_vm {
struct mutex lock;
struct kref refcount;
struct drm_mm mm;
struct lima_device *dev;
struct lima_vm_page pd;
struct lima_vm_page bts[LIMA_VM_NUM_BT];
};
int lima_vm_bo_add(struct lima_vm *vm, struct lima_bo *bo, bool create);
void lima_vm_bo_del(struct lima_vm *vm, struct lima_bo *bo);
u32 lima_vm_get_va(struct lima_vm *vm, struct lima_bo *bo);
struct lima_vm *lima_vm_create(struct lima_device *dev);
void lima_vm_release(struct kref *kref);
static inline struct lima_vm *lima_vm_get(struct lima_vm *vm)
{
kref_get(&vm->refcount);
return vm;
}
static inline void lima_vm_put(struct lima_vm *vm)
{
if (vm)
kref_put(&vm->refcount, lima_vm_release);
}
void lima_vm_print(struct lima_vm *vm);
int lima_vm_map_bo(struct lima_vm *vm, struct lima_bo *bo, int pageoff);
#endif
Annotation
- Immediate include surface: `drm/drm_mm.h`, `linux/kref.h`.
- Detected declarations: `struct lima_device`, `struct lima_vm_page`, `struct lima_vm`, `function lima_vm_put`.
- Atlas domain: Driver Families / drivers/gpu.
- 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.