From: Philipp Zabel <p.zabel@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>,
Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org, pza@pengutronix.de
Subject: Re: [PATCH master] video: IPUv3-LDB: fix LVDS serial clock configuration
Date: Wed, 07 May 2025 10:22:56 +0200 [thread overview]
Message-ID: <67fefe7d5352473523d3d799fe5805ca0d31d1f5.camel@pengutronix.de> (raw)
In-Reply-To: <8e63db4d-b75e-4185-a867-7b846b69c41b@pengutronix.de>
On Mi, 2025-05-07 at 09:25 +0200, Ahmad Fatoum wrote:
> Hello Sascha,
>
> On 5/6/25 09:51, Sascha Hauer wrote:
> > On Sun, Apr 27, 2025 at 03:44:53PM +0200, Ahmad Fatoum wrote:
>
> > > @@ -189,10 +200,10 @@ static int imx6q_ldb_prepare(struct imx_ldb_channel *imx_ldb_ch, int di,
> > > pixclk *= 2;
>
> This multiplication by 2 is only done for the single channel mode.
TBH, I don't quite understand this. In the kernel, di_clk is calculated
as drm_display_mode->clock * 1000 in either mode.
Does this mean that the pixclk parameter passed to imx6q_ldb_prepare
was 3.5 MHz here, resulting in the 7 MHz rate that ldb_di0_podf is set
to after this multiplication?
> > >
> > > if (dual) {
> > > - imx6q_set_clock(ldb, ipuno, dino, 0, pixclk);
> > > - imx6q_set_clock(ldb, ipuno, dino, 1, pixclk);
> > > + imx6q_set_clock(ldb, ipuno, dino, 0, pixclk * 7, pixclk);
> > > + imx6q_set_clock(ldb, ipuno, dino, 1, pixclk * 7, pixclk);
The di_clk:serial_clk ratio is 1:7 here, regardless of what happened to
pixclk before.
> > I think in dual channel mode we have to maintain a 1:3.5 setting instead
> > of 1:7.
>
> That means pixclk for dual channel mode here is already half the value
> it would be for single channel, i,e. 1:3.5.
In dual mode, the ipu_di clock has to run at double the serial_clk/7
rate because one IPU DI feeds two LDB channels. That's why the ratio
between ldb_di0/1_sel and ipu1_di0_sel must be set to 1:3.5, and so
that's what the ratio between imx6q_set_clock()'s serial_clk and di_clk
parameters should be as well.
regards
Philipp
prev parent reply other threads:[~2025-05-07 9:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-27 13:44 Ahmad Fatoum
2025-05-06 7:51 ` Sascha Hauer
2025-05-07 7:25 ` Ahmad Fatoum
2025-05-07 8:22 ` Philipp Zabel [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=67fefe7d5352473523d3d799fe5805ca0d31d1f5.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=pza@pengutronix.de \
--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