From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/5] drm/i915: Fix DDI port_clock for VGA output
Date: Mon, 3 Mar 2014 12:09:55 +0200 [thread overview]
Message-ID: <20140303100955.GW3852@intel.com> (raw)
In-Reply-To: <CA+gsUGTxkmewUrW0_qyu34NfUAXd6UbNtSXjAm8oDb_2NbSEHw@mail.gmail.com>
On Fri, Feb 28, 2014 at 07:09:51PM -0300, Paulo Zanoni wrote:
> 2014-02-27 9:23 GMT-03:00 <ville.syrjala@linux.intel.com>:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > On DDI there's no PLL as such to generate the pixel clock for VGA.
> > Instead we derive the pixel clock from the FDI link frequency. So
> > to make .compute_config match what .get_config does, we need to
> > set the port_clock based on the FDI link frequency.
> >
> > Note that we don't even check the port_clock when selecting the
> > PLL for VGA output. We just assume SPLL at 1.35GHz is what we want,
> > and that does match with the asumption of FDI frequency of 2.7Ghz
> > we have in intel_fdi_link_freq().
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74955
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_crt.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
> > index 9864aa1..02e2b02 100644
> > --- a/drivers/gpu/drm/i915/intel_crt.c
> > +++ b/drivers/gpu/drm/i915/intel_crt.c
> > @@ -262,6 +262,10 @@ static bool intel_crt_compute_config(struct intel_encoder *encoder,
> > if (HAS_PCH_LPT(dev))
> > pipe_config->pipe_bpp = 24;
> >
> > + /* FDI must always be 2.7 GHz */
> > + if (HAS_DDI(dev))
> > + pipe_config->port_clock = 135000 * 2;
> > +
>
> <rant>
> Whenever I have to review patches touching the HW state
> readout/compute I get completely confused. We have a bunch of
> compute_config/get_config/get_hw_state functions, with no real
> documentation of which fields exactly each function should get.
I have no objections to improving the docs.
> Our
> hardware also does a bunch of *2 multiplications on PLLs and clocks,
> and this gets things even more confusing.
The 2x is for PLL output->bitclock, and the /5 would be for
PLL output->symbol clock. So maybe it would be nicer to use
<real PLL frequency>/5 in the DDI get_config. It would match
how we compute things on VLV at least.
> Also, we have similar
> information (like all these "clocks", from mode, adjusted_mode, port,
> pipe, hw, etc) with slightly different meanings. I really wish we had
> Kernel documentation describing *exactly* what is expected to be
> computed from each function, and what are the differences between all
> those similar things with slightly different meanings. Maybe we could
> also organize struct intel_crtc_config, adding small sub-structs that
> better define the domain of each field?
> </rant>
>
> Still, I have reviewed your patch, and despite all my own confusions,
> it looks correct, so:
> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> > return true;
> > }
> >
> > --
> > 1.8.3.2
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
>
> --
> Paulo Zanoni
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2014-03-03 10:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 12:23 [PATCH 0/5] drm/i915: FDI port_clock fix for DDI and other FDI changes ville.syrjala
2014-02-27 12:23 ` [PATCH 1/5] drm/i915: Fix DDI port_clock for VGA output ville.syrjala
2014-02-28 22:09 ` Paulo Zanoni
2014-03-03 10:09 ` Ville Syrjälä [this message]
2014-02-27 12:23 ` [PATCH 2/5] drm/i915: Change intel_fdi_link_freq() to 10kHz ville.syrjala
2014-02-28 22:28 ` Paulo Zanoni
2014-03-01 7:34 ` Chris Wilson
2014-03-05 15:04 ` Daniel Vetter
2014-03-06 21:01 ` Daniel Vetter
2014-02-27 12:23 ` [PATCH 3/5] drm/i915: Use DIV_ROUND_UP() when calculating number of required FDI lanes ville.syrjala
2014-02-28 22:35 ` Paulo Zanoni
2014-02-27 12:23 ` [PATCH 4/5] drm/i915: Use port_clock for FDI frequency on DDI ville.syrjala
2014-02-27 12:23 ` [PATCH 5/5] drm/i915: Add SPLL sharing support for DDI ville.syrjala
2014-02-28 21:40 ` Paulo Zanoni
2014-03-03 9:56 ` Ville Syrjälä
2014-03-05 15:09 ` 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=20140303100955.GW3852@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=przanoni@gmail.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.