In i.MX6D linux 3.0.35 we unable to find suitable 10bit RAW black & white GREY scale configuration

cancel
Showing results for 
Search instead for 
Did you mean: 

In i.MX6D linux 3.0.35 we unable to find suitable 10bit RAW black & white GREY scale configuration

1,479 Views
aravinthkumarja
Senior Contributor II

Hi,

i am using MIPI 2 lanes camera on imx6d sabresd platform, the camera supports  only 10bit black & white RAW format. i didn't find the configuration of 10bit black & white raw format in IPU MIPI CSI interface in linux 3.0.35. Can you please suggest which configuration/kernel version will be suitable for this.

Thanks!

Labels (2)
7 Replies

197 Views
erezsteinberg
Contributor IV

Hi

I ran into a similar problem about a year ago. Unfortunately, iMX6 Linux drivers do not support GRAY or BAYER inputs.

For 8-bit grayscale, you would need to make some changes to the drivers (It's not complicated, but do it carefully or it won't work).

For 10-bit grayscale, I was not successful getting it to work. I suspect there are a lot more changes needed to support 10-bit correctly.

Also -- if you plan to access the video image from the ARM CPU, you will discover that performance is very bad. That's because the V4L2 buffers are mapped to user-space as non-cacheable.  (Don't try to use USERPTR for buffers; the driver doesn't work properly with them).

See - V4L2_MEMORY_USERPTR example for iMX6

Oh -- and I strongly recommend moving to a new Linux Kernel version (3.14)

I can only say -- good luck (and patience).

Regards,

Erez

0 Kudos

197 Views
mano_zumi
Contributor I

Hi Erez,

Is 10bit RAW data can be supported in IMX linux kernel  3.14.

Regards,

Manoj

0 Kudos

197 Views
erezsteinberg
Contributor IV

I was not able to get 10-bit RAW to work for me

0 Kudos

197 Views
mano_zumi
Contributor I

Hi Erez,

Whether the iMX6 supports 10 bit raw format.

Regards,

Manoj

0 Kudos

197 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi aravinthkumar

such configuration is described on below links

https://community.freescale.com/docs/DOC-94312                   

https://community.freescale.com/message/344529#344529

https://community.freescale.com/message/331888

https://community.freescale.com/message/309833#309833

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

197 Views
aravinthkumarja
Senior Contributor II

Hi igorpadykov

Thanks for the response. From this document( Debug steps for customer MIPI sensor.docx​ ​) we analysed our MIPI sensor and the details are given below.

IPU_CONF = 0x200007E2

CSI1_DATA_SOURCE 29th bit--- MIPI

DMFC_EN -1

DC_EN - 1

SMFC_EN  -1

DI1_EN -1

DI0_EN -1

DP_EN - 1

Reserved

IRT_EN

IC_EN 

CSI1_EN = 1

CSI0_EN 

CSI_SENS_CONF = 0x04009B00

CSI1_DATA_DEST (26-24bit)  == 100 -- destination is IDMAC via SMFC

CSI1_EXT_VSYNC (15th bit) == External VSYNC mode 1

CSI1_DATA_WIDTH (14-11bit)  == 0011 -- 10 bits per color

CSI1_SENS_DATA_FORMAT (8-10th bit) = 0x011 Bayer or Generic data

CSI_ACT_FRM_SIZE = 0x0437077F

  => height 1080 width 1920

CSI_SENS_FRM_SIZE= 0x0437077F

  => => height 1080 width 1920

MIPI_CSI1 register details:-

CSI2_N_LANES= 1

  => N_LANES -- 01 2 Data Lanes (Lane 0, and 1)

CSI2_PHY_SHUTDOWNZ    = 1

  => PHY_SHUTDOWNZ

CSI2_DPHY_RSTZ    = 1

  => DPHY_RSTZ -- DPHY reset output. Active Low

CSI2_RESETN = 1

  => CSI2_RESETN -- CSI-2 controller reset output. Active Low

CSI2_PHY_STATE = 330

  3=> phy_rxulpsclknot     (Clock Lane module has entered the Ultra Low Power state)

     phy_rxclkactivehs    (clock lane is actively receiving a DDR clock)

  3=> phy_stopstatedata_1  (Data Lane 1 in Stop state) 

     phy_stopstatedata_0  (Data Lane 0 in Stop state)

  0=>

CSI2_PHY_TST_CTRL1  = 1414

  15–8 => phy_testdout

  7-0 => phy_testdin

In this header file(mach/ipu-v3.h)  10 bits per color configuration is not there in CSI1_DATA_WIDTH register. So we configured IPU_CSI_DATA_WIDTH_10  IPU_CSI_DATA_WIDTH_10=3 in enumeration of CSI data bus field.

But still we are facing the issue

ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0

VIDIOC_DQBUF failed.

ERROR: v4l2 capture: VIDIOC_QBUF: buffer already queued

VIDIOC_QBUF failed

0 Kudos

197 Views
chrisroed
Contributor IV

I had a similar issue using a bayer sensor.  We decided to pick a YUV sensor instead, and never fully completed the work (imx6 MIPI CSI with OV5648 camera) )

Are you using external vsync?  We had to make sure the camera was putting out a vsync signal, and the mipi was set up to receive it.  For some reason I ended up having to hardcode this in the kernel because it wasn't getting the information from my driver.

Are you using Gstreamer to capture?  If so, you can add --gst-debug=*:2 or 4  and take a look for a CAPS mismatch.  I don't think that the imxv4l2videosrc is able to accept V4L2_PIX_FMT_GREY. 

0 Kudos