AnsweredAssumed Answered

After enable 16 csi0, video is rolling and color was wrong

Question asked by Jay Huang on Apr 28, 2016
Latest reply on May 10, 2016 by Jay Huang

My environment is:

platform : imx6q

linux kernel: Linux version 3.10.53-88228-g9ebf157-dirty

 

and I wanted to enlarge the csi0 width from 8 to 16 between my sensor and ipu.

 

My sensor supports bt656 8-bit and YCbCr 4:2:2 16-bit. Based on IMX6DQRM, the ipu of imx6q supports bt656 8-bit and 16 bit YUV422 (In 37.4.3.9 16-bit camera support.)

 

Following are my combination:

   sensor             < --- >        imx6

BT656 8-bit                         BT656 8-bit     => fine, please check the attach normal.jpg

YCbCr4:2:2 16-bit               IPU_PIX_FMT_GENERIC_16   => wrong, please check the video.mp4    

 

My modifications (I used v4l2 to link my sensor and imx6q):

In my sensor driver:

* ioctl_g_ifparm:

  Change the V4L2_IF_TYPE_BT656_SPECIFY to V4L2_IF_TYPE_GATE.

  There are detail:

  if_type = V4L2_IF_TYPE_GATE;

  u.gate.csi_data_width = 9; //16-bit

  u.gate.nobt_hs_inv = sensor.HPolarity;

  u.gate.nobt_vs_inv = sensor..CurVTiming.VPolarity;

  u.gate.latch_clk_inv = 0;

  u.gate.swap = 0;

  u.gate.frame_start_on_rising_vs = 0;

  u.gate.v_sync_correct = 1;

  u.gate.clock_curr = sensor.curclk;

  u.gate.clock_min = sensor.minclk;

  u.gate.clock_max = sensor.maxclk;

 

* ioctl_g_fmt_cap:

   Change the V4L2_PIX_FMT_UYVY to IPU_PIX_FMT_GENERIC_16.

   fmt.pix.pixelformat = IPU_PIX_FMT_GENERIC_16;

   fmt.pix.width = sensor.HActive;

   fmt.pix.height = (sensor.ScanMode != 0) ? sensor.VActive * 2 : sensor.VActive;

   fmt.pix.field = V4L2_FIELD_INTERLACED_BT;

   fmt.pix.sizeimage = f->fmt.pix.width * f->fmt.pix.height;

   fmt.pix.colorspace = V4L2_COLORSPACE_JPEG;

 

In imx6:

I didn't do any change.

 

 

Could someone give me a hand??

 

Thanks very much!!

Attachments

Outcomes