public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Doug Anderson <dianders@chromium.org>
Cc: Xing Zheng <zhengxing@rock-chips.com>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	Brian Norris <briannorris@chromium.org>,
	Tao Huang <huangtao@rock-chips.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	linux-clk <linux-clk@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Elaine Zhang <zhangqing@rock-chips.com>
Subject: Re: [RFC PATCH] clk: rockchip: rk3399: support pll setting automatically
Date: Mon, 29 Aug 2016 19:54:09 +0200	[thread overview]
Message-ID: <13164913.BHiQzGsdBU@diego> (raw)
In-Reply-To: <CAD=FV=VMqHrKHThSNoz_i=SCwgw=OeOfaww3Ote1id66LXO8JQ@mail.gmail.com>

Am Montag, 29. August 2016, 10:35:44 schrieb Doug Anderson:
> Hi,
>=20
> On Sun, Aug 28, 2016 at 8:21 AM, Heiko St=FCbner <heiko@sntech.de> wr=
ote:
> > Hi Xing, Elaine,
> >=20
> > Am Dienstag, 2. August 2016, 21:34:12 schrieb Xing Zheng:
> >> From: Elaine Zhang <zhangqing@rock-chips.com>
> >>=20
> >> The goal is that we can configure the most suitable pll params
> >> automatically.
> >>=20
> >> If setting freq is not supported in rockchip_pll_rate_table
> >> rk3399_pll_rates[], we can set pll params automatically.
> >>=20
> >> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
> >> Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
> >=20
> > first off, I really like that idea of calculating the generic pll
> > frequencies instead of duplicating these entries in every soc clock=

> > driver.
>=20
> I probably won't have time to look at this any time soon, but when I
> saw this patch fly by I was a little hesitant because:
>=20
> * Not all PLL settings produce the same jitter.  On rk3288 I spent
> loads of time searching for PLL settings that would be low jitter
> enough to make a pixel clock that was happy with lots of different TV=
s
> / monitors.  It's true that there were certain heuristics that could
> be followed but certainly my predictions didn't always match what
> happened.
>=20
> * Depending on what's using the PLL, you might want very different
> settings.  One can optimize for lock time, power usage, jitter,
> accuracy, etc.  For instance for a CPU clock that you change a lot yo=
u
> probably don't care about hitting an exact frequency and you probably=

> don't care overly much about jitter, but you want low lock times.  Fo=
r
> HDMI you don't care about lock times and and probably don't care abou=
t
> power usage, but you care about meeting an exact clock and really
> really care about jitter.
>=20
> * I know that in the past the way I found to make some of the best
> rates for HDMI was to have the PLL make a rate that was several times=

> what I wanted and then activate a divider later in the clock tree.
> That gave me the best jitter / clock accuracy.  I have no idea how to=

> do that automatically, but in the past I relied on the PLL only havin=
g
> a fixed set of rates it could make so it would fail to make the lower=

> clock rate (higher jitter) and eventually end up with the better one.=

>=20
>=20
> Anyway, I don't know how to solve all of the above, but I just wanted=

> to bring it up as a concern.

after talking with Doug on irc, I realized that this really can become =
a=20
problem, as right now we have a list with known-good rates, can adjust =
those=20
as needed and have the clock framework select the best for a certain ta=
rget=20
rate.

But with the automatic calculation it would open up nearly unlimited di=
fferent=20
rates with possible negative effects and no way to eliminate or even te=
st most=20
of them.

So it may very well be best to stay with static rates, in a component a=
s core=20
as the PLLs are?


Heiko

  reply	other threads:[~2016-08-29 17:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02 13:34 [RFC PATCH] clk: rockchip: rk3399: support pll setting automatically Xing Zheng
2016-08-28 15:21 ` Heiko Stübner
2016-08-29 17:35   ` Doug Anderson
2016-08-29 17:54     ` Heiko Stübner [this message]
2016-08-30  1:30       ` Elaine Zhang
2016-08-29  8:02 ` Heiko Stuebner

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=13164913.BHiQzGsdBU@diego \
    --to=heiko@sntech.de \
    --cc=briannorris@chromium.org \
    --cc=dianders@chromium.org \
    --cc=huangtao@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    --cc=zhangqing@rock-chips.com \
    --cc=zhengxing@rock-chips.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