Commit 7643a7fa authored by Jesse Barnes's avatar Jesse Barnes

drm/i915: eDP mode set sequence corrections

We should disable the panel first when shutting down an eDP link.  And
when turning one on, the panel needs to be enabled before link training
or eDP I/O won't be enabled.
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 37c6c9b0
...@@ -840,20 +840,19 @@ intel_dp_dpms(struct drm_encoder *encoder, int mode) ...@@ -840,20 +840,19 @@ intel_dp_dpms(struct drm_encoder *encoder, int mode)
uint32_t dp_reg = I915_READ(intel_dp->output_reg); uint32_t dp_reg = I915_READ(intel_dp->output_reg);
if (mode != DRM_MODE_DPMS_ON) { if (mode != DRM_MODE_DPMS_ON) {
if (dp_reg & DP_PORT_EN) { if (IS_eDP(intel_dp) || IS_PCH_eDP(intel_dp)) {
intel_dp_link_down(intel_dp); ironlake_edp_backlight_off(dev);
if (IS_eDP(intel_dp) || IS_PCH_eDP(intel_dp)) { ironlake_edp_panel_off(dev);
ironlake_edp_backlight_off(dev);
ironlake_edp_panel_off(dev);
}
} }
if (dp_reg & DP_PORT_EN)
intel_dp_link_down(intel_dp);
} else { } else {
if (!(dp_reg & DP_PORT_EN)) { if (!(dp_reg & DP_PORT_EN)) {
intel_dp_link_train(intel_dp); if (IS_eDP(intel_dp) || IS_PCH_eDP(intel_dp))
if (IS_eDP(intel_dp) || IS_PCH_eDP(intel_dp)) {
ironlake_edp_panel_on(dev); ironlake_edp_panel_on(dev);
intel_dp_link_train(intel_dp);
if (IS_eDP(intel_dp) || IS_PCH_eDP(intel_dp))
ironlake_edp_backlight_on(dev); ironlake_edp_backlight_on(dev);
}
} }
} }
intel_dp->dpms_mode = mode; intel_dp->dpms_mode = mode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment