aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_runtime_pm.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2016-05-13 16:41:29 -0400
committerVille Syrjälä <ville.syrjala@linux.intel.com>2016-05-23 14:11:14 -0400
commit9f7eb31af2968a194b29f67ec10776685a81afc9 (patch)
tree7fb5e8f62a6328c0dbe5d44f348f93047bec844a /drivers/gpu/drm/i915/intel_runtime_pm.c
parent09492498ee631041bfc60f2dc1960e246b8a7120 (diff)
drm/i915: Unify SKL cdclk init paths
Currently we initialize cdclk on SKL from two different places, depending on whether it's during driver init or resume. Let's unify it to happen from the same place always, and that place will be the display core init function. To do this we first run through the cdclk sanitation code, which will first verify that the PLL is programmed correctly, after which we can read out the current cdclk frequency, and once the cdclk is known we verify that the cdclk "decimal" frequency is programmed correctly. If any of these fail we will force a cdclk change, and to be safe we also force the PLL to be turned off and on again. If the sanitation step didn't notice anything amiss, we'll skip the cdclk programming which will prevent cdclk reprogramming when the displays might be active. We can also toss in a few WARNs about the register values into skl_update_dpll0() since we now know that the PLL state should always be sane when that function is called. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1463172100-24715-11-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak <imre.deak@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_runtime_pm.c')
-rw-r--r--drivers/gpu/drm/i915/intel_runtime_pm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index b69b935516fb..fefe22c3c163 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -2200,12 +2200,9 @@ static void skl_display_core_init(struct drm_i915_private *dev_priv,
2200 2200
2201 mutex_unlock(&power_domains->lock); 2201 mutex_unlock(&power_domains->lock);
2202 2202
2203 if (!resume)
2204 return;
2205
2206 skl_init_cdclk(dev_priv); 2203 skl_init_cdclk(dev_priv);
2207 2204
2208 if (dev_priv->csr.dmc_payload) 2205 if (resume && dev_priv->csr.dmc_payload)
2209 intel_csr_load_program(dev_priv); 2206 intel_csr_load_program(dev_priv);
2210} 2207}
2211 2208