From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Pengyu Luo <mitltlatltl@gmail.com>
Cc: Martin Kepplinger-Novakovic <martink@posteo.de>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] media: hi846: Add 6MP and 8MP modes support
Date: Thu, 30 Apr 2026 23:39:34 +0300 [thread overview]
Message-ID: <afO-Bg5PrPn9mnnp@kekkonen.localdomain> (raw)
In-Reply-To: <CAH2e8h5mGfYZiG+Uy05xp9cDxy_7uAZ46ywHYrK5VYavLyLtrQ@mail.gmail.com>
On Fri, May 01, 2026 at 12:18:09AM +0800, Pengyu Luo wrote:
> > > @@ -1042,9 +1142,11 @@ static const char * const hi846_test_pattern_menu[] = {
> > >
> > > #define FREQ_INDEX_640 0
> > > #define FREQ_INDEX_1280 1
> > > +#define FREQ_INDEX_3264 2
> > > static const s64 hi846_link_freqs[] = {
> > > [FREQ_INDEX_640] = 80000000,
> > > [FREQ_INDEX_1280] = 200000000,
> > > + [FREQ_INDEX_3264] = 288000000,
> >
> > Looking at the driver, the PLL configuration is present in the lane number
> > specific register list so the link frequency is in fact the same for all
> > modes. This problem isn't introduced by this patch but I think this needs
> > to be fixed before adding further modes to the driver.
> >
>
> TBH, I didn't investigate the calculations. I just searched the
> datasheet for it. They are exactly wrong. Thans for pointing out this.
>
> I can fix it, but the question is this driver was writing against
> 25Mhz mclk, but the typical value from datasheet is 24Mhz, and one
> device is using 25Mhz as the clock rate, my device is using 24Mhz,
> 25Mhz is unsupported on my platform. It seems that making the list not
> be runtime is not allowed as nobody did like this.
What do you mean?
PLL configuration calculated from platform and runtime configuration is
definitely preferred over hard-coded configuration, albeit much harder to
implement. It also helps to prevent problems such as the one above.
--
Sakari Ailus
prev parent reply other threads:[~2026-04-30 20:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 7:03 [PATCH 0/2] fix and improve for Hi846 Pengyu Luo
2026-04-29 7:03 ` [PATCH 1/2] media: hi846: fix hi846_write_reg_16 handling Pengyu Luo
2026-04-29 7:44 ` Sakari Ailus
2026-04-29 7:03 ` [PATCH 2/2] media: hi846: Add 6MP and 8MP modes support Pengyu Luo
2026-04-29 9:01 ` Sakari Ailus
2026-04-30 16:18 ` Pengyu Luo
2026-04-30 20:39 ` Sakari Ailus [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=afO-Bg5PrPn9mnnp@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=hverkuil@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=martink@posteo.de \
--cc=mchehab@kernel.org \
--cc=mitltlatltl@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®