Commit 39d9b85a authored by Gary Wang's avatar Gary Wang Committed by Jani Nikula

drm/i915: set CDCLK if DPLL0 enabled during resuming from S3

Since BIOS RC 1.4 it would enable CDCLK PLL during BIOS S3 resume, then
driver needs to set CDCLK to avoid display corruption if DPLL0 enabled.

References: https://bugs.freedesktop.org/show_bug.cgi?id=91697Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
Reviewed-by: default avatarCooper Chiou <cooper.chiou@intel.com>
Reviewed-by: default avatarWei Shun Chang <wei.shun.chang@intel.com>
Tested-by: default avatarGary Wang <gary.c.wang@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Gavin Hindman <gavin.hindman@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Xiong Y Zhang <xiong.y.zhang@intel.com>
Signed-off-by: default avatarGary Wang <gary.c.wang@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 26951caf
...@@ -5712,16 +5712,13 @@ void skl_init_cdclk(struct drm_i915_private *dev_priv) ...@@ -5712,16 +5712,13 @@ void skl_init_cdclk(struct drm_i915_private *dev_priv)
/* enable PG1 and Misc I/O */ /* enable PG1 and Misc I/O */
intel_display_power_get(dev_priv, POWER_DOMAIN_PLLS); intel_display_power_get(dev_priv, POWER_DOMAIN_PLLS);
/* DPLL0 already enabed !? */ /* DPLL0 not enabled (happens on early BIOS versions) */
if (I915_READ(LCPLL1_CTL) & LCPLL_PLL_ENABLE) { if (!(I915_READ(LCPLL1_CTL) & LCPLL_PLL_ENABLE)) {
DRM_DEBUG_DRIVER("DPLL0 already running\n"); /* enable DPLL0 */
return; required_vco = skl_cdclk_get_vco(dev_priv->skl_boot_cdclk);
skl_dpll0_enable(dev_priv, required_vco);
} }
/* enable DPLL0 */
required_vco = skl_cdclk_get_vco(dev_priv->skl_boot_cdclk);
skl_dpll0_enable(dev_priv, required_vco);
/* set CDCLK to the frequency the BIOS chose */ /* set CDCLK to the frequency the BIOS chose */
skl_set_cdclk(dev_priv, dev_priv->skl_boot_cdclk); skl_set_cdclk(dev_priv, dev_priv->skl_boot_cdclk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment