Hi Loic,
Thanks for your reply.
On 7/19/19 8:56 AM, Loic Poulain wrote:
Hi Laura,
On Thu, 18 Jul 2019 at 15:03, Laura Nao <laura.nao@xxxxxxxxxxxx
<mailto:laura.nao@xxxxxxxxxxxx>> wrote:
Hello Loic,
I'm having some issues with RAW8 mode on the OV5640 camera and I'd like
to kindly ask for your advice, as I saw that you added support for RAW
mode in the mainline kernel driver.
I'm trying to capture some raw images on a i.MX6Q based board. I
configured the pipeline as follows:
media-ctl -l "'ov5640 1-003c':0 -> 'imx6-mipi-csi2':0[1]"
media-ctl -l "'imx6-mipi-csi2':2 -> 'ipu1_csi1':0[1]"
media-ctl -l "'ipu1_csi1':2 -> 'ipu1_csi1 capture':0[1]"
media-ctl -V "'ov5640 1-003c':0 [fmt:SBGGR8_1X8/2592x1944 field:none]"
media-ctl -V "'imx6-mipi-csi2':2 [fmt:SBGGR8_1X8/2592x1944 field:none]"
I'm capturing the frame using v4l-utils:
v4l2-ctl -d /dev/video5 --verbose --set-fmt
video=width=2592,height=1944,pixelformat=BA81 --stream-mmap
--stream-count=1 --stream-to=bggr_2592x1944.raw
Did you also try with other resolutions?
The images I'm obtaining are completely garbled. I tried both 5.2
mainline and 5.1.18 kernels.
Did you try enabling the sensor test pattern, would be interesting to
check if there is some coherency in the raw buffer.
I did some tests with the color bars test pattern enabled at different
resolutions. The 640x480 frame seems to be the closest to the test
pattern, even though the image is still not perfectly aligned.
With increasing resolution, the image gets more garbled.
I uploaded some images with different resolutions here:
https://imgur.com/a/2o9WZMs
As reference, I'm using the bayer2rgb tool to convert the raw files to
rgb (https://github.com/jdthomas/bayer2rgb).
I definitely need to give a shot to last driver version. Last time I
tried I backported the driver to a 4.14 tree:
https://git.linaro.org/people/loic.poulain/linux.git/log/?h=qcomlt-4.14-ov5640
And it worked on my side (with dragonboard 410c).
I'm able to correctly capture YUV frames in all resolutions with the
same driver (with the pipeline configured to go through the
ipu1_ic_prpenc node first).
Do you have any insight on what might be causing these issues? Is the
PLL configuration supposed to be changed when RAW8 format is selected?
Well, you can have a lower PCLK with RAW format, but it should work anyway.
Regards,
Loic
I also quickly tested the raw capture with a 4.14 kernel with your
patches applied, but the resulting images looks pretty much the same
(640x480 is the only resolution close to the expected frame).
Best,
Laura