Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/2] drm/i915/bxt: fix max scaling factor calculation
Date: Wed, 17 Jun 2015 14:00:55 +0300	[thread overview]
Message-ID: <1434538855-21722-2-git-send-email-imre.deak@intel.com> (raw)
In-Reply-To: <1434538855-21722-1-git-send-email-imre.deak@intel.com>

Atm when calculating the maximum plane scale factor, we use the active
CDCLK rate. The target CDCLK rate for the upcoming modeset may be
different from this, so use the target rate instead.

This fixes the modeset on BXT, where the initial rate was smaller than
the target rate. On SKL we use a fixed CDCLK rate for now, so there this
wasn't an issue.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 9b68a5c..15b9208 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5908,7 +5908,10 @@ static int intel_mode_target_cdclk(struct drm_i915_private *dev_priv,
 	if (max_pixclk < 0)
 		return max_pixclk;
 
-	if (IS_BROXTON(dev_priv)) {
+	if (IS_SKYLAKE(dev_priv)) {
+		/* FIXME: calculate the actual target clock rate */
+		cdclk = dev_priv->display.get_display_clock_speed(dev_priv->dev);
+	} else if (IS_BROXTON(dev_priv)) {
 		cdclk = broxton_calc_cdclk(dev_priv, max_pixclk);
 	} else if (IS_VALLEYVIEW(dev_priv)) {
 		cdclk = valleyview_calc_cdclk(dev_priv, max_pixclk);
@@ -13597,7 +13600,7 @@ skl_max_scale(struct intel_crtc *intel_crtc, struct intel_crtc_state *crtc_state
 	dev = intel_crtc->base.dev;
 	dev_priv = dev->dev_private;
 	crtc_clock = crtc_state->base.adjusted_mode.crtc_clock;
-	cdclk = dev_priv->display.get_display_clock_speed(dev);
+	cdclk = intel_mode_target_cdclk(dev_priv, crtc_state->base.state);
 
 	if (!crtc_clock || !cdclk)
 		return DRM_PLANE_HELPER_NO_SCALING;
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-06-17 11:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 11:00 [PATCH 1/2] drm/i915: factor out intel_mode_target_cdclk Imre Deak
2015-06-17 11:00 ` Imre Deak [this message]
2015-06-22 13:37 ` Damien Lespiau
2015-06-22 13:46   ` Imre Deak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434538855-21722-2-git-send-email-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox