drivers/gpu/drm/i915/gvt/vgpu.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/gvt/vgpu.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/gvt/vgpu.c- Extension
.c- Size
- 15219 bytes
- Lines
- 514
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/vmalloc.hdrm/drm_print.hgvt.hi915_drv.hi915_pvinfo.hsched_policy.h
Detected Declarations
function Copyrightfunction intel_gvt_init_vgpu_typesfunction intel_gvt_clean_vgpu_typesfunction intel_gvt_activate_vgpufunction intel_gvt_deactivate_vgpufunction intel_gvt_release_vgpufunction intel_gvt_destroy_vgpufunction intel_gvt_destroy_idle_vgpufunction intel_gvt_create_vgpufunction Resetfunction intel_gvt_reset_vgpu
Annotated Snippet
if (dmlr) {
if(!vgpu->d3_entered) {
intel_vgpu_invalidate_ppgtt(vgpu);
intel_vgpu_destroy_all_ppgtt_mm(vgpu);
}
intel_vgpu_reset_ggtt(vgpu, true);
intel_vgpu_reset_resource(vgpu);
}
intel_vgpu_reset_mmio(vgpu, dmlr);
populate_pvinfo_page(vgpu);
if (dmlr) {
intel_vgpu_reset_display(vgpu);
intel_vgpu_reset_cfg_space(vgpu);
/* only reset the failsafe mode when dmlr reset */
vgpu->failsafe = false;
/*
* PCI_D0 is set before dmlr, so reset d3_entered here
* after done using.
*/
if(vgpu->d3_entered)
vgpu->d3_entered = false;
else
vgpu->pv_notified = false;
}
}
vgpu->resetting_eng = 0;
gvt_dbg_core("reset vgpu%d done\n", vgpu->id);
gvt_dbg_core("------------------------------------------\n");
}
/**
* intel_gvt_reset_vgpu - reset a virtual GPU (Function Level)
* @vgpu: virtual GPU
*
* This function is called when user wants to reset a virtual GPU.
*
*/
void intel_gvt_reset_vgpu(struct intel_vgpu *vgpu)
{
mutex_lock(&vgpu->vgpu_lock);
intel_gvt_reset_vgpu_locked(vgpu, true, 0);
mutex_unlock(&vgpu->vgpu_lock);
}
Annotation
- Immediate include surface: `linux/vmalloc.h`, `drm/drm_print.h`, `gvt.h`, `i915_drv.h`, `i915_pvinfo.h`, `sched_policy.h`.
- Detected declarations: `function Copyright`, `function intel_gvt_init_vgpu_types`, `function intel_gvt_clean_vgpu_types`, `function intel_gvt_activate_vgpu`, `function intel_gvt_deactivate_vgpu`, `function intel_gvt_release_vgpu`, `function intel_gvt_destroy_vgpu`, `function intel_gvt_destroy_idle_vgpu`, `function intel_gvt_create_vgpu`, `function Reset`.
- 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.