drivers/gpu/drm/i915/gvt/gvt.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/gvt/gvt.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/gvt/gvt.h- Extension
.h- Size
- 21718 bytes
- Lines
- 761
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
uapi/linux/pci_regs.hlinux/mdev.hlinux/vfio.hasm/kvm_page_track.hdisplay/intel_display_limits.hgt/intel_gt.hcmd_parser.hdebug.hdisplay.hdmabuf.hedid.hexeclist.hfb_decoder.hgtt.hintel_gvt.hinterrupt.hmmio.hmmio_context.hpage_track.hreg.hscheduler.htrace.h
Detected Declarations
struct engine_mmiostruct intel_gvt_device_infostruct intel_vgpu_gmstruct intel_vgpu_fencestruct intel_vgpu_mmiostruct intel_vgpu_pci_barstruct intel_vgpu_cfg_spacestruct intel_vgpu_irqstruct intel_vgpu_opregionstruct intel_vgpu_displaystruct vgpu_sched_ctlstruct intel_vgpu_submission_opsstruct intel_vgpu_submissionstruct intel_vgpustruct intel_gvt_gmstruct intel_gvt_fencestruct gvt_mmio_blockstruct intel_gvt_mmiostruct intel_gvt_firmwarestruct intel_vgpu_configstruct intel_vgpu_typestruct intel_gvtfunction intel_gvt_request_servicefunction for_each_iffunction intel_vgpu_get_bar_gpafunction mmio_hw_access_prefunction mmio_hw_access_postfunction intel_gvt_mmio_set_accessedfunction intel_gvt_mmio_is_cmd_accessiblefunction intel_gvt_mmio_set_cmd_accessiblefunction intel_gvt_mmio_is_unalignfunction intel_gvt_mmio_has_mode_maskfunction intel_gvt_mmio_is_sr_in_ctxfunction intel_gvt_mmio_set_sr_in_ctxfunction intel_gvt_mmio_set_cmd_write_patchfunction intel_gvt_mmio_is_cmd_write_patchfunction intel_gvt_read_gpafunction intel_gvt_write_gpa
Annotated Snippet
struct intel_gvt_device_info {
u32 max_support_vgpus;
u32 cfg_space_size;
u32 mmio_size;
u32 mmio_bar;
unsigned long msi_cap_offset;
u32 gtt_start_offset;
u32 gtt_entry_size;
u32 gtt_entry_size_shift;
int gmadr_bytes_in_cmd;
u32 max_surface_size;
};
/* GM resources owned by a vGPU */
struct intel_vgpu_gm {
u64 aperture_sz;
u64 hidden_sz;
struct drm_mm_node low_gm_node;
struct drm_mm_node high_gm_node;
};
#define INTEL_GVT_MAX_NUM_FENCES 32
/* Fences owned by a vGPU */
struct intel_vgpu_fence {
struct i915_fence_reg *regs[INTEL_GVT_MAX_NUM_FENCES];
u32 size;
};
struct intel_vgpu_mmio {
void *vreg;
};
#define INTEL_GVT_MAX_BAR_NUM 4
struct intel_vgpu_pci_bar {
u64 size;
bool tracked;
};
struct intel_vgpu_cfg_space {
unsigned char virtual_cfg_space[PCI_CFG_SPACE_EXP_SIZE];
struct intel_vgpu_pci_bar bar[INTEL_GVT_MAX_BAR_NUM];
u32 pmcsr_off;
};
#define vgpu_cfg_space(vgpu) ((vgpu)->cfg_space.virtual_cfg_space)
struct intel_vgpu_irq {
bool irq_warn_once[INTEL_GVT_EVENT_MAX];
DECLARE_BITMAP(flip_done_event[I915_MAX_PIPES],
INTEL_GVT_EVENT_MAX);
};
struct intel_vgpu_opregion {
void *va;
u32 gfn[INTEL_GVT_OPREGION_PAGES];
};
#define vgpu_opregion(vgpu) (&(vgpu->opregion))
struct intel_vgpu_display {
struct intel_vgpu_i2c_edid i2c_edid;
struct intel_vgpu_port ports[I915_MAX_PORTS];
struct intel_vgpu_sbi sbi;
enum port port_num;
};
struct vgpu_sched_ctl {
int weight;
};
enum {
INTEL_VGPU_EXECLIST_SUBMISSION = 1,
INTEL_VGPU_GUC_SUBMISSION,
};
struct intel_vgpu_submission_ops {
const char *name;
int (*init)(struct intel_vgpu *vgpu, intel_engine_mask_t engine_mask);
void (*clean)(struct intel_vgpu *vgpu, intel_engine_mask_t engine_mask);
void (*reset)(struct intel_vgpu *vgpu, intel_engine_mask_t engine_mask);
};
struct intel_vgpu_submission {
struct intel_vgpu_execlist execlist[I915_NUM_ENGINES];
struct list_head workload_q_head[I915_NUM_ENGINES];
struct intel_context *shadow[I915_NUM_ENGINES];
struct kmem_cache *workloads;
atomic_t running_workload_num;
Annotation
- Immediate include surface: `uapi/linux/pci_regs.h`, `linux/mdev.h`, `linux/vfio.h`, `asm/kvm_page_track.h`, `display/intel_display_limits.h`, `gt/intel_gt.h`, `cmd_parser.h`, `debug.h`.
- Detected declarations: `struct engine_mmio`, `struct intel_gvt_device_info`, `struct intel_vgpu_gm`, `struct intel_vgpu_fence`, `struct intel_vgpu_mmio`, `struct intel_vgpu_pci_bar`, `struct intel_vgpu_cfg_space`, `struct intel_vgpu_irq`, `struct intel_vgpu_opregion`, `struct intel_vgpu_display`.
- 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.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.