From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Furquan Shaikh <furquan@google.com>
Cc: intel-gfx@lists.freedesktop.org,
Paulo Zanoni <paulo.r.zanoni@intel.com>,
Josh Triplett <josh.triplett@intel.com>,
Daniel Vetter <daniel.vetter@intel.com>,
Ronald Minnich <rminnich@google.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/i915: add fast boot support for Haswell
Date: Mon, 5 Aug 2013 15:42:30 -0700 [thread overview]
Message-ID: <20130805154230.57f3ae07@jbarnes-desktop> (raw)
In-Reply-To: <1375391542-21936-1-git-send-email-furquan@google.com>
On Thu, 1 Aug 2013 14:12:22 -0700
Furquan Shaikh <furquan@google.com> wrote:
> @@ -1282,6 +1283,13 @@ static void intel_ddi_get_config(struct intel_encoder *encoder,
> flags |= DRM_MODE_FLAG_NVSYNC;
>
> pipe_config->adjusted_mode.flags |= flags;
> +
> + if (port == PORT_A) {
> + if ((I915_READ(DP_A) & DP_PLL_FREQ_MASK) == DP_PLL_FREQ_160MHZ)
> + pipe_config->port_clock = 162000;
> + else
> + pipe_config->port_clock = 270000;
> + }
Sorry Furquan, I should have checked this earlier, I knew it was too
good to be true. :)
On HSW, DP_A is actually DDI_BUF_CTL, and it has a different layout
than the old DP_A reg. Like Daniel said, doing it the old way is
invalid on HSW. It might work in your configs, but I think that's just
coincidence, since bit 16 is the port reversal bit on HSW, not the
clock freq.
To get the clock freq, you need to look at 0x45020 to find the refclk,
then look at the WRPLL_CTL for the pipe to get the dividers. That's
what Daniel meant when he asked for a full "clock_get" function. It's
only a little more complicated, but you'll need docs for it. Charlie
Huang ought to be able to get you the NDA docs that should have the
info you need.
Thanks,
--
Jesse Barnes, Intel Open Source Technology Center
prev parent reply other threads:[~2013-08-05 22:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-01 21:12 [PATCH] drm/i915: add fast boot support for Haswell Furquan Shaikh
2013-08-05 7:24 ` Daniel Vetter
2013-08-05 20:24 ` Furquan Shaikh
2013-08-05 20:42 ` Daniel Vetter
2013-08-05 20:45 ` [Intel-gfx] " Daniel Vetter
2013-08-05 22:42 ` Jesse Barnes [this message]
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=20130805154230.57f3ae07@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=furquan@google.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=josh.triplett@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulo.r.zanoni@intel.com \
--cc=rminnich@google.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).