All of lore.kernel.org
 help / color / mirror / Atom feed
* i.MX6Q + ov5640 CSI-2 Framerate (on 5.4-rc3)
@ 2019-10-14 19:53 Adam Ford
  2019-10-18 19:00 ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Ford @ 2019-10-14 19:53 UTC (permalink / raw)
  To: linux-media

I have an i.MX6Q with an ov5640 connected to the mipi-csi2 interface.

I am routing ov5640 -> ipu1_csi0_mux -> ip1_csi0 -> ip1_csi0 capture.

I am trying to go through the steps to attempt to get 60fps at
640x480, but the best I can appear to acheive is 30fps.

v4l2-ctl --all

Streaming Parameters Video Capture:
        Capabilities     : timeperframe
        Frames per second: 30.000 (30/1)
        Read buffers     : 0

 I have tried setting both the ov5640 and the ipu1_csi0 to 1/60 without success.

Can someone tell me if it's even possible on this platform?  When I
stream the video to the HDMI monitor, I am only using 3% of the ARM,
so I don't think it's processor limited.

adam

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: i.MX6Q + ov5640 CSI-2 Framerate (on 5.4-rc3)
  2019-10-14 19:53 i.MX6Q + ov5640 CSI-2 Framerate (on 5.4-rc3) Adam Ford
@ 2019-10-18 19:00 ` Fabio Estevam
  2019-10-21  8:48   ` Philipp Zabel
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2019-10-18 19:00 UTC (permalink / raw)
  To: Adam Ford; +Cc: linux-media, Steve Longerbeam, Philipp Zabel

Hi Adam,

Adding Steve and Philipp in case they can help.

On Tue, Oct 15, 2019 at 1:52 AM Adam Ford <aford173@gmail.com> wrote:
>
> I have an i.MX6Q with an ov5640 connected to the mipi-csi2 interface.
>
> I am routing ov5640 -> ipu1_csi0_mux -> ip1_csi0 -> ip1_csi0 capture.
>
> I am trying to go through the steps to attempt to get 60fps at
> 640x480, but the best I can appear to acheive is 30fps.
>
> v4l2-ctl --all
>
> Streaming Parameters Video Capture:
>         Capabilities     : timeperframe
>         Frames per second: 30.000 (30/1)
>         Read buffers     : 0
>
>  I have tried setting both the ov5640 and the ipu1_csi0 to 1/60 without success.
>
> Can someone tell me if it's even possible on this platform?  When I
> stream the video to the HDMI monitor, I am only using 3% of the ARM,
> so I don't think it's processor limited.
>
> adam

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: i.MX6Q + ov5640 CSI-2 Framerate (on 5.4-rc3)
  2019-10-18 19:00 ` Fabio Estevam
@ 2019-10-21  8:48   ` Philipp Zabel
  2019-10-22 14:30     ` Adam Ford
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Zabel @ 2019-10-21  8:48 UTC (permalink / raw)
  To: Fabio Estevam, Adam Ford; +Cc: linux-media, Steve Longerbeam

Hi Adam, Fabio,

On Fri, 2019-10-18 at 16:00 -0300, Fabio Estevam wrote:
> Hi Adam,
> 
> Adding Steve and Philipp in case they can help.
> 
> On Tue, Oct 15, 2019 at 1:52 AM Adam Ford <aford173@gmail.com> wrote:
> > I have an i.MX6Q with an ov5640 connected to the mipi-csi2 interface.
> > 
> > I am routing ov5640 -> ipu1_csi0_mux -> ip1_csi0 -> ip1_csi0 capture.
> > 
> > I am trying to go through the steps to attempt to get 60fps at
> > 640x480, but the best I can appear to acheive is 30fps.
> >
> > 
> > v4l2-ctl --all
> > 
> > Streaming Parameters Video Capture:
> >         Capabilities     : timeperframe
> >         Frames per second: 30.000 (30/1)
> >         Read buffers     : 0
> > 
> >  I have tried setting both the ov5640 and the ipu1_csi0 to 1/60 without success.
> > 
> > Can someone tell me if it's even possible on this platform?  When I
> > stream the video to the HDMI monitor, I am only using 3% of the ARM,
> > so I don't think it's processor limited.

That should be possible. The sensor and dual-lane CSI-2 link can support
1920x1080p30 or 1280x720p60, only the driver currently limits 60 fps
capture to 640x480.

The format has to be propagated through the media control graph from the
sensor to the capture device. Since the CSI-2 receiver and multiplexers
are not frame rate aware, the CSI has to be told the correct frame
interval at its input.

What does your configuration look like? I'd expect something like:

media-ctl --set-v4l2 "'ov5640 ?-00??':0[fmt:UYVY8_1X16/640x480@1/60]"
media-ctl --set-v4l2 "'imx6-mipi-csi2':1[fmt:UYVY8_1X16/640x480]"
media-ctl --set-v4l2 "'ipu1_csi0_mux':2[fmt:UYVY8_1X16/640x480]"
media-ctl --set-v4l2 "'ipu1_csi0':0[fmt:UYVY8_1X16/640x480@1/60]"
media-ctl --set-v4l2 "'ipu1_csi0':2[fmt:AYUV32/960x540@1/60]"

What is the output of "media-ctl --print-topology"?

regards
Philipp


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: i.MX6Q + ov5640 CSI-2 Framerate (on 5.4-rc3)
  2019-10-21  8:48   ` Philipp Zabel
