Commit 50b44a44 authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: clear DPLL reg when disabling i9xx dplls

Toghether with the hw state readout this should catch cases where we
don't properly updated the pll state (either in sw or hw). At least
for the shared dpll code the equivalent tricke helped a lot in
catching bugs.

Also rename the function prefix, it's not a generic piece of
infrastructure.
Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 3ad8a208
...@@ -1406,7 +1406,7 @@ static void i9xx_enable_pll(struct intel_crtc *crtc) ...@@ -1406,7 +1406,7 @@ static void i9xx_enable_pll(struct intel_crtc *crtc)
} }
/** /**
* intel_disable_pll - disable a PLL * i9xx_disable_pll - disable a PLL
* @dev_priv: i915 private structure * @dev_priv: i915 private structure
* @pipe: pipe PLL to disable * @pipe: pipe PLL to disable
* *
...@@ -1414,11 +1414,8 @@ static void i9xx_enable_pll(struct intel_crtc *crtc) ...@@ -1414,11 +1414,8 @@ static void i9xx_enable_pll(struct intel_crtc *crtc)
* *
* Note! This is for pre-ILK only. * Note! This is for pre-ILK only.
*/ */
static void intel_disable_pll(struct drm_i915_private *dev_priv, enum pipe pipe) static void i9xx_disable_pll(struct drm_i915_private *dev_priv, enum pipe pipe)
{ {
int reg;
u32 val;
/* Don't disable pipe A or pipe A PLLs if needed */ /* Don't disable pipe A or pipe A PLLs if needed */
if (pipe == PIPE_A && (dev_priv->quirks & QUIRK_PIPEA_FORCE)) if (pipe == PIPE_A && (dev_priv->quirks & QUIRK_PIPEA_FORCE))
return; return;
...@@ -1426,11 +1423,8 @@ static void intel_disable_pll(struct drm_i915_private *dev_priv, enum pipe pipe) ...@@ -1426,11 +1423,8 @@ static void intel_disable_pll(struct drm_i915_private *dev_priv, enum pipe pipe)
/* Make sure the pipe isn't still relying on us */ /* Make sure the pipe isn't still relying on us */
assert_pipe_disabled(dev_priv, pipe); assert_pipe_disabled(dev_priv, pipe);
reg = DPLL(pipe); I915_WRITE(DPLL(pipe), 0);
val = I915_READ(reg); POSTING_READ(DPLL(pipe));
val &= ~DPLL_VCO_ENABLE;
I915_WRITE(reg, val);
POSTING_READ(reg);
} }
void vlv_wait_port_ready(struct drm_i915_private *dev_priv, int port) void vlv_wait_port_ready(struct drm_i915_private *dev_priv, int port)
...@@ -3782,7 +3776,7 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc) ...@@ -3782,7 +3776,7 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
if (encoder->post_disable) if (encoder->post_disable)
encoder->post_disable(encoder); encoder->post_disable(encoder);
intel_disable_pll(dev_priv, pipe); i9xx_disable_pll(dev_priv, pipe);
intel_crtc->active = false; intel_crtc->active = false;
intel_update_fbc(dev); intel_update_fbc(dev);
......
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