i.MX8M Mini MIPI CSI RGB888

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX8M Mini MIPI CSI RGB888

3,665件の閲覧回数
bwa1
Contributor I

Hi guys,

I'm just working on a project, that requires support for RGB888 video data over the i.MX8's CSI interface.

Unfortunately the current drivers don't support RGB888 data, so I tried to add support to the kernel.

What I did:
1. Modified mx6s_capture.c to add support for  RGB888

, {
        .name       = "RGB24 (RGB24)",
        .fourcc     = V4L2_PIX_FMT_RGB24,
        .pixelformat    = V4L2_PIX_FMT_RGB24,
        .mbus_code  = MEDIA_BUS_FMT_RBG888_1X24,
        .bpp        = 3,
    }

...

    case V4L2_PIX_FMT_YUV32:
    case V4L2_PIX_FMT_SBGGR8:
    case V4L2_PIX_FMT_RGB24:
        width = pix->width;
        break;

...

        case V4L2_PIX_FMT_RGB24:
            cr18 |= BIT_MIPI_DATA_FORMAT_RGB888;
            break;

2.Modified mxc_mipi_csi.c to add format support

, {
        .code = MEDIA_BUS_FMT_RBG888_1X24,
        .fmt_reg = MIPI_CSIS_ISPCFG_FMT_RGB24,
        .data_alignment = 32,
    }

 

With the 24bit RGB888 format, the MIPI CSI controller should switch to 32-bit mode, using a 32bit databus instead of a 16bit bus between MIPI CSI and the CSI bridge. 

Unfortunately this doesn't seem work and I fail to get all the bytes correctly.
Either I get complete bs or in some constellations the green channel is correct, while blue and red are messed up.

Here is a quick example:

Transmitted:    55CCF0 AA330F 55CCF0 AA330F ...
Received:        EA3343 EA3343  EA3343 EA3343 ...

Has anybody used the RGB888 24-bit mode of the CPU or any compatible CPU?

ラベル(1)
0 件の賞賛
返信
11 返答(返信)

3,371件の閲覧回数
santhosh2
Contributor IV

I am also using a custom camera RGB888, I am also facing an issue, i am getting the skip frame 0 message from mx6s_csi_irq_handler section. I am being trying to fix from past one month. let me know how did you solve

0 件の賞賛
返信

2,834件の閲覧回数
mallibeerala
Contributor III

Hi,

I am also getting same Issue, Did you overcome this problem, If yes, Please help us to resolve this Issue.

Currently I am getting below image.

mallibeerala_0-1640084885742.png

Thanks & Regards,
Mallikarjuna B.

0 件の賞賛
返信

3,374件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

for rgb888, try to enable PARALLEL24_EN in the CSICR18 and set TWO_8BIT_SENSOR to 0 in the CSICR3

0 件の賞賛
返信

3,374件の閲覧回数
bwa1
Contributor I

Dear Joan,

I already tried to enable PARALLEL24_EN without any luck.
The TWO_8BIT_SENSOR option was/is disabled by default.

Have you done RGB888 already, could you share your driver modifications?

Kind regards

Berni

0 件の賞賛
返信

3,374件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

what camera do you use? ov5640? I confirmed that ov5640 couldn't set rgb888

0 件の賞賛
返信

3,374件の閲覧回数
bwa1
Contributor I

Dear Joan,

we use a custom camera with custom MIPI IP, so not the OV5640. 

Kind regards

Berni

0 件の賞賛
返信

3,374件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

suggest that you can use unit test to test it first, unit test can support rgb888 capture, and could you set your camera to 16bits first to check if you can get the correct data, then test 24bits, for unit test, you can use "mx6s_v4l2_capture.out" under /unit_tests/V4L2

0 件の賞賛
返信

3,373件の閲覧回数
bwa1
Contributor I

The camera works just fine with 16bits. Only 24bits seem to be a problem. 
To what unit test are you referring to and what /unit_tests/V4L2 folder?

0 件の賞賛
返信

3,373件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

when your boar boot up, you should find "V4L2" folder under /unit_tests

0 件の賞賛
返信

3,373件の閲覧回数
bwa1
Contributor I

Ok I see, you are referring to an image generated by the BSP then.
I'll try to install your reference image and try the unit test. 

Where do I find documentation for the mx6s_v4l2_capture.out? What does it do?

0 件の賞賛
返信

3,374件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

you don't need any document for this, if you don't know how to use mx6s_v4l2_capture.out, you can use the command "mx6s_v4l2_capture.out -help" to get more parameters for this

0 件の賞賛
返信