summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_runtime_pm.c
diff options
context:
space:
mode:
authorVille Syrjälä2016-05-13 22:41:29 +0200
committerVille Syrjälä2016-05-23 20:11:14 +0200
commit9f7eb31af2968a194b29f67ec10776685a81afc9 (patch)
tree7fb5e8f62a6328c0dbe5d44f348f93047bec844a /drivers/gpu/drm/i915/intel_runtime_pm.c
parentdrm/i915: Beef up skl_sanitize_cdclk() a bit (diff)
downloadkernel-qcow2-linux-9f7eb31af2968a194b29f67ec10776685a81afc9.tar.gz
kernel-qcow2-linux-9f7eb31af2968a194b29f67ec10776685a81afc9.tar.xz
kernel-qcow2-linux-9f7eb31af2968a194b29f67ec10776685a81afc9.zip
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,
mutex_unlock(&power_domains->lock);
- if (!resume)
- return;
-
skl_init_cdclk(dev_priv);
- if (dev_priv->csr.dmc_payload)
+ if (resume && dev_priv->csr.dmc_payload)
intel_csr_load_program(dev_priv);
}