From: "Heiko Stübner" <heiko@sntech.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
kernel@pengutronix.de, Andy Yan <andy.yan@rock-chips.com>,
Benjamin Gaignard <benjamin.gaignard@collabora.com>,
Michael Riesch <michael.riesch@wolfvision.net>,
Sandy Huang <hjc@rock-chips.com>,
Peter Geis <pgwipeout@gmail.com>
Subject: Re: [PATCH 24/27] clk: rk3568: drop CLK_SET_RATE_PARENT from dclk_vop*
Date: Tue, 08 Feb 2022 12:41:08 +0100 [thread overview]
Message-ID: <2260638.yNqFStFpQL@diego> (raw)
In-Reply-To: <20220131081042.GW23490@pengutronix.de>
Am Montag, 31. Januar 2022, 09:10:42 CET schrieb Sascha Hauer:
> On Sat, Jan 29, 2022 at 06:48:13PM +0100, Heiko Stübner wrote:
> > Am Mittwoch, 26. Januar 2022, 15:55:46 CET schrieb Sascha Hauer:
> > > The pixel clocks dclk_vop[012] can be clocked from hpll, vpll, gpll or
> > > cpll. gpll and cpll also drive many other clocks, so changing the
> > > dclk_vop[012] clocks could change these other clocks as well. Drop
> > > CLK_SET_RATE_PARENT to fix that. With this change the VOP2 driver can
> > > only adjust the pixel clocks with the divider between the PLL and the
> > > dclk_vop[012] which means the user may have to adjust the PLL clock to a
> > > suitable rate using the assigned-clock-rate device tree property.
> > >
> > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > > ---
> > > drivers/clk/rockchip/clk-rk3568.c | 6 +++---
> > > 1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/clk/rockchip/clk-rk3568.c b/drivers/clk/rockchip/clk-rk3568.c
> > > index 9d889fc46811..7687c62d1fa8 100644
> > > --- a/drivers/clk/rockchip/clk-rk3568.c
> > > +++ b/drivers/clk/rockchip/clk-rk3568.c
> > > @@ -1044,13 +1044,13 @@ static struct rockchip_clk_branch rk3568_clk_branches[] __initdata = {
> > > RK3568_CLKGATE_CON(20), 8, GFLAGS),
> > > GATE(HCLK_VOP, "hclk_vop", "hclk_vo", 0,
> > > RK3568_CLKGATE_CON(20), 9, GFLAGS),
> > > - COMPOSITE(DCLK_VOP0, "dclk_vop0", hpll_vpll_gpll_cpll_p, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT,
> > > + COMPOSITE(DCLK_VOP0, "dclk_vop0", hpll_vpll_gpll_cpll_p, CLK_SET_RATE_NO_REPARENT,
> >
> > hmm, I'm wondering about the use of having CLK_SET_RATE_NO_REPARENT here
> > (and even adding it below).
> >
> > Using SET_RATE_PARENT in the following patch for the hdmi-pll, should give
> > us at least a suitable rate for the hdmi output, so the vop using that
> > should already find a nice rate to use.
> >
> > The normal system-PLLs don't normally don't change their rate at runtime,
> > so I think we should liberate the dclks to select a PLL that best matches
> > their target rate - so drop the CLK_SET_RATE_NO_REPARENT as well.
> >
> > That way the DCLKs can change to another PLL source if that provides
> > a rate nearer to their target.
>
> The HDMI reference clock has the CLK_SET_RATE_PARENT flag set and we
> need that to program the HPLL clock to suitable rates for the HDMI
> output. Now any other display choosing HPLL as parent, because that
> provides the best rate in that point of time, hangs on a PLL which
> changes its rate whenever the resolution is changed on the HDMI output.
Ah, right ... the hpll is in the parent list, that changes things as you said.
I somehow only noticed the regular PLLs that normally have a constant
rate. So never mind ;-)
Heiko
> Changing parents on rate changes only works when all possible parents of
> all the children involved have a constant rate. IMO allowing reparenting
> on rate changes is a poorly chosen default because it's very unsafe. We
> should rather have a CLK_SET_RATE_ALLOW_REPARENT flag.
>
> Sascha
>
>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2022-02-08 11:41 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-26 14:55 [PATCH v4 00/27] drm/rockchip: RK356x VOP2 support Sascha Hauer
2022-01-26 14:55 ` [PATCH 01/27] drm/encoder: Add of_graph port to struct drm_encoder Sascha Hauer
2022-01-26 15:04 ` Aw: " Frank Wunderlich
2022-01-26 14:55 ` [PATCH 02/27] drm/rockchip: dw_hdmi: Do not leave clock enabled in error case Sascha Hauer
2022-01-26 14:55 ` [PATCH 03/27] drm/rockchip: dw_hdmi: rename vpll clock to reference clock Sascha Hauer
2022-01-26 14:55 ` [PATCH 04/27] drm/rockchip: dw_hdmi: add rk3568 support Sascha Hauer
2022-01-26 14:55 ` [PATCH 05/27] drm/rockchip: dw_hdmi: add regulator support Sascha Hauer
2022-01-26 14:55 ` [PATCH 06/27] drm/rockchip: dw_hdmi: Add support for hclk Sascha Hauer
2022-01-26 14:55 ` [PATCH 07/27] drm/rockchip: dw_hdmi: Use auto-generated tables Sascha Hauer
2022-01-26 15:54 ` Doug Anderson
2022-01-27 11:20 ` Sascha Hauer
2022-01-26 14:55 ` [PATCH 08/27] drm/rockchip: dw_hdmi: drop mode_valid hook Sascha Hauer
2022-01-26 14:55 ` [PATCH 09/27] drm/rockchip: dw_hdmi: Set cur_ctr to 0 always Sascha Hauer
2022-01-26 15:42 ` Doug Anderson
2022-01-27 11:06 ` Sascha Hauer
2022-01-26 14:55 ` [PATCH 10/27] drm/rockchip: dw_hdmi: add default 594Mhz clk for 4K@60hz Sascha Hauer
2022-01-26 14:55 ` [PATCH 11/27] clk: rockchip: rk3568: Add more PLL rates Sascha Hauer
2022-01-26 14:55 ` [PATCH 12/27] dt-bindings: display: rockchip: dw-hdmi: Add compatible for rk3568 HDMI Sascha Hauer
2022-01-26 14:55 ` [PATCH 13/27] dt-bindings: display: rockchip: dw-hdmi: Make unwedge pinctrl optional Sascha Hauer
2022-02-09 3:29 ` Rob Herring
2022-01-26 14:55 ` [PATCH 14/27] dt-bindings: display: rockchip: dw-hdmi: use "ref" as clock name Sascha Hauer
2022-02-09 3:30 ` Rob Herring
2022-01-26 14:55 ` [PATCH 15/27] dt-bindings: display: rockchip: dw-hdmi: Add regulator support Sascha Hauer
2022-02-09 3:30 ` Rob Herring
2022-01-26 14:55 ` [PATCH 16/27] dt-bindings: display: rockchip: dw-hdmi: Add additional clock Sascha Hauer
2022-02-09 3:31 ` Rob Herring
2022-01-26 14:55 ` [PATCH 17/27] dt-bindings: display: rockchip: Add binding for VOP2 Sascha Hauer
2022-01-26 22:10 ` Rob Herring
2022-02-01 17:22 ` Rob Herring
2022-01-26 14:55 ` [PATCH 18/27] arm64: dts: rockchip: rk3399: reorder hmdi clocks Sascha Hauer
2022-01-26 14:55 ` [PATCH 19/27] arm64: dts: rockchip: rk3399: rename HDMI ref clock to 'ref' Sascha Hauer
2022-01-26 14:55 ` [PATCH 20/27] arm64: dts: rockchip: rk356x: Add VOP2 nodes Sascha Hauer
2022-02-09 3:32 ` Rob Herring
2022-01-26 14:55 ` [PATCH 21/27] arm64: dts: rockchip: rk356x: Add HDMI nodes Sascha Hauer
2022-01-26 16:04 ` Peter Geis
2022-01-26 17:56 ` Robin Murphy
2022-01-26 18:44 ` Peter Geis
2022-01-26 19:24 ` Robin Murphy
2022-01-26 20:00 ` Peter Geis
2022-01-26 14:55 ` [PATCH 22/27] arm64: dts: rockchip: rk3568-evb: Enable VOP2 and hdmi Sascha Hauer
2022-01-26 14:55 ` [PATCH 23/27] arm64: dts: rockchip: enable vop2 and hdmi tx on quartz64a Sascha Hauer
2022-01-26 14:55 ` [PATCH 24/27] clk: rk3568: drop CLK_SET_RATE_PARENT from dclk_vop* Sascha Hauer
2022-01-29 17:48 ` Heiko Stübner
2022-01-31 8:10 ` Sascha Hauer
2022-02-08 11:41 ` Heiko Stübner [this message]
2022-01-26 14:55 ` [PATCH 25/27] clk: rk3568: Add CLK_SET_RATE_PARENT to the HDMI reference clock Sascha Hauer
2022-01-26 14:55 ` [PATCH 26/27] drm/rockchip: Make VOP driver optional Sascha Hauer
2022-01-26 14:55 ` [PATCH 27/27] drm: rockchip: Add VOP2 driver Sascha Hauer
2022-01-26 17:10 ` Aw: " Frank Wunderlich
2022-01-27 9:17 ` Piotr Oniszczuk
2022-01-27 11:00 ` Sascha Hauer
2022-01-27 14:43 ` Piotr Oniszczuk
[not found] ` <9d23b94a-c8db-6588-fadf-97ea5e748f8a@pscan.uk>
2022-01-28 9:19 ` MiPi DSI interface for RK3566 ? Sascha Hauer
2022-01-27 14:16 ` [PATCH v4 00/27] drm/rockchip: RK356x VOP2 support Michael Riesch
2022-02-08 11:57 ` (subset) " Heiko Stuebner
2022-02-08 13:21 ` 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=2260638.yNqFStFpQL@diego \
--to=heiko@sntech.de \
--cc=andy.yan@rock-chips.com \
--cc=benjamin.gaignard@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hjc@rock-chips.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=michael.riesch@wolfvision.net \
--cc=pgwipeout@gmail.com \
--cc=s.hauer@pengutronix.de \
/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).