aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorVijay Purushothaman <vijay.a.purushothaman@linux.intel.com>2015-03-05 09:02:06 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-17 17:30:13 -0400
commitde3a0fde9afe551440db486f3f5ee52c8f15120a (patch)
tree4e8ea2c191542137e8880a723e6c0b2ff66510ee /drivers/gpu/drm
parenta945ce7e4eeb9c629d8a75b78203b026f74c2ea2 (diff)
drm/i915: Initialize CHV digital lock detect threshold
Initialize lock detect threshold and select coarse threshold for the case where M2 fraction division is disabled. v2: Split the changes into multiple smaller patches (Ville) v3: Clear out the old bits before we modify those bits as RMW (Ville) v4: Reset coarse threshold when M2 fraction is enabled (Ville) Signed-off-by: Vijay Purushothaman <vijay.a.purushothaman@linux.intel.com> Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h1
-rw-r--r--drivers/gpu/drm/i915/intel_display.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 17b662f0849d..4c64f17f188d 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1046,6 +1046,7 @@ enum skl_disp_power_wells {
1046#define _CHV_PLL_DW9_CH0 0x8024 1046#define _CHV_PLL_DW9_CH0 0x8024
1047#define _CHV_PLL_DW9_CH1 0x81A4 1047#define _CHV_PLL_DW9_CH1 0x81A4
1048#define DPIO_CHV_INT_LOCK_THRESHOLD_SHIFT 1 /* 3 bits */ 1048#define DPIO_CHV_INT_LOCK_THRESHOLD_SHIFT 1 /* 3 bits */
1049#define DPIO_CHV_INT_LOCK_THRESHOLD_MASK (7 << 1)
1049#define DPIO_CHV_INT_LOCK_THRESHOLD_SEL_COARSE 1 /* 1: coarse & 0 : fine */ 1050#define DPIO_CHV_INT_LOCK_THRESHOLD_SEL_COARSE 1 /* 1: coarse & 0 : fine */
1050#define CHV_PLL_DW9(ch) _PIPE(ch, _CHV_PLL_DW9_CH0, _CHV_PLL_DW9_CH1) 1051#define CHV_PLL_DW9(ch) _PIPE(ch, _CHV_PLL_DW9_CH0, _CHV_PLL_DW9_CH1)
1051 1052
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 8676cb8deaf8..2eea258e5865 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6207,6 +6207,15 @@ static void chv_prepare_pll(struct intel_crtc *crtc,
6207 dpio_val |= DPIO_CHV_FRAC_DIV_EN; 6207 dpio_val |= DPIO_CHV_FRAC_DIV_EN;
6208 vlv_dpio_write(dev_priv, pipe, CHV_PLL_DW3(port), dpio_val); 6208 vlv_dpio_write(dev_priv, pipe, CHV_PLL_DW3(port), dpio_val);
6209 6209
6210 /* Program digital lock detect threshold */
6211 dpio_val = vlv_dpio_read(dev_priv, pipe, CHV_PLL_DW9(port));
6212 dpio_val &= ~(DPIO_CHV_INT_LOCK_THRESHOLD_MASK |
6213 DPIO_CHV_INT_LOCK_THRESHOLD_SEL_COARSE);
6214 dpio_val |= (0x5 << DPIO_CHV_INT_LOCK_THRESHOLD_SHIFT);
6215 if (!bestm2_frac)
6216 dpio_val |= DPIO_CHV_INT_LOCK_THRESHOLD_SEL_COARSE;
6217 vlv_dpio_write(dev_priv, pipe, CHV_PLL_DW9(port), dpio_val);
6218
6210 /* Loop filter */ 6219 /* Loop filter */
6211 refclk = i9xx_get_refclk(crtc, 0); 6220 refclk = i9xx_get_refclk(crtc, 0);
6212 loopfilter = 5 << DPIO_CHV_PROP_COEFF_SHIFT | 6221 loopfilter = 5 << DPIO_CHV_PROP_COEFF_SHIFT |