aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2011-11-15 13:28:53 -0500
committerKeith Packard <keithp@keithp.com>2012-01-03 17:55:47 -0500
commit7a4198664d46b87025a64530f1530ab2bea54c19 (patch)
treec6388ac83d02d5f4cdc396308339a3cbe3363a85 /drivers/gpu/drm
parente6bfaf854272ec4641a9ef7b1cb1ca963031ba95 (diff)
drm/i915: don't disable a PCH DPLL that's in use
If a PCH pipe PLL is being used by transcoder C, don't disable it. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 2e00c8ae361..bdab82b999e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1204,7 +1204,8 @@ static void intel_disable_pch_pll(struct drm_i915_private *dev_priv,
1204 enum pipe pipe) 1204 enum pipe pipe)
1205{ 1205{
1206 int reg; 1206 int reg;
1207 u32 val; 1207 u32 val, pll_mask = TRANSC_DPLL_ENABLE | TRANSC_DPLLB_SEL,
1208 pll_sel = TRANSC_DPLL_ENABLE;
1208 1209
1209 if (pipe > 1) 1210 if (pipe > 1)
1210 return; 1211 return;
@@ -1215,6 +1216,15 @@ static void intel_disable_pch_pll(struct drm_i915_private *dev_priv,
1215 /* Make sure transcoder isn't still depending on us */ 1216 /* Make sure transcoder isn't still depending on us */
1216 assert_transcoder_disabled(dev_priv, pipe); 1217 assert_transcoder_disabled(dev_priv, pipe);
1217 1218
1219 if (pipe == 0)
1220 pll_sel |= TRANSC_DPLLA_SEL;
1221 else if (pipe == 1)
1222 pll_sel |= TRANSC_DPLLB_SEL;
1223
1224
1225 if ((I915_READ(PCH_DPLL_SEL) & pll_mask) == pll_sel)
1226 return;
1227
1218 reg = PCH_DPLL(pipe); 1228 reg = PCH_DPLL(pipe);
1219 val = I915_READ(reg); 1229 val = I915_READ(reg);
1220 val &= ~DPLL_VCO_ENABLE; 1230 val &= ~DPLL_VCO_ENABLE;