drivers/gpu/drm/i915/i915_drv.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/i915_drv.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/i915_drv.h- Extension
.h- Size
- 21927 bytes
- Lines
- 668
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
uapi/drm/i915_drm.hlinux/pci.hlinux/pm_qos.hdrm/ttm/ttm_device.hgem/i915_gem_context_types.hgem/i915_gem_shrinker.hgem/i915_gem_stolen.hgt/intel_engine.hgt/intel_gt_types.hgt/intel_region_lmem.hgt/intel_workarounds.hgt/uc/intel_uc.hi915_drm_client.hi915_gem.hi915_gpu_error.hi915_params.hi915_perf_types.hi915_scheduler.hi915_utils.hintel_device_info.hintel_memory_region.hintel_runtime_pm.hintel_step.hintel_uncore.h
Detected Declarations
struct drm_i915_clock_gating_funcsstruct i915_overlaystruct intel_displaystruct intel_pxpstruct vlv_s0ix_statestruct i915_dsmstruct intel_l3_paritystruct i915_gem_mmstruct i915_virtual_gpustruct i915_selftest_stashstruct drm_i915_privatestruct i915_gem_contextsfunction RUNTIME_INFOfunction __platform_mask_bitfunction intel_subplatformfunction IS_PLATFORMfunction IS_SUBPLATFORM
Annotated Snippet
struct i915_dsm {
/*
* The start and end of DSM which we can optionally use to create GEM
* objects backed by stolen memory.
*
* Note that usable_size tells us exactly how much of this we are
* actually allowed to use, given that some portion of it is in fact
* reserved for use by hardware functions.
*/
struct resource stolen;
/*
* Reserved portion of DSM.
*/
struct resource reserved;
/*
* Total size minus reserved ranges.
*
* DSM is segmented in hardware with different portions offlimits to
* certain functions.
*
* The drm_mm is initialised to the total accessible range, as found
* from the PCI config. On Broadwell+, this is further restricted to
* avoid the first page! The upper end of DSM is reserved for hardware
* functions and similarly removed from the accessible range.
*/
resource_size_t usable_size;
};
#define MAX_L3_SLICES 2
struct intel_l3_parity {
u32 *remap_info[MAX_L3_SLICES];
struct work_struct error_work;
int which_slice;
};
struct i915_gem_mm {
/*
* Shortcut for the stolen region. This points to either
* INTEL_REGION_STOLEN_SMEM for integrated platforms, or
* INTEL_REGION_STOLEN_LMEM for discrete, or NULL if the device doesn't
* support stolen.
*/
struct intel_memory_region *stolen_region;
/** Memory allocator for GTT stolen memory */
struct drm_mm stolen;
/** Protects the usage of the GTT stolen memory allocator */
struct mutex stolen_lock;
/* Protects bound_list/unbound_list and #drm_i915_gem_object.mm.link */
spinlock_t obj_lock;
/**
* List of objects which are purgeable.
*/
struct list_head purge_list;
/**
* List of objects which have allocated pages and are shrinkable.
*/
struct list_head shrink_list;
/**
* List of objects which are pending destruction.
*/
struct llist_head free_list;
struct work_struct free_work;
/**
* Count of objects pending destructions. Used to skip needlessly
* waiting on an RCU barrier if no objects are waiting to be freed.
*/
atomic_t free_count;
struct intel_memory_region *regions[INTEL_REGION_UNKNOWN];
struct notifier_block oom_notifier;
struct notifier_block vmap_notifier;
struct shrinker *shrinker;
/* shrinker accounting, also useful for userland debugging */
u64 shrink_memory;
u32 shrink_count;
};
struct i915_virtual_gpu {
struct mutex lock; /* serialises sending of g2v_notify command pkts */
bool active;
u32 caps;
u32 *initial_mmio;
Annotation
- Immediate include surface: `uapi/drm/i915_drm.h`, `linux/pci.h`, `linux/pm_qos.h`, `drm/ttm/ttm_device.h`, `gem/i915_gem_context_types.h`, `gem/i915_gem_shrinker.h`, `gem/i915_gem_stolen.h`, `gt/intel_engine.h`.
- Detected declarations: `struct drm_i915_clock_gating_funcs`, `struct i915_overlay`, `struct intel_display`, `struct intel_pxp`, `struct vlv_s0ix_state`, `struct i915_dsm`, `struct intel_l3_parity`, `struct i915_gem_mm`, `struct i915_virtual_gpu`, `struct i915_selftest_stash`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.