@ 2019-10-22 14:30     ` Adam Ford
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Ford @ 2019-10-22 14:30 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: Fabio Estevam, linux-media, Steve Longerbeam

On Mon, Oct 21, 2019 at 3:48 AM Philipp Zabel <p.zabel@pengutronix.de> wrote:
>
> Hi Adam, Fabio,
>
> On Fri, 2019-10-18 at 16:00 -0300, Fabio Estevam wrote:
> > Hi Adam,
> >
> > Adding Steve and Philipp in case they can help.
> >
> > On Tue, Oct 15, 2019 at 1:52 AM Adam Ford <aford173@gmail.com> wrote:
> > > I have an i.MX6Q with an ov5640 connected to the mipi-csi2 interface.
> > >
> > > I am routing ov5640 -> ipu1_csi0_mux -> ip1_csi0 -> ip1_csi0 capture.
> > >
> > > I am trying to go through the steps to attempt to get 60fps at
> > > 640x480, but the best I can appear to acheive is 30fps.
> > >
> > >
> > > v4l2-ctl --all
> > >
> > > Streaming Parameters Video Capture:
> > >         Capabilities     : timeperframe
> > >         Frames per second: 30.000 (30/1)
> > >         Read buffers     : 0
> > >
> > >  I have tried setting both the ov5640 and the ipu1_csi0 to 1/60 without success.
> > >
> > > Can someone tell me if it's even possible on this platform?  When I
> > > stream the video to the HDMI monitor, I am only using 3% of the ARM,
> > > so I don't think it's processor limited.
>
> That should be possible. The sensor and dual-lane CSI-2 link can support
> 1920x1080p30 or 1280x720p60, only the driver currently limits 60 fps
> capture to 640x480.

Is that an artificial limit? Looking through the driver, it appears to
do more and more automatic calcuations to determine pixel and frame
rate.  I wonder how hard it would be
>
> The format has to be propagated through the media control graph from the
> sensor to the capture device. Since the CSI-2 receiver and multiplexers
> are not frame rate aware, the CSI has to be told the correct frame
> interval at its input.
>
> What does your configuration look like? I'd expect something like:
>
> media-ctl --set-v4l2 "'ov5640 ?-00??':0[fmt:UYVY8_1X16/640x480@1/60]"
> media-ctl --set-v4l2 "'imx6-mipi-csi2':1[fmt:UYVY8_1X16/640x480]"
> media-ctl --set-v4l2 "'ipu1_csi0_mux':2[fmt:UYVY8_1X16/640x480]"
> media-ctl --set-v4l2 "'ipu1_csi0':0[fmt:UYVY8_1X16/640x480@1/60]"
> media-ctl --set-v4l2 "'ipu1_csi0':2[fmt:AYUV32/960x540@1/60]"

Thanks for the suggestion.  I was missing the entry for "'ipu1_csi0':0
 I only listed the "'ipu1_csi0':2

It's working now.

Sorry for the noise.

adam
>
> What is the output of "media-ctl --print-topology"?
>
> regards
> Philipp
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-22 14:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14 19:53 i.MX6Q + ov5640 CSI-2 Framerate (on 5.4-rc3) Adam Ford
2019-10-18 19:00 ` Fabio Estevam
2019-10-21  8:48   ` Philipp Zabel
2019-10-22 14:30     ` Adam Ford

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.