drivers/gpu/drm/i915/display/intel_dpt.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_dpt.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_dpt.c- Extension
.c- Size
- 2641 bytes
- Lines
- 95
- 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
intel_de.hintel_display_regs.hintel_display_types.hintel_dpt.hintel_parent.hskl_universal_plane_regs.h
Detected Declarations
function intel_dpt_configurefunction for_each_plane_id_on_crtcfunction i915_ggtt_suspendfunction drm_for_each_fbfunction i915_ggtt_resume
Annotated Snippet
for_each_plane_id_on_crtc(crtc, plane_id) {
if (plane_id == PLANE_CURSOR)
continue;
intel_de_rmw(display, PLANE_CHICKEN(pipe, plane_id),
PLANE_CHICKEN_DISABLE_DPT,
display->params.enable_dpt ? 0 :
PLANE_CHICKEN_DISABLE_DPT);
}
} else if (DISPLAY_VER(display) == 13) {
intel_de_rmw(display, CHICKEN_MISC_2,
CHICKEN_MISC_DISABLE_DPT,
display->params.enable_dpt ? 0 :
CHICKEN_MISC_DISABLE_DPT);
}
}
/**
* intel_dpt_suspend - suspend the memory mapping for all DPT FBs during system suspend
* @display: display device instance
*
* Suspend the memory mapping during system suspend for all framebuffers which
* are mapped to HW via a GGTT->DPT page table.
*
* This function must be called before the mappings in GGTT are suspended calling
* i915_ggtt_suspend().
*/
void intel_dpt_suspend(struct intel_display *display)
{
struct drm_framebuffer *drm_fb;
if (!HAS_DISPLAY(display))
return;
mutex_lock(&display->drm->mode_config.fb_lock);
drm_for_each_fb(drm_fb, display->drm) {
struct intel_framebuffer *fb = to_intel_framebuffer(drm_fb);
if (fb->dpt)
intel_parent_dpt_suspend(display, fb->dpt);
}
mutex_unlock(&display->drm->mode_config.fb_lock);
}
/**
* intel_dpt_resume - restore the memory mapping for all DPT FBs during system resume
* @display: display device instance
*
* Restore the memory mapping during system resume for all framebuffers which
* are mapped to HW via a GGTT->DPT page table. The content of these page
* tables are not stored in the hibernation image during S4 and S3RST->S4
* transitions, so here we reprogram the PTE entries in those tables.
*
* This function must be called after the mappings in GGTT have been restored calling
* i915_ggtt_resume().
*/
void intel_dpt_resume(struct intel_display *display)
{
struct drm_framebuffer *drm_fb;
if (!HAS_DISPLAY(display))
return;
mutex_lock(&display->drm->mode_config.fb_lock);
drm_for_each_fb(drm_fb, display->drm) {
struct intel_framebuffer *fb = to_intel_framebuffer(drm_fb);
if (fb->dpt)
intel_parent_dpt_resume(display, fb->dpt);
}
mutex_unlock(&display->drm->mode_config.fb_lock);
}
Annotation
- Immediate include surface: `intel_de.h`, `intel_display_regs.h`, `intel_display_types.h`, `intel_dpt.h`, `intel_parent.h`, `skl_universal_plane_regs.h`.
- Detected declarations: `function intel_dpt_configure`, `function for_each_plane_id_on_crtc`, `function i915_ggtt_suspend`, `function drm_for_each_fb`, `function i915_ggtt_resume`.
- 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.