aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2011-10-12 12:27:42 -0400
committerKeith Packard <keithp@keithp.com>2011-10-20 18:26:43 -0400
commitd3ccbe8670520fc61cbe974c97761b0dfc57f6df (patch)
treea3cfec0ebd4390f5dc02cb07844aa2ed3aaa9937
parent75770564c90c45618003267f4cdde4bbc090f1bd (diff)
drm/i915: fix PCH PLL assertion check for 3 pipes
Add a couple of checks now that we're using the 3rd transcoder: 1) make sure the transcoder PLL enable bit is set for the transcoder in question 2) when checking actual PLL enable, use the selected PLL number rather than the transcoder number (they could be different now) Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Tested-By: Eugeni Dodonov <eugeni.dodonov@intel.com> Reviewed-By: Eugeni Dodonov <eugeni.dodonov@intel.com> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3b62b919fad5..63f81416033e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -803,6 +803,19 @@ static void assert_pch_pll(struct drm_i915_private *dev_priv,
803 u32 val; 803 u32 val;
804 bool cur_state; 804 bool cur_state;
805 805
806 if (HAS_PCH_CPT(dev_priv->dev)) {
807 u32 pch_dpll;
808
809 pch_dpll = I915_READ(PCH_DPLL_SEL);
810
811 /* Make sure the selected PLL is enabled to the transcoder */
812 WARN(!((pch_dpll >> (4 * pipe)) & 8),
813 "transcoder %d PLL not enabled\n", pipe);
814
815 /* Convert the transcoder pipe number to a pll pipe number */
816 pipe = (pch_dpll >> (4 * pipe)) & 1;
817 }
818
806 reg = PCH_DPLL(pipe); 819 reg = PCH_DPLL(pipe);
807 val = I915_READ(reg); 820 val = I915_READ(reg);
808 cur_state = !!(val & DPLL_VCO_ENABLE); 821 cur_state = !!(val & DPLL_VCO_ENABLE);