aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni.dodonov@intel.com>2012-05-09 14:37:17 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-05-19 16:39:46 -0400
commit9d82aa17407a9f3fcdd235799fa0eaed3ed1e2f1 (patch)
tree9c111465d90e5070330164cfc2184763c76cd656 /drivers/gpu/drm/i915/intel_display.c
parentd0d3e513609a19de52a42ee25ce40fd5b55b5a38 (diff)
drm/i915: add LPT PCH checks
Avoid bogus asserts and PCH PLL accesses on Lynx Point. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index bb049a178632..c8f85de137e3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -916,6 +916,11 @@ static void assert_pch_pll(struct drm_i915_private *dev_priv,
916 u32 val; 916 u32 val;
917 bool cur_state; 917 bool cur_state;
918 918
919 if (HAS_PCH_LPT(dev_priv->dev)) {
920 DRM_DEBUG_DRIVER("LPT detected: skipping PCH PLL test\n");
921 return;
922 }
923
919 if (!intel_crtc->pch_pll) { 924 if (!intel_crtc->pch_pll) {
920 WARN(1, "asserting PCH PLL enabled with no PLL\n"); 925 WARN(1, "asserting PCH PLL enabled with no PLL\n");
921 return; 926 return;
@@ -1101,6 +1106,11 @@ static void assert_pch_refclk_enabled(struct drm_i915_private *dev_priv)
1101 u32 val; 1106 u32 val;
1102 bool enabled; 1107 bool enabled;
1103 1108
1109 if (HAS_PCH_LPT(dev_priv->dev)) {
1110 DRM_DEBUG_DRIVER("LPT does not has PCH refclk, skipping check\n");
1111 return;
1112 }
1113
1104 val = I915_READ(PCH_DREF_CONTROL); 1114 val = I915_READ(PCH_DREF_CONTROL);
1105 enabled = !!(val & (DREF_SSC_SOURCE_MASK | DREF_NONSPREAD_SOURCE_MASK | 1115 enabled = !!(val & (DREF_SSC_SOURCE_MASK | DREF_NONSPREAD_SOURCE_MASK |
1106 DREF_SUPERSPREAD_SOURCE_MASK)); 1116 DREF_SUPERSPREAD_SOURCE_MASK));
@@ -4406,8 +4416,12 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
4406 DRM_DEBUG_KMS("Mode for pipe %d:\n", pipe); 4416 DRM_DEBUG_KMS("Mode for pipe %d:\n", pipe);
4407 drm_mode_debug_printmodeline(mode); 4417 drm_mode_debug_printmodeline(mode);
4408 4418
4409 /* CPU eDP is the only output that doesn't need a PCH PLL of its own */ 4419 /* CPU eDP is the only output that doesn't need a PCH PLL of its own on
4410 if (!is_cpu_edp) { 4420 * pre-Haswell/LPT generation */
4421 if (HAS_PCH_LPT(dev)) {
4422 DRM_DEBUG_KMS("LPT detected: no PLL for pipe %d necessary\n",
4423 pipe);
4424 } else if (!is_cpu_edp) {
4411 struct intel_pch_pll *pll; 4425 struct intel_pch_pll *pll;
4412 4426
4413 pll = intel_get_pch_pll(intel_crtc, dpll, fp); 4427 pll = intel_get_pch_pll(intel_crtc, dpll, fp);