drivers/gpu/drm/i915/display/intel_pps.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_pps.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_pps.c- Extension
.c- Size
- 54984 bytes
- Lines
- 1874
- 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
linux/debugfs.hlinux/iopoll.hdrm/drm_print.hg4x_dp.hintel_de.hintel_display_jiffies.hintel_display_power_well.hintel_display_regs.hintel_display_types.hintel_display_utils.hintel_dp.hintel_dpio_phy.hintel_dpll.hintel_lvds.hintel_lvds_regs.hintel_pps.hintel_pps_regs.hintel_quirks.h
Detected Declarations
struct pps_registersfunction vlv_power_sequencer_kickfunction vlv_find_free_ppsfunction vlv_power_sequencer_pipefunction bxt_power_sequencer_idxfunction pps_has_pp_onfunction pps_has_vdd_onfunction pps_anyfunction vlv_initial_pps_pipefunction vlv_initial_power_sequencer_setupfunction intel_num_ppsfunction intel_pps_is_validfunction bxt_initial_pps_idxfunction pps_initial_setupfunction vlv_pps_reset_allfunction for_each_intel_dpfunction bxt_pps_reset_allfunction for_each_intel_dpfunction intel_pps_get_registersfunction _pp_ctrl_regfunction _pp_stat_regfunction edp_have_panel_powerfunction edp_have_panel_vddfunction intel_pps_check_power_unlockedfunction wait_panel_statusfunction wait_panel_onfunction wait_panel_offfunction wait_panel_power_cyclefunction intel_pps_wait_power_cyclefunction wait_backlight_onfunction edp_wait_backlight_offfunction ilk_get_pp_controlfunction intel_pps_vdd_off_unlockedfunction intel_pps_vdd_offfunction intel_pps_vdd_off_sync_unlockedfunction intel_pps_vdd_off_syncfunction edp_panel_vdd_workfunction with_intel_pps_lockfunction edp_panel_vdd_schedule_offfunction edp_panel_vdd_onfunction intel_pps_vdd_offfunction intel_pps_on_unlockedfunction intel_pps_onfunction intel_pps_off_unlockedfunction intel_pps_offfunction intel_pps_backlight_onfunction with_intel_pps_lockfunction intel_pps_backlight_off
Annotated Snippet
struct pps_registers {
intel_reg_t pp_ctrl;
intel_reg_t pp_stat;
intel_reg_t pp_on;
intel_reg_t pp_off;
intel_reg_t pp_div;
};
static void intel_pps_get_registers(struct intel_dp *intel_dp,
struct pps_registers *regs)
{
struct intel_display *display = to_intel_display(intel_dp);
int pps_idx;
memset(regs, 0, sizeof(*regs));
if (display->platform.valleyview || display->platform.cherryview)
pps_idx = vlv_power_sequencer_pipe(intel_dp);
else if (display->platform.geminilake || display->platform.broxton)
pps_idx = bxt_power_sequencer_idx(intel_dp);
else
pps_idx = intel_dp->pps.pps_idx;
regs->pp_ctrl = PP_CONTROL(display, pps_idx);
regs->pp_stat = PP_STATUS(display, pps_idx);
regs->pp_on = PP_ON_DELAYS(display, pps_idx);
regs->pp_off = PP_OFF_DELAYS(display, pps_idx);
/* Cycle delay moved from PP_DIVISOR to PP_CONTROL */
if (display->platform.geminilake || display->platform.broxton ||
INTEL_PCH_TYPE(display) >= PCH_CNP)
regs->pp_div = INVALID_MMIO_REG;
else
regs->pp_div = PP_DIVISOR(display, pps_idx);
}
static intel_reg_t
_pp_ctrl_reg(struct intel_dp *intel_dp)
{
struct pps_registers regs;
intel_pps_get_registers(intel_dp, ®s);
return regs.pp_ctrl;
}
static intel_reg_t
_pp_stat_reg(struct intel_dp *intel_dp)
{
struct pps_registers regs;
intel_pps_get_registers(intel_dp, ®s);
return regs.pp_stat;
}
static bool edp_have_panel_power(struct intel_dp *intel_dp)
{
struct intel_display *display = to_intel_display(intel_dp);
lockdep_assert_held(&display->pps.mutex);
if ((display->platform.valleyview || display->platform.cherryview) &&
intel_dp->pps.vlv_pps_pipe == INVALID_PIPE)
return false;
return (intel_de_read(display, _pp_stat_reg(intel_dp)) & PP_ON) != 0;
}
static bool edp_have_panel_vdd(struct intel_dp *intel_dp)
{
struct intel_display *display = to_intel_display(intel_dp);
lockdep_assert_held(&display->pps.mutex);
if ((display->platform.valleyview || display->platform.cherryview) &&
intel_dp->pps.vlv_pps_pipe == INVALID_PIPE)
return false;
return intel_de_read(display, _pp_ctrl_reg(intel_dp)) & EDP_FORCE_VDD;
}
void intel_pps_check_power_unlocked(struct intel_dp *intel_dp)
{
struct intel_display *display = to_intel_display(intel_dp);
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
if (!intel_dp_is_edp(intel_dp))
return;
Annotation
- Immediate include surface: `linux/debugfs.h`, `linux/iopoll.h`, `drm/drm_print.h`, `g4x_dp.h`, `intel_de.h`, `intel_display_jiffies.h`, `intel_display_power_well.h`, `intel_display_regs.h`.
- Detected declarations: `struct pps_registers`, `function vlv_power_sequencer_kick`, `function vlv_find_free_pps`, `function vlv_power_sequencer_pipe`, `function bxt_power_sequencer_idx`, `function pps_has_pp_on`, `function pps_has_vdd_on`, `function pps_any`, `function vlv_initial_pps_pipe`, `function vlv_initial_power_sequencer_setup`.
- 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.