drivers/gpu/drm/i915/display/intel_hotplug_irq.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_hotplug_irq.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_hotplug_irq.c- Extension
.c- Size
- 41234 bytes
- Lines
- 1492
- 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
drm/drm_print.hintel_de.hintel_display_irq.hintel_display_regs.hintel_display_types.hintel_display_utils.hintel_dp_aux.hintel_gmbus.hintel_hotplug.hintel_hotplug_irq.h
Detected Declarations
struct intel_hotplug_irq_funcsfunction intel_hpd_init_pinsfunction i915_hotplug_interrupt_update_lockedfunction i915_hotplug_interrupt_updatefunction gen11_port_hotplug_long_detectfunction bxt_port_hotplug_long_detectfunction icp_ddi_port_hotplug_long_detectfunction icp_tc_port_hotplug_long_detectfunction spt_port_hotplug2_long_detectfunction spt_port_hotplug_long_detectfunction ilk_port_hotplug_long_detectfunction pch_port_hotplug_long_detectfunction i9xx_port_hotplug_long_detectfunction intel_get_hpd_pinsfunction for_each_hpd_pinfunction intel_hpd_enabled_irqsfunction intel_hpd_hotplug_irqsfunction intel_hpd_hotplug_maskfunction intel_hpd_hotplug_enablesfunction i9xx_hpd_irq_ackfunction i9xx_hpd_irq_handlerfunction ibx_hpd_irq_handlerfunction xelpdp_pica_irq_handlerfunction icp_irq_handlerfunction spt_irq_handlerfunction ilk_hpd_irq_handlerfunction bxt_hpd_irq_handlerfunction gen11_hpd_irq_handlerfunction ibx_hotplug_maskfunction ibx_hotplug_enablesfunction ibx_hpd_detection_setupfunction ibx_hpd_enable_detectionfunction ibx_hpd_irq_setupfunction icp_ddi_hotplug_maskfunction icp_ddi_hotplug_enablesfunction icp_tc_hotplug_maskfunction icp_tc_hotplug_enablesfunction icp_ddi_hpd_detection_setupfunction icp_ddi_hpd_enable_detectionfunction icp_tc_hpd_detection_setupfunction icp_tc_hpd_enable_detectionfunction icp_hpd_enable_detectionfunction icp_hpd_irq_setupfunction gen11_hotplug_maskfunction gen11_hotplug_enablesfunction dg1_hpd_invertfunction dg1_hpd_enable_detectionfunction dg1_hpd_irq_setup
Annotated Snippet
struct intel_hotplug_irq_funcs {
/* Enable HPD sense and interrupts for all present encoders */
void (*hpd_irq_setup)(struct intel_display *display);
/* Enable HPD sense for a single encoder */
void (*hpd_enable_detection)(struct intel_encoder *encoder);
};
#define HPD_FUNCS(platform) \
static const struct intel_hotplug_irq_funcs platform##_hpd_funcs = { \
.hpd_irq_setup = platform##_hpd_irq_setup, \
.hpd_enable_detection = platform##_hpd_enable_detection, \
}
HPD_FUNCS(i915);
HPD_FUNCS(xelpdp);
HPD_FUNCS(dg1);
HPD_FUNCS(gen11);
HPD_FUNCS(bxt);
HPD_FUNCS(icp);
HPD_FUNCS(spt);
HPD_FUNCS(ilk);
#undef HPD_FUNCS
void intel_hpd_enable_detection(struct intel_encoder *encoder)
{
struct intel_display *display = to_intel_display(encoder);
if (display->hotplug.funcs)
display->hotplug.funcs->hpd_enable_detection(encoder);
}
void intel_hpd_irq_setup(struct intel_display *display)
{
if ((display->platform.valleyview || display->platform.cherryview) &&
!display->irq.vlv_display_irqs_enabled)
return;
if (display->hotplug.funcs)
display->hotplug.funcs->hpd_irq_setup(display);
}
void intel_hotplug_irq_init(struct intel_display *display)
{
intel_hpd_init_pins(display);
intel_hpd_init_early(display);
if (HAS_GMCH(display)) {
if (HAS_HOTPLUG(display))
display->hotplug.funcs = &i915_hpd_funcs;
} else {
if (HAS_PCH_DG2(display))
display->hotplug.funcs = &icp_hpd_funcs;
else if (HAS_PCH_DG1(display))
display->hotplug.funcs = &dg1_hpd_funcs;
else if (DISPLAY_VER(display) >= 14)
display->hotplug.funcs = &xelpdp_hpd_funcs;
else if (DISPLAY_VER(display) >= 11)
display->hotplug.funcs = &gen11_hpd_funcs;
else if (display->platform.geminilake || display->platform.broxton)
display->hotplug.funcs = &bxt_hpd_funcs;
else if (INTEL_PCH_TYPE(display) >= PCH_ICP)
display->hotplug.funcs = &icp_hpd_funcs;
else if (INTEL_PCH_TYPE(display) >= PCH_SPT)
display->hotplug.funcs = &spt_hpd_funcs;
else
display->hotplug.funcs = &ilk_hpd_funcs;
}
}
Annotation
- Immediate include surface: `drm/drm_print.h`, `intel_de.h`, `intel_display_irq.h`, `intel_display_regs.h`, `intel_display_types.h`, `intel_display_utils.h`, `intel_dp_aux.h`, `intel_gmbus.h`.
- Detected declarations: `struct intel_hotplug_irq_funcs`, `function intel_hpd_init_pins`, `function i915_hotplug_interrupt_update_locked`, `function i915_hotplug_interrupt_update`, `function gen11_port_hotplug_long_detect`, `function bxt_port_hotplug_long_detect`, `function icp_ddi_port_hotplug_long_detect`, `function icp_tc_port_hotplug_long_detect`, `function spt_port_hotplug2_long_detect`, `function spt_port_hotplug_long_detect`.
- 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.