imx6sx rgb 18bit colour is not right

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

imx6sx rgb 18bit colour is not right

1,889件の閲覧回数
yong_huang
Contributor I

Hi,

    We develop our board on the imx6sx hardware, software is based on the linux kernel 4.9.11.

    We use rgb 18bits lcd interface. After linux bring up, the lcd can display the picture stable, but the colour is not right.

     To find out the cause, we do the following test. we make the test RGB file which has only one red bit red[7], cat it to /dev/fb0, but the green[0],green[5] also has signal, so the lcd colour looks like yellow.

     Our question is 

1, Why there is green colour with red colours,while we just send the red[5] colour bit?

The following is  our dts set.

&lcdif1
{
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_lcd>;
    display = <&display0>;
    status = "okay";


    display0: lcd-display
    {
         bits-per-pixel = <32>;    //
         bus-width = <18>;
        display-timings
        {
         ......

       };
   };
};

pinctrl_lcd: lcdgrp
{
fsl,pins =
<
MX6SX_PAD_LCD1_DATA00__LCDIF1_DATA_0 0x4001b0b0
MX6SX_PAD_LCD1_DATA01__LCDIF1_DATA_1 0x4001b0b0
MX6SX_PAD_LCD1_DATA02__LCDIF1_DATA_2 0x4001b0b0
MX6SX_PAD_LCD1_DATA03__LCDIF1_DATA_3 0x4001b0b0
MX6SX_PAD_LCD1_DATA04__LCDIF1_DATA_4 0x4001b0b0
MX6SX_PAD_LCD1_DATA05__LCDIF1_DATA_5 0x4001b0b0
MX6SX_PAD_LCD1_DATA06__LCDIF1_DATA_6 0x4001b0b0
MX6SX_PAD_LCD1_DATA07__LCDIF1_DATA_7 0x4001b0b0
MX6SX_PAD_LCD1_DATA08__LCDIF1_DATA_8 0x4001b0b0
MX6SX_PAD_LCD1_DATA09__LCDIF1_DATA_9 0x4001b0b0
MX6SX_PAD_LCD1_DATA10__LCDIF1_DATA_10 0x4001b0b0
MX6SX_PAD_LCD1_DATA11__LCDIF1_DATA_11 0x4001b0b0
MX6SX_PAD_LCD1_DATA12__LCDIF1_DATA_12 0x4001b0b0
MX6SX_PAD_LCD1_DATA13__LCDIF1_DATA_13 0x4001b0b0
MX6SX_PAD_LCD1_DATA14__LCDIF1_DATA_14 0x4001b0b0
MX6SX_PAD_LCD1_DATA15__LCDIF1_DATA_15 0x4001b0b0
MX6SX_PAD_LCD1_DATA16__LCDIF1_DATA_16 0x4001b0b0
MX6SX_PAD_LCD1_DATA17__LCDIF1_DATA_17 0x4001b0b0

MX6SX_PAD_LCD1_CLK__LCDIF1_CLK 0x4001b0b0
MX6SX_PAD_LCD1_ENABLE__LCDIF1_ENABLE 0x4001b0b0
MX6SX_PAD_LCD1_VSYNC__LCDIF1_VSYNC 0x4001b0b0
MX6SX_PAD_LCD1_HSYNC__LCDIF1_HSYNC 0x4001b0b0

>

}

 

2, According to the imx6sx reference manual chapter 37, lcdif can convert the rgb888 to rgb666 internal. 

so r[0..7] g[0..7] b[0..7] in framebuffer evey pixel will conver to r[0..5],g[0..5],b[0..5] ,then occur on the IOMUX lcd_dat[0..5],lcd_dat[6..11],lcd[12..17], is it right?

we print the lcdif register value like below .Can you help to check.

LCDC_CTRL is 0xa0b21                //18bit databus length, 24bit word length
LCDC_CTRL1 is 0x1070300          //byte packing fmt =0x7
LCDC_CTRL2 is 0x600000

The attachment is our RGB test file

We look forward your help to solve this problem

ラベル(3)
0 件の賞賛
返信
6 返答(返信)

1,764件の閲覧回数
yong_huang
Contributor I

It looks like the hardware bug,we will research it

0 件の賞賛
返信

1,764件の閲覧回数
yong_huang
Contributor I

Fixed the board hardware issue.

0 件の賞賛
返信

1,764件の閲覧回数
yong_huang
Contributor I

we use the r1_800*480.rgb file , the RGB bits is [80,00,00 

we cat r1_800*480.rgb > /dev/fb0 ,the hardware pad lcd_dat17, lcd_dat11, lcd_dat6 has value '1' ,so the lcd colour is not right.

0 件の賞賛
返信

1,764件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

what 18bits interface do you mean? do you use rgb666? and try to set bits_per_pixel to 32.

0 件の賞賛
返信

1,764件の閲覧回数
yong_huang
Contributor I

Hi Joan,

     The 18bits is the lcdif hardware interface according to our board design , from pad MX6SX_PAD_LCD1_DATA00__LCDIF1_DATA_0 to pad MX6SX_PAD_LCD1_DATA17__LCDIF1_DATA_17

     We have set the bits_per_pixel =32 in the dts file as mentioned before

     We find that our Qt software app using the rgb888. 

thanks

0 件の賞賛
返信

1,764件の閲覧回数
yong_huang
Contributor I

Hi Joan

    The app color is bgra 888,we modify the lcdif register.Some scene colour is normal ,sometime scene colour is not right ,looks more blue. How to solve it?

0 件の賞賛
返信