drivers/gpu/drm/i915/i915_ttm_buddy_manager.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/i915_ttm_buddy_manager.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/i915_ttm_buddy_manager.h- Extension
.h- Size
- 1960 bytes
- Lines
- 73
- 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
linux/list.hlinux/types.hdrm/ttm/ttm_resource.h
Detected Declarations
struct ttm_devicestruct ttm_resource_managerstruct gpu_buddystruct i915_ttm_buddy_resourcefunction to_ttm_buddy_resource
Annotated Snippet
struct i915_ttm_buddy_resource {
struct ttm_resource base;
struct list_head blocks;
unsigned long flags;
unsigned long used_visible_size;
struct gpu_buddy *mm;
};
/**
* to_ttm_buddy_resource
*
* @res: the resource to upcast
*
* Upcast the struct ttm_resource object into a struct i915_ttm_buddy_resource.
*/
static inline struct i915_ttm_buddy_resource *
to_ttm_buddy_resource(struct ttm_resource *res)
{
return container_of(res, struct i915_ttm_buddy_resource, base);
}
int i915_ttm_buddy_man_init(struct ttm_device *bdev,
unsigned type, bool use_tt,
u64 size, u64 visible_size,
u64 default_page_size, u64 chunk_size);
int i915_ttm_buddy_man_fini(struct ttm_device *bdev,
unsigned int type);
int i915_ttm_buddy_man_reserve(struct ttm_resource_manager *man,
u64 start, u64 size);
u64 i915_ttm_buddy_man_visible_size(struct ttm_resource_manager *man);
void i915_ttm_buddy_man_avail(struct ttm_resource_manager *man,
u64 *avail, u64 *avail_visible);
#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
void i915_ttm_buddy_man_force_visible_size(struct ttm_resource_manager *man,
u64 size);
#endif
#endif
Annotation
- Immediate include surface: `linux/list.h`, `linux/types.h`, `drm/ttm/ttm_resource.h`.
- Detected declarations: `struct ttm_device`, `struct ttm_resource_manager`, `struct gpu_buddy`, `struct i915_ttm_buddy_resource`, `function to_ttm_buddy_resource`.
- 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.