From: Luca Ceresoli <luca.ceresoli@bootlin.com>
To: Marek Vasut <marex@denx.de>
Cc: Abel Vesa <abelvesa@kernel.org>,
linux-clk@vger.kernel.org, Fabio Estevam <festevam@gmail.com>,
"Lukas F . Hartmann" <lukas@mntmn.com>,
Michael Turquette <mturquette@baylibre.com>,
Peng Fan <peng.fan@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>, Stephen Boyd <sboyd@kernel.org>,
imx@lists.linux.dev, kernel@dh-electronics.com,
linux-arm-kernel@lists.infradead.org,
Miquel Raynal <miquel.raynal@bootlin.com>,
Anson Huang <Anson.Huang@nxp.com>
Subject: Re: [PATCH] clk: imx: clk-imx8mp: Allow media_disp pixel clock reconfigure parent rate
Date: Wed, 13 Nov 2024 12:06:22 +0100 [thread overview]
Message-ID: <20241113120622.3501db73@booty> (raw)
In-Reply-To: <79f21303-b0ba-45ed-a842-7e5364fd4efc@denx.de>
Hi Marek,
+Cc: Anson (initial author of clk-imx8mp.c)
On Wed, 13 Nov 2024 00:14:15 +0100
Marek Vasut <marex@denx.de> wrote:
> On 11/12/24 11:42 PM, Luca Ceresoli wrote:
> > Hello Marek, Abel,
>
> Hi,
>
> > +Cc: Miquèl
> >
> > On Fri, 31 May 2024 22:26:26 +0200
> > Marek Vasut <marex@denx.de> wrote:
> >
> >> The media_disp[12]_pix clock supply LCDIFv3 pixel clock output. These
> >> clocks are usually the only downstream clock from Video PLL on i.MX8MP.
> >> Allow these clocks to reconfigure the Video PLL, as that results in
> >> accurate pixel clock. If the Video PLL is not reconfigured, the pixel
> >> clock accuracy is low.
> >>
> >> Signed-off-by: Marek Vasut <marex@denx.de>
> >
> > I'm afraid I just found this patch broke my previously working setup
> > with a panel connected on the LDB.
> Do you need a fix similar to this one?
>
> 4fbb73416b10 ("arm64: dts: imx8mp-phyboard-pollux: Set Video PLL1
> frequency to 506.8 MHz")
So, 4fbb73416b10 is adding an assigned-clock-rates to hardcode rates,
especially the video_pll1 rate.
However this is not fixing the problem I'm seeing. The existing
assigned-clock-rates value for video_pll1 used to work because it is
the media_ldb parent, and the parent wasn't recalculated. After this
patch got applied the video_pll1 rate is computed at runtime and so the
hardcoded value in assigned-clock-rates does not matter in the end.
I also tried a configuration that appears to me as the most optimal for
managing both an LVDS panel on LDB and a DSI panel (which is also
present in the more complete design I'm working on):
* media_ldb and media_disp2 (the two clocks involved in LDB/LVDS
output) left as children of video_pll1 as per imx8mp.dtsi
* media_disp1 (used for DSI output) reparented to sys_pll3
The above config assigns to each output (LVDS and DSI) an ad-hoc PLL.
However the problem does not disappear, simply because the problem is
that requesting a ~500 MHz rate to video_pll1 results in it to be
configured at ~72 MHz.
This confirms the problem I reported appears to be an incorrect
computation of the video_pll1 rate, which in turn looks like a bug
(which as I said is exposed, not introduced, by this patch). If
setting a hardcoded value could make it work, that would look like
hiding a bug, wouldn't it?
And at least with a single-panel setup the runtime computation should
work just fine.
More generally speaking, I don't follow your approach: your patch
enables runtime computation of the video_pll1 rate, but you now suggest
to hardcode it. Am I missing something?
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2024-11-13 11:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-31 20:26 [PATCH] clk: imx: clk-imx8mp: Allow media_disp pixel clock reconfigure parent rate Marek Vasut
2024-05-31 20:26 ` Marek Vasut
2024-06-21 4:48 ` Abel Vesa
2024-06-21 6:38 ` Abel Vesa
2024-06-21 17:52 ` Adam Ford
2024-06-21 20:22 ` Marek Vasut
2024-11-12 22:42 ` Luca Ceresoli
2024-11-12 23:14 ` Marek Vasut
2024-11-13 11:06 ` Luca Ceresoli [this message]
2024-11-13 21:19 ` Marek Vasut
2024-11-15 17:09 ` Luca Ceresoli
2024-11-16 19:47 ` Marek Vasut
2024-11-18 8:15 ` Miquel Raynal
2024-11-18 14:30 ` Marek Vasut
2024-11-19 15:41 ` Miquel Raynal
2024-11-19 21:21 ` Marek Vasut
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=20241113120622.3501db73@booty \
--to=luca.ceresoli@bootlin.com \
--cc=Anson.Huang@nxp.com \
--cc=abelvesa@kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@dh-electronics.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=lukas@mntmn.com \
--cc=marex@denx.de \
--cc=miquel.raynal@bootlin.com \
--cc=mturquette@baylibre.com \
--cc=peng.fan@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@kernel.org \
--cc=shawnguo@kernel.org \
/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.