AnsweredAssumed Answered

BT1120 1080P connect to imx6q

Question asked by jie jia on Mar 17, 2017
Latest reply on Mar 22, 2017 by jie jia

Hi,

  I'm using an i.mx6q-sabresd with a kernel based on linux3.0.35.

  There is a BT1120 1080P HD-SDI camera connected on CSI0 according to gv7601. the GV7601 does not need to be configured using SPI on our setup.  There are pulse output from gv7601, and the frequence of pclk is 74.25MHz. 

  I've manually applied the BT1120 patch to enable 16bit and 1120 from Support BT1120 progressive mode in Mx6Q 

 

  On the software side, I have that pinmuxing:

MX6Q_PAD_EIM_D27__IPU1_CSI0_D_0,
MX6Q_PAD_EIM_D26__IPU1_CSI0_D_1,
MX6Q_PAD_EIM_D31__IPU1_CSI0_D_2,
MX6Q_PAD_EIM_D30__IPU1_CSI0_D_3,
MX6Q_PAD_CSI0_DAT4__IPU1_CSI0_D_4,
MX6Q_PAD_CSI0_DAT5__IPU1_CSI0_D_5,
MX6Q_PAD_CSI0_DAT6__IPU1_CSI0_D_6,
MX6Q_PAD_CSI0_DAT7__IPU1_CSI0_D_7,
MX6Q_PAD_CSI0_DAT8__IPU1_CSI0_D_8,
MX6Q_PAD_CSI0_DAT9__IPU1_CSI0_D_9,
MX6Q_PAD_CSI0_DAT10__IPU1_CSI0_D_10,
MX6Q_PAD_CSI0_DAT11__IPU1_CSI0_D_11,
MX6Q_PAD_CSI0_DAT12__IPU1_CSI0_D_12,
MX6Q_PAD_CSI0_DAT13__IPU1_CSI0_D_13,
MX6Q_PAD_CSI0_DAT14__IPU1_CSI0_D_14,
MX6Q_PAD_CSI0_DAT15__IPU1_CSI0_D_15,
MX6Q_PAD_CSI0_DAT16__IPU1_CSI0_D_16,
MX6Q_PAD_CSI0_DAT17__IPU1_CSI0_D_17,
MX6Q_PAD_CSI0_DAT18__IPU1_CSI0_D_18,
MX6Q_PAD_CSI0_DAT19__IPU1_CSI0_D_19,

 

That is what I have in my data_capture[] :

        {
                .ipu = 0,
                .csi = 0,
                .mclk_source = 0,
                .is_mipi = 0,
        },

 

I also set CSI0 to parallel with:

    mxc_iomux_set_gpr_register(1, 19, 1, 1);

 

I tweaked drivers/media/video/mxc/capture/mxc_v4l2_capture.c to be able to set BT.1120 clock mode:

       csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR1120_PROGRESSIVE_SDR;
       csi_param.pixclk_pol = 0;
       csi_param.data_width = IPU_CSI_DATA_WIDTH_8;
       csi_param.mclk = 74250000;
       csi_param.Hsync_pol = 0;
       csi_param.Vsync_pol = 0;
       csi_param.ext_vsync = 0;

 

I end up with those register set (by drivers/mxc/ipu3/ipu_capture.c):

CSI_SENS_CONF = 0x82000950

CSI_SENS_FRM_SIZE = 0x0437077F

CSI_ACT_FRM_SIZE = 0x0437077F

CSI_OUT_FRM_CTRL = 0x0

 

 

 

exec this commond on console,  ./mxc_v4l2_capture.out  -iw 1920 -ih 1080 -ow 1280 -oh 800 -f YUYV -fr 25

in_width = 1920, in_height = 1080
out_width = 1280, out_height = 800
top = 0, left = 0

 

ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
VIDIOC_DQBUF failed.
ERROR: v4l2 capture: VIDIOC_QBUF: buffer already queued
VIDIOC_QBUF failed

 

 

What am I missing ?  Any help will appreciated

Outcomes