Discussion:
[meta-freescale] OV5640 MIPI-CSI2 driver - why the limitations?
Jacob Pedersen
2014-09-16 13:25:04 UTC
Permalink
Hi folks,



I'm using a OmniVision OV5640 MIPI-CSI2 image sensor with a iMX6 Quad board, and I'm doing some computer vision applications. I'm curious to know why the driver for the OV5640 sensor is limited to 30 fps, even though the sensor can do 60 fps at 720p and 90 fps at VGA? As far as I can see in the driver, the frame rate is clamped to maximum 30 fps.



Is there a technical reason, or is it just because it hasn't been updated for all the supported modes?



The driver also limits the available image formats, which makes one required to do the conversion in software or (as in my case) using the IPU. The IPU is fairly fast to do the simple UYVY to RGB24 conversion, but still slower than just getting an RGB image from the sensor.



Best,

Jacob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20140916/8ed2b6d9/attachment.html>
Daiane Angolini
2014-09-16 13:43:49 UTC
Permalink
Post by Jacob Pedersen
Hi folks,
I'm using a OmniVision OV5640 MIPI-CSI2 image sensor with a iMX6 Quad board,
and I'm doing some computer vision applications. I'm curious to know why the
driver for the OV5640 sensor is limited to 30 fps, even though the sensor
can do 60 fps at 720p and 90 fps at VGA? As far as I can see in the driver,
the frame rate is clamped to maximum 30 fps.
Is there a technical reason, or is it just because it hasn't been updated
for all the supported modes?
The driver also limits the available image formats, which makes one required
to do the conversion in software or (as in my case) using the IPU. The IPU
is fairly fast to do the simple UYVY to RGB24 conversion, but still slower
than just getting an RGB image from the sensor.
This limitation is due to the camera device driver. Only few
configurations are implemented.


Daiane
Eric Nelson
2014-09-16 14:00:09 UTC
Permalink
Post by Daiane Angolini
Post by Jacob Pedersen
Hi folks,
I'm using a OmniVision OV5640 MIPI-CSI2 image sensor with a iMX6 Quad board,
and I'm doing some computer vision applications. I'm curious to know why the
driver for the OV5640 sensor is limited to 30 fps, even though the sensor
can do 60 fps at 720p and 90 fps at VGA? As far as I can see in the driver,
the frame rate is clamped to maximum 30 fps.
Is there a technical reason, or is it just because it hasn't been updated
for all the supported modes?
The driver also limits the available image formats, which makes one required
to do the conversion in software or (as in my case) using the IPU. The IPU
is fairly fast to do the simple UYVY to RGB24 conversion, but still slower
than just getting an RGB image from the sensor.
This limitation is due to the camera device driver. Only few
configurations are implemented.
Those I2C blobs are pretty difficult to get right!

Regards,


Eric
Jacob Pedersen
2014-09-16 14:04:32 UTC
Permalink
So it's a matter about getting the datasheet for the image sensor and then adding a new mode (array of reg_value structs) to the driver?

Best,
Jacob

-----Oprindelig meddelelse-----
Fra: Eric Nelson [mailto:eric.nelson at boundarydevices.com]
Sendt: 16. september 2014 16:00
Til: Daiane Angolini; Jacob Pedersen
Cc: meta-freescale at yoctoproject.org
Emne: Re: [meta-freescale] OV5640 MIPI-CSI2 driver - why the limitations?
Post by Daiane Angolini
Post by Jacob Pedersen
Hi folks,
I'm using a OmniVision OV5640 MIPI-CSI2 image sensor with a iMX6 Quad
board, and I'm doing some computer vision applications. I'm curious
to know why the driver for the OV5640 sensor is limited to 30 fps,
even though the sensor can do 60 fps at 720p and 90 fps at VGA? As
far as I can see in the driver, the frame rate is clamped to maximum 30 fps.
Is there a technical reason, or is it just because it hasn't been
updated for all the supported modes?
The driver also limits the available image formats, which makes one
required to do the conversion in software or (as in my case) using
the IPU. The IPU is fairly fast to do the simple UYVY to RGB24
conversion, but still slower than just getting an RGB image from the sensor.
This limitation is due to the camera device driver. Only few
configurations are implemented.
Those I2C blobs are pretty difficult to get right!

Regards,


Eric
Daiane Angolini
2014-09-16 14:04:48 UTC
Permalink
On Tue, Sep 16, 2014 at 11:00 AM, Eric Nelson
Post by Eric Nelson
Post by Daiane Angolini
Post by Jacob Pedersen
Hi folks,
I'm using a OmniVision OV5640 MIPI-CSI2 image sensor with a iMX6 Quad board,
and I'm doing some computer vision applications. I'm curious to know why the
driver for the OV5640 sensor is limited to 30 fps, even though the sensor
can do 60 fps at 720p and 90 fps at VGA? As far as I can see in the driver,
the frame rate is clamped to maximum 30 fps.
Is there a technical reason, or is it just because it hasn't been updated
for all the supported modes?
The driver also limits the available image formats, which makes one required
to do the conversion in software or (as in my case) using the IPU. The IPU
is fairly fast to do the simple UYVY to RGB24 conversion, but still slower
than just getting an RGB image from the sensor.
This limitation is due to the camera device driver. Only few
configurations are implemented.
Those I2C blobs are pretty difficult to get right!
+1

