• Ville Syrjälä's avatar
    drm/i915: Read out the power sequencer port assignment on resume on vlv/chv · 49e6bc51
    Ville Syrjälä authored
    When we suspend we turn everything off so the pps should be idle, and we
    also (or at least should) disable all power wells which will reset the
    power sequencer port assignment. So when we resume all power sequencers
    should be in their reset state. However it's at least theoretically
    possible that the BIOS would touch the power seuqencer(s), so to be safe
    we ought to read out the current port assignment like we do at driver
    init time.
    
    To do that we can simply call vlv_initial_power_sequencer_setup() from
    the encoder ->reset() hook before calling intel_edp_panel_vdd_sanitize().
    There's no danger or clobbering the pps delays since we now have those
    stored within intel_dp and we don't change them once initialized.
    
    This will make sure that the vdd state gets correctly tracked post-resume
    in case the BIOS enabled it.
    
    We need to shuffle things around a bit to get the locking right, and
    while at it, make intel_edp_panel_vdd_sanitize() static and move it
    around a bit to avoid a forward declaration.
    
    Cc: Imre Deak <imre.deak@intel.com>
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    49e6bc51
intel_dp.c 155 KB