Commit 74689ddf authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Chris Wilson

drm/i915: Fix cdclk bypass freq readout for tgl/bxt/glk

On tgl/bxt/glk the cdclk bypass frequency depends on the PLL
reference clock. So let's read out the ref clock before we
try to compute the bypass clock.

Cc: Matt Roper <matthew.d.roper@intel.com>
Fixes: 71dc367e ("drm/i915: Consolidate bxt/cnl/icl cdclk readout")
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190911133129.27466-1-ville.syrjala@linux.intel.com
parent 24977870
...@@ -1351,6 +1351,8 @@ static void bxt_get_cdclk(struct drm_i915_private *dev_priv, ...@@ -1351,6 +1351,8 @@ static void bxt_get_cdclk(struct drm_i915_private *dev_priv,
u32 divider; u32 divider;
int div; int div;
bxt_de_pll_readout(dev_priv, cdclk_state);
if (INTEL_GEN(dev_priv) >= 12) if (INTEL_GEN(dev_priv) >= 12)
cdclk_state->bypass = cdclk_state->ref / 2; cdclk_state->bypass = cdclk_state->ref / 2;
else if (INTEL_GEN(dev_priv) >= 11) else if (INTEL_GEN(dev_priv) >= 11)
...@@ -1358,7 +1360,6 @@ static void bxt_get_cdclk(struct drm_i915_private *dev_priv, ...@@ -1358,7 +1360,6 @@ static void bxt_get_cdclk(struct drm_i915_private *dev_priv,
else else
cdclk_state->bypass = cdclk_state->ref; cdclk_state->bypass = cdclk_state->ref;
bxt_de_pll_readout(dev_priv, cdclk_state);
if (cdclk_state->vco == 0) { if (cdclk_state->vco == 0) {
cdclk_state->cdclk = cdclk_state->bypass; cdclk_state->cdclk = cdclk_state->bypass;
goto out; goto out;
......
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