All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gaurav K Singh <gaurav.k.singh@intel.com>
To: intel-gfx <intel-gfx@lists.freedesktop.org>
Cc: rakshmi.bhatia@intel.com
Subject: [PATCH 2/4] drm/i915: Use adjusted mode clk for calculating DSI clk
Date: Wed, 16 Sep 2015 14:48:39 +0530	[thread overview]
Message-ID: <1442395121-19251-3-git-send-email-gaurav.k.singh@intel.com> (raw)
In-Reply-To: <1442395121-19251-1-git-send-email-gaurav.k.singh@intel.com>

Earlier, pclk was getting used for calculating DSI clk. For single link
MIPI panels, it will work fine. But for dual link MIPI, since pclk gets
halved, DSI clk will have a wrong value.

Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
---
 drivers/gpu/drm/i915/intel_dsi_pll.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dsi_pll.c b/drivers/gpu/drm/i915/intel_dsi_pll.c
index bf0f622..a53ccc9 100644
--- a/drivers/gpu/drm/i915/intel_dsi_pll.c
+++ b/drivers/gpu/drm/i915/intel_dsi_pll.c
@@ -468,12 +468,14 @@ static void bxt_dsi_program_clocks(struct drm_device *dev, enum port port)
 static bool bxt_configure_dsi_pll(struct intel_encoder *encoder)
 {
 	struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
+	struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc);
+	struct drm_display_mode *mode = &intel_crtc->config->base.adjusted_mode;
 	struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
 	u8 dsi_ratio;
 	u32 dsi_clk;
 	u32 val;
 
-	dsi_clk = dsi_clk_from_pclk(intel_dsi->pclk, intel_dsi->pixel_format,
+	dsi_clk = dsi_clk_from_pclk(mode->clock, intel_dsi->pixel_format,
 			intel_dsi->lane_count);
 
 	/*
-- 
1.7.9.5

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

  parent reply	other threads:[~2015-09-16  9:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-16  9:18 [PATCH 0/4] DSI Dual link enabling on BXT Gaurav K Singh
2015-09-16  9:18 ` [PATCH 1/4] drm/i915: Enable dual link mode in BXT Gaurav K Singh
2015-09-16 13:00   ` Ville Syrjälä
2015-09-16  9:18 ` Gaurav K Singh [this message]
2015-09-16 13:10   ` [PATCH 2/4] drm/i915: Use adjusted mode clk for calculating DSI clk Ville Syrjälä
2015-09-16  9:18 ` [PATCH 3/4] drm/i915: Execute RESET sequence before device ready Gaurav K Singh
2015-09-16  9:18 ` [PATCH 4/4] drm/i915: Program vactive & hactive display size for both ports Gaurav K Singh
2015-09-16 13:15   ` Ville Syrjälä
2015-09-16 13:21 ` [PATCH 0/4] DSI Dual link enabling on BXT Ville Syrjälä
2015-09-23  5:59 ` Singh, Gaurav K
2015-11-23  8:15   ` Jani Nikula

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=1442395121-19251-3-git-send-email-gaurav.k.singh@intel.com \
    --to=gaurav.k.singh@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rakshmi.bhatia@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.