aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 57552eb386b0..2688f6d64bb9 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1249,17 +1249,24 @@ void ironlake_edp_panel_off(struct intel_dp *intel_dp)
1249 1249
1250 DRM_DEBUG_KMS("Turn eDP power off\n"); 1250 DRM_DEBUG_KMS("Turn eDP power off\n");
1251 1251
1252 WARN(!intel_dp->want_panel_vdd, "Need VDD to turn off panel\n");
1253
1252 pp = ironlake_get_pp_control(intel_dp); 1254 pp = ironlake_get_pp_control(intel_dp);
1253 /* We need to switch off panel power _and_ force vdd, for otherwise some 1255 /* We need to switch off panel power _and_ force vdd, for otherwise some
1254 * panels get very unhappy and cease to work. */ 1256 * panels get very unhappy and cease to work. */
1255 pp &= ~(POWER_TARGET_ON | PANEL_POWER_RESET | EDP_BLC_ENABLE); 1257 pp &= ~(POWER_TARGET_ON | EDP_FORCE_VDD | PANEL_POWER_RESET | EDP_BLC_ENABLE);
1256 1258
1257 pp_ctrl_reg = _pp_ctrl_reg(intel_dp); 1259 pp_ctrl_reg = _pp_ctrl_reg(intel_dp);
1258 1260
1259 I915_WRITE(pp_ctrl_reg, pp); 1261 I915_WRITE(pp_ctrl_reg, pp);
1260 POSTING_READ(pp_ctrl_reg); 1262 POSTING_READ(pp_ctrl_reg);
1261 1263
1264 intel_dp->want_panel_vdd = false;
1265
1262 ironlake_wait_panel_off(intel_dp); 1266 ironlake_wait_panel_off(intel_dp);
1267
1268 /* We got a reference when we enabled the VDD. */
1269 intel_runtime_pm_put(dev_priv);
1263} 1270}
1264 1271
1265void ironlake_edp_backlight_on(struct intel_dp *intel_dp) 1272void ironlake_edp_backlight_on(struct intel_dp *intel_dp)
@@ -1639,7 +1646,7 @@ static void intel_edp_psr_enable_source(struct intel_dp *intel_dp)
1639 val |= EDP_PSR_LINK_DISABLE; 1646 val |= EDP_PSR_LINK_DISABLE;
1640 1647
1641 I915_WRITE(EDP_PSR_CTL(dev), val | 1648 I915_WRITE(EDP_PSR_CTL(dev), val |
1642 IS_BROADWELL(dev) ? 0 : link_entry_time | 1649 (IS_BROADWELL(dev) ? 0 : link_entry_time) |
1643 max_sleep_time << EDP_PSR_MAX_SLEEP_TIME_SHIFT | 1650 max_sleep_time << EDP_PSR_MAX_SLEEP_TIME_SHIFT |
1644 idle_frames << EDP_PSR_IDLE_FRAME_SHIFT | 1651 idle_frames << EDP_PSR_IDLE_FRAME_SHIFT |
1645 EDP_PSR_ENABLE); 1652 EDP_PSR_ENABLE);
@@ -1784,6 +1791,7 @@ static void intel_disable_dp(struct intel_encoder *encoder)
1784 1791
1785 /* Make sure the panel is off before trying to change the mode. But also 1792 /* Make sure the panel is off before trying to change the mode. But also
1786 * ensure that we have vdd while we switch off the panel. */ 1793 * ensure that we have vdd while we switch off the panel. */
1794 ironlake_edp_panel_vdd_on(intel_dp);
1787 ironlake_edp_backlight_off(intel_dp); 1795 ironlake_edp_backlight_off(intel_dp);
1788 intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF); 1796 intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
1789 ironlake_edp_panel_off(intel_dp); 1797 ironlake_edp_panel_off(intel_dp);