Daiane
Jacob Pedersen
2014-09-17 12:24:46 UTC
Permalink
I've been looking into the implementation (drivers/media/platform/mxc/capture/ov5640_mipi.c), and found that the only difference between the 15 fps and the 30 fps i2c blobs is the value of the 0x3035 register. The 0x3035 is the system clock divider and MIPI PCLK scale divider.

For the 30 fps VGA mode the value is 0x14, and for the 15 fps VGA mode the value is 0x22.

I tried changing the value to 0x12 (divide MIPI PCLK by two instead of four), which should double the frequency and enable 60 fps. That's unfortunately not the case - it's still running at 30 fps.

What else to I need to change in the driver?

Best,
Jacob

-----Oprindelig meddelelse-----
Fra: angolini at gmail.com [mailto:angolini at gmail.com] P? vegne af Daiane Angolini
Sendt: 16. september 2014 16:05
Til: Eric Nelson
Cc: Jacob Pedersen; meta-freescale at yoctoproject.org
Emne: Re: [meta-freescale] OV5640 MIPI-CSI2 driver - why the limitations?
Post by Eric Nelson
Post by Daiane Angolini
Post by Jacob Pedersen
Hi folks,
I'm using a OmniVision OV5640 MIPI-CSI2 image sensor with a iMX6
Quad board, and I'm doing some computer vision applications. I'm
curious to know why the driver for the OV5640 sensor is limited to
30 fps, even though the sensor can do 60 fps at 720p and 90 fps at
VGA? As far as I can see in the driver, the frame rate is clamped to maximum 30 fps.
Is there a technical reason, or is it just because it hasn't been
updated for all the supported modes?
The driver also limits the available image formats, which makes one
required to do the conversion in software or (as in my case) using
the IPU. The IPU is fairly fast to do the simple UYVY to RGB24
conversion, but still slower than just getting an RGB image from the sensor.
This limitation is due to the camera device driver. Only few
configurations are implemented.
Those I2C blobs are pretty difficult to get right!
+1

Daiane
Alfonso Tamés
2014-09-17 22:23:24 UTC
Permalink
Excuse me for the off topic question but does anyone know where to find complete documentation for the ov5640? I successfully patched a Wandboard Kernel with Eric?s patches from the Boundary Kernel to enable autofocus but would like to explore if it can be set to any other position beside the center of the image.

Thanks,

Alfonso
Post by Jacob Pedersen
I've been looking into the implementation (drivers/media/platform/mxc/capture/ov5640_mipi.c), and found that the only difference between the 15 fps and the 30 fps i2c blobs is the value of the 0x3035 register. The 0x3035 is the system clock divider and MIPI PCLK scale divider.
For the 30 fps VGA mode the value is 0x14, and for the 15 fps VGA mode the value is 0x22.
I tried changing the value to 0x12 (divide MIPI PCLK by two instead of four), which should double the frequency and enable 60 fps. That's unfortunately not the case - it's still running at 30 fps.
What else to I need to change in the driver?
Best,
Jacob
-----Oprindelig meddelelse-----
Fra: angolini at gmail.com [mailto:angolini at gmail.com] P? vegne af Daiane Angolini
Sendt: 16. september 2014 16:05
Til: Eric Nelson
Cc: Jacob Pedersen; meta-freescale at yoctoproject.org
Emne: Re: [meta-freescale] OV5640 MIPI-CSI2 driver - why the limitations?
Post by Eric Nelson
Post by Daiane Angolini
Post by Jacob Pedersen
Hi folks,
I'm using a OmniVision OV5640 MIPI-CSI2 image sensor with a iMX6
Quad board, and I'm doing some computer vision applications. I'm
curious to know why the driver for the OV5640 sensor is limited to
30 fps, even though the sensor can do 60 fps at 720p and 90 fps at
VGA? As far as I can see in the driver, the frame rate is clamped to maximum 30 fps.
Is there a technical reason, or is it just because it hasn't been
updated for all the supported modes?
The driver also limits the available image formats, which makes one
required to do the conversion in software or (as in my case) using
the IPU. The IPU is fairly fast to do the simple UYVY to RGB24
conversion, but still slower than just getting an RGB image from the sensor.
This limitation is due to the camera device driver. Only few
configurations are implemented.
Those I2C blobs are pretty difficult to get right!
+1
Daiane
--
_______________________________________________
meta-freescale mailing list
meta-freescale at yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-freescale
Eric Bénard
2014-09-18 08:06:51 UTC
Permalink
Hi Alfonso,

Le Wed, 17 Sep 2014 17:23:24 -0500,
Post by Alfonso Tamés
Excuse me for the off topic question but does anyone know where to find complete documentation for the ov5640? I successfully patched a Wandboard Kernel with Eric?s patches from the Boundary Kernel to enable autofocus but would like to explore if it can be set to any other position beside the center of the image.
you need an NDA with Omnivision ... maybe asking google for "ov5640
manual pdf" could help who knows ;-)

Eric

Loading...