aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2014-11-21 11:14:56 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-03 03:35:04 -0500
commit3148ade72806e7bd1e4784798c2d5645dd13618a (patch)
tree37eb8b591f4cef7bd6ee2a8d0a0602b1abad81f0 /drivers/gpu/drm/i915/intel_display.c
parent00f0b3781028605910cb4662a0f8a4849b445fc2 (diff)
drm/i915/skl: Read out crtl1 for eDP/DPLL0
v2: Put the DPLL0 state readout in skylake_get_ddi_pll(), closer to where the PLL assignement read out is done rather than the frequency readout function. (Daniel) v3: Remove stray new line (Damien) Add Paulo's r-b tag for v1 Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> (v1) Signed-off-by: Damien Lespiau <damien.lespiau@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.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 6289babd03b0..9d38423b69c1 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8058,12 +8058,21 @@ static void skylake_get_ddi_pll(struct drm_i915_private *dev_priv,
8058 enum port port, 8058 enum port port,
8059 struct intel_crtc_config *pipe_config) 8059 struct intel_crtc_config *pipe_config)
8060{ 8060{
8061 u32 temp; 8061 u32 temp, dpll_ctl1;
8062 8062
8063 temp = I915_READ(DPLL_CTRL2) & DPLL_CTRL2_DDI_CLK_SEL_MASK(port); 8063 temp = I915_READ(DPLL_CTRL2) & DPLL_CTRL2_DDI_CLK_SEL_MASK(port);
8064 pipe_config->ddi_pll_sel = temp >> (port * 3 + 1); 8064 pipe_config->ddi_pll_sel = temp >> (port * 3 + 1);
8065 8065
8066 switch (pipe_config->ddi_pll_sel) { 8066 switch (pipe_config->ddi_pll_sel) {
8067 case SKL_DPLL0:
8068 /*
8069 * On SKL the eDP DPLL (DPLL0 as we don't use SSC) is not part
8070 * of the shared DPLL framework and thus needs to be read out
8071 * separately
8072 */
8073 dpll_ctl1 = I915_READ(DPLL_CTRL1);
8074 pipe_config->dpll_hw_state.ctrl1 = dpll_ctl1 & 0x3f;
8075 break;
8067 case SKL_DPLL1: 8076 case SKL_DPLL1:
8068 pipe_config->shared_dpll = DPLL_ID_SKL_DPLL1; 8077 pipe_config->shared_dpll = DPLL_ID_SKL_DPLL1;
8069 break; 8078 break;