All of lore.kernel.org
 help / color / mirror / Atom feed
From: Madhav Chauhan <madhav.chauhan@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: ander.conselvan.de.oliveira@intel.com, jani.nikula@intel.com
Subject: [GLK MIPI DSI V4 8/8] drm/i915/glk: Validate only DSI PORT A PLL divider
Date: Tue,  7 Feb 2017 18:13:12 +0530	[thread overview]
Message-ID: <1486471392-1803-9-git-send-email-madhav.chauhan@intel.com> (raw)
In-Reply-To: <1486471392-1803-1-git-send-email-madhav.chauhan@intel.com>

As per BSPEC, GLK supports MIPI DSI 8X clk only on PORT A.
Therefore only for PORT A PLL divider value should be validated.

Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com>
---
 drivers/gpu/drm/i915/intel_dsi_pll.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dsi_pll.c b/drivers/gpu/drm/i915/intel_dsi_pll.c
index b1cc006..11c2a1c 100644
--- a/drivers/gpu/drm/i915/intel_dsi_pll.c
+++ b/drivers/gpu/drm/i915/intel_dsi_pll.c
@@ -206,17 +206,24 @@ static bool bxt_dsi_pll_is_enabled(struct drm_i915_private *dev_priv)
 		return false;
 
 	/*
-	 * Both dividers must be programmed with valid values even if only one
-	 * of the PLL is used, see BSpec/Broxton Clocks. Check this here for
+	 * Dividers must be programmed with valid values. As per BSEPC, for
+	 * GEMINLAKE only PORT A divider values are checked while for BXT
+	 * both divider values are validated. Check this here for
 	 * paranoia, since BIOS is known to misconfigure PLLs in this way at
 	 * times, and since accessing DSI registers with invalid dividers
 	 * causes a system hang.
 	 */
 	val = I915_READ(BXT_DSI_PLL_CTL);
-	if (!(val & BXT_DSIA_16X_MASK) || !(val & BXT_DSIC_16X_MASK)) {
-		DRM_DEBUG_DRIVER("PLL is enabled with invalid divider settings (%08x)\n",
-				 val);
-		enabled = false;
+	if (IS_GEMINILAKE(dev_priv)) {
+		if (!(val & BXT_DSIA_16X_MASK)) {
+			DRM_DEBUG_DRIVER("Invalid PLL divider (%08x)\n", val);
+			enabled = false;
+		}
+	} else {
+		if (!(val & BXT_DSIA_16X_MASK) || !(val & BXT_DSIC_16X_MASK)) {
+			DRM_DEBUG_DRIVER("Invalid PLL divider (%08x)\n", val);
+			enabled = false;
+		}
 	}
 
 	return enabled;
-- 
1.9.1

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

  parent reply	other threads:[~2017-02-07 12:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 12:43 [GLK MIPI DSI V4 0/8] GLK MIPI DSI VIDEO MODE PATCHES Madhav Chauhan
2017-02-07 12:43 ` [GLK MIPI DSI V4 1/8] drm/i915/glk: Program dphy param reg for GLK Madhav Chauhan
2017-02-08 14:53   ` Jani Nikula
2017-02-08 17:27     ` Chauhan, Madhav
2017-02-07 12:43 ` [GLK MIPI DSI V4 2/8] drm/i915/glk: Program new MIPI DSI PHY registers " Madhav Chauhan
2017-02-07 12:43 ` [GLK MIPI DSI V4 3/8] drm/i915/glk: Add MIPIIO Enable/disable sequence Madhav Chauhan
2017-02-08 14:58   ` Jani Nikula
2017-02-08 17:51     ` Chauhan, Madhav
2017-02-07 12:43 ` [GLK MIPI DSI V4 4/8] drm/i915: Set the Z inversion overlap field Madhav Chauhan
2017-02-07 12:43 ` [GLK MIPI DSI V4 5/8] drm/i915/glk: Add DSI PLL divider range for glk Madhav Chauhan
2017-02-10 14:24   ` Ander Conselvan De Oliveira
2017-02-13 11:14     ` Chauhan, Madhav
2017-02-07 12:43 ` [GLK MIPI DSI V4 6/8] drm/i915i/glk: Program MIPI_CLOCK_CTRL only for BXT Madhav Chauhan
2017-02-07 12:43 ` [GLK MIPI DSI V4 7/8] drm/i915/glk: Program txesc clock divider for GLK Madhav Chauhan
2017-02-07 12:43 ` Madhav Chauhan [this message]
2017-02-07 13:24 ` ✗ Fi.CI.BAT: failure for GLK MIPI DSI VIDEO MODE PATCHES (rev4) Patchwork

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=1486471392-1803-9-git-send-email-madhav.chauhan@intel.com \
    --to=madhav.chauhan@intel.com \
    --cc=ander.conselvan.de.oliveira@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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.