AnsweredAssumed Answered

mxc_v4l_dqueue timeout error for ov5640 in i.Mx6DL SODIMM

Question asked by Mohamed Sarjoondeen on Sep 1, 2016
Latest reply on Sep 3, 2016 by Mohamed Sarjoondeen

Hello team,


We are working in PDS device prototype based on i.Mx6DL SODIMM module.

We are using  kernel 3.10.53.We are now trying to bring camera up


Camera used is Color CMOS QSXGA (5MP) based on OV5640 sensor(parallel CSI). Resolution is 2592x1944


Following changes have been done in dts file

    ov5640: ov5640@3c {
            compatible = "ov5640";
            reg = <0x3c>;
            pinctrl-names = "default";
            pinctrl-0 = <&pinctrl_ipu1_1>;
            clocks = <&clks 201>;
            clock-names = "csi_mclk";
            csi_id = <0>;
            mclk = <24000000>;
            mclk_source = <0>;


    v4l2_cap_0 {
        compatible = "fsl,imx6q-v4l2-capture";
        ipu_id = <0>;
        csi_id = <0>;
        mclk_source = <0>;
        status = "okay";


    v4l2_out {
        compatible = "fsl,mxc_v4l2_output";
        status = "okay";


IPU pinctrl pins are added in


   ipu1 {
                pinctrl_ipu1_1: ipu1grp-sm-csi {
                        fsl,pins = <
                    MX6QDL_PAD_CSI0_DAT10__IPU1_CSI0_DATA10  0x80000000
                    MX6QDL_PAD_CSI0_DAT8__IPU1_CSI0_DATA08   0x80000000
                    MX6QDL_PAD_CSI0_DAT9__IPU1_CSI0_DATA09   0x80000000
                    MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15  0x80000000
                    MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14  0x80000000
                    MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17  0x80000000
                    MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16  0x80000000
                    MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13  0x80000000
                    MX6QDL_PAD_CSI0_DAT11__IPU1_CSI0_DATA11  0x80000000
                    MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK 0x80000000
                    MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12  0x80000000
                    MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC   0x80000000
                    MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC    0x80000000                
/*                  MX6QDL_PAD_GPIO_0__CCM_CLKO1             0x80000000 */


These changes and all done and ov5640 driver has been enabled in make menuconfig


With these changes. We have run the mxc_v4l2_capture application and this is the ouput

root@imx6dlsabresd: ./mxc_v4l2_capture.out -iw 2592 -ih 1944 -ow 640 -oh 480 -d /dev/video0 -c 5 1.yuv

in_width = 2592, in_height = 1944


out_width = 640, out_height = 480

top = 0, left = 0
   Setting mclk to 24 MHz
sensor chip is ov5640_camera
sensor supported frame size:
sensor frame format: YUYV
sensor frame format: YUYV
sensor frame format: YUYV
sensor frame format: YUYV
sensor frame format: YUYV
sensor frame format: YUYV
sensor frame format: YUYV
sensor frame format: YUYV
sensor frame format: YUYV

         Width = 640     Height = 480    Image size = 460800
pixelformat: YU12
ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
ERROR: v4l2 capture: VIDIOC_QBUF: buffer already queued

 Can you get what is the reason for this error. I am completely struck up with this.

Harware wise probed all possible lines. voltage supply, HSYNC,VSYNC, Data lines, pixelclock and all seems fine. So till CPU it seems fine.

But not sure why V4L2 app fails to capture. Even mxc v4l2 Overlay application also fails


Please help with this.


Thanks in advance.