intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Paulo Zanoni <przanoni@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH 1/8] drm/i915: add the FCLK case to intel_ddi_get_cdclk_freq
Date: Mon, 29 Jul 2013 17:48:20 -0300	[thread overview]
Message-ID: <1375130907-4054-2-git-send-email-przanoni@gmail.com> (raw)
In-Reply-To: <1375130907-4054-1-git-send-email-przanoni@gmail.com>

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

We already have code to disable LCPLL and switch to FCLK, so we need this too.
We still don't call the code to disable LCPLL, but we'll call it when we add
support for Package C8+.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index b361c08..9e77e32 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1153,10 +1153,13 @@ static void intel_disable_ddi(struct intel_encoder *intel_encoder)
 
 int intel_ddi_get_cdclk_freq(struct drm_i915_private *dev_priv)
 {
-	if (I915_READ(HSW_FUSE_STRAP) & HSW_CDCLK_LIMIT)
+	uint32_t lcpll = I915_READ(LCPLL_CTL);
+
+	if (lcpll & LCPLL_CD_SOURCE_FCLK)
+		return 800000;
+	else if (I915_READ(HSW_FUSE_STRAP) & HSW_CDCLK_LIMIT)
 		return 450000;
-	else if ((I915_READ(LCPLL_CTL) & LCPLL_CLK_FREQ_MASK) ==
-		 LCPLL_CLK_FREQ_450)
+	else if ((lcpll & LCPLL_CLK_FREQ_MASK) == LCPLL_CLK_FREQ_450)
 		return 450000;
 	else if (IS_ULT(dev_priv->dev))
 		return 337500;
-- 
1.8.1.2

  reply	other threads:[~2013-07-29 20:48 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29 20:48 [PATCH 0/8] Allow Package C8+ Paulo Zanoni
2013-07-29 20:48 ` Paulo Zanoni [this message]
2013-07-29 20:48 ` [PATCH 2/8] drm/i915: don't disable/reenable IVB error interrupts when not needed Paulo Zanoni
2013-07-30  9:46   ` Chris Wilson
2013-08-01 17:16     ` Paulo Zanoni
2013-07-29 20:48 ` [PATCH 3/8] drm/i915: allow package C8+ states on Haswell (disabled) Paulo Zanoni
2013-07-29 21:42   ` Chris Wilson
2013-07-31 14:24     ` Paulo Zanoni
2013-07-31 15:01       ` Chris Wilson
2013-07-31 16:47         ` Paulo Zanoni
2013-07-29 23:11   ` Chris Wilson
2013-07-29 20:48 ` [PATCH 4/8] drm/i915: avoid waking up from PC8 on DP AUX operations Paulo Zanoni
2013-07-30  9:40   ` Chris Wilson
2013-07-31 14:31     ` Paulo Zanoni
2013-07-31 14:45       ` Chris Wilson
2013-07-29 20:48 ` [PATCH 5/8] drm/i915: avoid waking up from PC8 on GMBUS operations Paulo Zanoni
2013-07-30  9:30   ` Chris Wilson
2013-08-05  6:07     ` Daniel Vetter
2013-08-05 13:17       ` Paulo Zanoni
2013-07-29 20:48 ` [PATCH 6/8] drm/i915: silence message about the DDI buffers Paulo Zanoni
2013-07-29 20:48 ` [PATCH 7/8] drm/i915: add i915_pc8_status debugfs file Paulo Zanoni
2013-07-29 20:48 ` [PATCH 8/8] drm/i915: allow Package C8+ by default Paulo Zanoni
2013-07-30  9:25   ` Chris Wilson
2013-07-29 20:53 ` [PATCH i-g-t] tests: add pc8 Paulo Zanoni
2013-08-05  6:05   ` Daniel Vetter
2013-08-05 13:42     ` Paulo Zanoni
2013-08-05 15:35       ` Daniel Vetter
2013-08-06 19:33         ` Paulo Zanoni
2013-08-06 20:11           ` Daniel Vetter
2013-08-06 20:18             ` Daniel Vetter
2013-08-06 20:43             ` Paulo Zanoni
2013-08-13 21:48               ` Daniel Vetter

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=1375130907-4054-2-git-send-email-przanoni@gmail.com \
    --to=przanoni@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).