Commit 9558d15d authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Fix BXT min_pixclk after state readout

commit 4e5ca60f ("drm/i915: Use ilk_max_pixel_rate() for BXT cdclk calculation")
tried to change BXT to use ilk_max_pixel_rate() to compute the
pipe pixel rate. I failed to notice that there was another place
in the state readout code that needs the same treatment. So let's
change that one too.

Should probably just change things to always compuyte the pipe pixel
rates, instead of just doing on platforms that can change cdclk
dynamically. But for now let's just move BXT fully over to the
side that uses ilk_pipe_pixel_rate().

Cc: Jani Nikula <jani.nikula@intel.com>
Fixes: 4e5ca60f ("drm/i915: Use ilk_max_pixel_rate() for BXT cdclk calculation")
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1463172100-24715-2-git-send-email-ville.syrjala@linux.intel.comReviewed-by: default avatarImre Deak <imre.deak@intel.com>
parent 03d92e47
...@@ -15128,18 +15128,16 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) ...@@ -15128,18 +15128,16 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
if (crtc_state->base.active) { if (crtc_state->base.active) {
dev_priv->active_crtcs |= 1 << crtc->pipe; dev_priv->active_crtcs |= 1 << crtc->pipe;
if (IS_BROADWELL(dev_priv)) { if (IS_BROXTON(dev_priv) || IS_BROADWELL(dev_priv))
pixclk = ilk_pipe_pixel_rate(crtc_state); pixclk = ilk_pipe_pixel_rate(crtc_state);
else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
/* pixel rate mustn't exceed 95% of cdclk with IPS on BDW */
if (crtc_state->ips_enabled)
pixclk = DIV_ROUND_UP(pixclk * 100, 95);
} else if (IS_VALLEYVIEW(dev_priv) ||
IS_CHERRYVIEW(dev_priv) ||
IS_BROXTON(dev_priv))
pixclk = crtc_state->base.adjusted_mode.crtc_clock; pixclk = crtc_state->base.adjusted_mode.crtc_clock;
else else
WARN_ON(dev_priv->display.modeset_calc_cdclk); WARN_ON(dev_priv->display.modeset_calc_cdclk);
/* pixel rate mustn't exceed 95% of cdclk with IPS on BDW */
if (IS_BROADWELL(dev_priv) && crtc_state->ips_enabled)
pixclk = DIV_ROUND_UP(pixclk * 100, 95);
} }
dev_priv->min_pixclk[crtc->pipe] = pixclk; dev_priv->min_pixclk[crtc->pipe] = pixclk;
......
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