Porting capture driver using ipu-v3 to kernel 4.1.1

cancel
Showing results for 
Search instead for 
Did you mean: 

Porting capture driver using ipu-v3 to kernel 4.1.1

461 Views
vvbinu
Contributor I

Hi...

I am trying to port camera capture driver from Linux kernel v 3.10.17 [customized - don't have details :smileysad:] to v 4.1.1 [Freescale/linux-fslc at v4.1.1 · GitHub].

I am getting errors in ipuv3 related functions. When checked, I could observe that ipuv3 related code has difference in the new kernel.

For example:

fatal error: linux/ipu-v3.h: No such file or directory

Can I get some reference on how to port the ipuv3 code?

Thanks & Regards,

Binoy.

Labels (2)
Tags (1)
0 Kudos
1 Reply

81 Views
MarekVasut
Senior Contributor I

I'm working on MX6 parallel camera support based on the patches from Philipp Zabel. I forward-ported them to 4.1.4, you can find them here LINK. I managed to get OV5642 Parallel Camera working with BD SabreLite and I managed to capture 640x480 picture. I didn't manage to capture a picture in any other resolution yet, this needs more work it seems.

To capture a still picture, compile the code (the sabrelite_defconfig has all the necessary options enabled, so use that to boot) and use this script to obtain an /x.png :

#!/bin/bash

WIDTH=640

HEIGHT=480

FMT=${WIDTH}x${HEIGHT}

media-ctl -l '"ov5642 1-003c":0->"mipi_ipu1_mux":1[1], "/soc/ipu@02400000/port@0":1->"IPU0 SMFC0":0[1]'

media-ctl -l '"IPU0 SMFC0":1->"imx-ipuv3-camera.2":0[1]'

# From camera to ipu1 mux

media-ctl -V '"mipi_ipu1_mux":1[fmt:YUYV2X8/'$FMT']'

# From ipu1 mux to ipu

media-ctl -V '"mipi_ipu1_mux":2[fmt:YUYV2X8/'$FMT']'

# ipu

media-ctl -V '"/soc/ipu@02400000/port@0":1[fmt:YUYV2X8/'$FMT']'

v4l2-ctl -d0 --set-fmt-video=width=${WIDTH},height=${HEIGHT},pixelformat=UYVY

echo "Capturing"

v4l2-ctl -d0 --stream-mmap --stream-to=/x.raw --stream-count=1

echo "Encoding"

convert -size $FMT -depth 16 uyvy:/x.raw /x.png

0 Kudos