drivers/gpu/drm/i915/display/intel_display_snapshot.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_display_snapshot.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_display_snapshot.c- Extension
.c- Size
- 1906 bytes
- Lines
- 76
- 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.
- 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/slab.hdrm/drm_drv.hintel_display_core.hintel_display_device.hintel_display_irq.hintel_display_params.hintel_display_snapshot.hintel_dmc.hintel_overlay.h
Detected Declarations
struct intel_display_snapshotfunction intel_display_snapshot_printfunction intel_display_snapshot_free
Annotated Snippet
struct intel_display_snapshot {
struct intel_display *display;
struct intel_display_device_info info;
struct intel_display_runtime_info runtime_info;
struct intel_display_params params;
struct intel_dmc_snapshot *dmc;
struct intel_display_irq_snapshot *irq;
};
struct intel_display_snapshot *intel_display_snapshot_capture(struct intel_display *display)
{
struct intel_display_snapshot *snapshot;
snapshot = kzalloc_obj(*snapshot, GFP_ATOMIC);
if (!snapshot)
return NULL;
snapshot->display = display;
memcpy(&snapshot->info, DISPLAY_INFO(display), sizeof(snapshot->info));
memcpy(&snapshot->runtime_info, DISPLAY_RUNTIME_INFO(display),
sizeof(snapshot->runtime_info));
intel_display_params_copy(&snapshot->params);
snapshot->irq = intel_display_irq_snapshot_capture(display);
snapshot->dmc = intel_dmc_snapshot_capture(display);
return snapshot;
}
void intel_display_snapshot_print(const struct intel_display_snapshot *snapshot,
struct drm_printer *p)
{
struct intel_display *display;
if (!snapshot)
return;
display = snapshot->display;
intel_display_device_info_print(&snapshot->info, &snapshot->runtime_info, p);
intel_display_params_dump(&snapshot->params, display->drm->driver->name, p);
intel_display_irq_snapshot_print(snapshot->irq, p);
intel_dmc_snapshot_print(snapshot->dmc, p);
}
void intel_display_snapshot_free(struct intel_display_snapshot *snapshot)
{
if (!snapshot)
return;
intel_display_params_free(&snapshot->params);
kfree(snapshot->irq);
kfree(snapshot->dmc);
kfree(snapshot);
}
Annotation
- Immediate include surface: `linux/slab.h`, `drm/drm_drv.h`, `intel_display_core.h`, `intel_display_device.h`, `intel_display_irq.h`, `intel_display_params.h`, `intel_display_snapshot.h`, `intel_dmc.h`.
- Detected declarations: `struct intel_display_snapshot`, `function intel_display_snapshot_print`, `function intel_display_snapshot_free`.
- 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.