From: Benoit Parrot <bparrot@ti.com>
To: Jacopo Mondi <jacopo@jmondi.org>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
Hans Verkuil <hverkuil@xs4all.nl>, <linux-media@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<hugues.fruchet@st.com>
Subject: Re: [Patch 1/3] media: ov5640: add PIXEL_RATE control
Date: Wed, 2 Oct 2019 10:06:15 -0500 [thread overview]
Message-ID: <20191002150615.tyxy3n6cbxttbpum@ti.com> (raw)
In-Reply-To: <20191002143226.psrcocsjs2wtiydd@uno.localdomain>
Jacopo Mondi <jacopo@jmondi.org> wrote on Wed [2019-Oct-02 16:32:26 +0200]:
> Hi Benoit,
>
> On Wed, Oct 02, 2019 at 07:14:38AM -0500, Benoit Parrot wrote:
> > Hi Jacopo,
> >
> > Maybe, I miss spoke when I mentioned a helper I did not intent a framework
> > level generic function. Just a function to help in this case :)
>
> Yes indeed, the discussion thread I linked here was mostly interesting
> because Hugues tried to do the same for LINK_FREQ iirc, and there
> where some usefult pointers.
>
> >
> > That being said, I re-read the thread you mentioned. And as Hughes pointed
> > out dynamically generating a "working" link frequency value which can be
> > used by a CSI2 receiver to properly configure its PHY is not trivial.
> >
> > When I created this patch, I also had another to add V4L2_CID_LINK_FREQ
> > support. I am testing this against the TI CAL CSI2 receiver, which already
> > uses the V4L2_CID_PIXEL_RATE value for that purpose, so I also had a patch
> > to add support for V4L2_CID_LINK_FREQ to that driver as well.
> >
> > Unfortunately, similar to Hughes' findings I was not able to make it "work"
> > with all supported resolution/framerate.
>
> As reported by Hugues findings, the PLL calculation procedure might be
> faulty, and the actuall frequencies on the bus are different from the
> calculated ones.
>
> I wish I had more time to re-look at that, as they worked for my and
> Sam's use case, but deserve some rework.
>
> >
> > Unlike my V4L2_CID_PIXEL_RATE solution which now works in all mode with the
> > same receiver.
> >
>
> It seems to me you're reporting a fixed rate. It might make your
> receiver happy, but does not report what is acutally put on the bus.
> Am I missing something ?
No it is not fixed, the only fixed value was the initial value (which
representative of the initial/default resolution and framerate), I
fixed this in v2. The reported PIXEL_RATE is re-calculated every time there
is a s_fmt and/or framerate change and the V4L2_CID_PIXEL_RATE control
value is updated accordingly.
>
> > So long story short I dropped the V4L2_CID_LINK_FREQ patch and focused on
> > V4L2_CID_PIXEL_RATE instead.
> >
>
> As Sakari pointed out, going from one to the other is trivial and
> could be done on top.
As you said it could be done on top. :)
Benoit
>
> Thanks
> j
>
> > Regard,
> > Benoit
> >
> > Jacopo Mondi <jacopo@jmondi.org> wrote on Wed [2019-Oct-02 09:59:51 +0200]:
> > > Hi Benoit,
> > > +Hugues
> > >
> > > If you're considering an helper, this thread might be useful to you:
> > > https://patchwork.kernel.org/patch/11019673/
> > >
> > > Thanks
> > > j
> > >
> >
> >
next prev parent reply other threads:[~2019-10-02 15:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 15:22 [Patch 0/3] media: ov5640: updates Benoit Parrot
2019-09-25 15:22 ` [Patch 1/3] media: ov5640: add PIXEL_RATE control Benoit Parrot
2019-10-01 7:57 ` Sakari Ailus
2019-10-01 16:23 ` Benoit Parrot
2019-10-02 7:59 ` Jacopo Mondi
2019-10-02 12:14 ` Benoit Parrot
2019-10-02 12:35 ` Sakari Ailus
2019-10-02 12:40 ` Benoit Parrot
2019-10-02 14:32 ` Jacopo Mondi
2019-10-02 15:06 ` Benoit Parrot [this message]
2019-10-03 6:55 ` Jacopo Mondi
2019-09-25 15:23 ` [Patch 2/3] media: ov5640: Fix 1920x1080 mode to remove extra enable/disable Benoit Parrot
2019-09-25 15:23 ` [Patch 3/3] media: ov5640: Make 2592x1944 mode only available at 15 fps Benoit Parrot
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=20191002150615.tyxy3n6cbxttbpum@ti.com \
--to=bparrot@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=hugues.fruchet@st.com \
--cc=hverkuil@xs4all.nl \
--cc=jacopo@jmondi.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@linux.intel.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®