Imx6dl double channel lvds display wrong colors


I’m working with an imx6dl with Yocto 1.7.3.
It’s the first time i need to use a double lvds channel display and i came across a problem. After creating the image of the system, the colors on the display are not shown correctly (for example a blue bar during psplash is shown pink). The display is AM-19201080F1TZQW-A0. Here are the Interface Timings i used to create the image:

  • Clock frequency = 141.4 MHz
  • Refresh = 60 Hz
  • One line scannig period (Th) = 2142 clocks
  • Horizontal display period (Thd) = 1920 clocks
  • Frame period (Tv) = 1100 lines
  • Vertical display period (Tvd) = 1080 lines

so in the ldb.c file in kernel directory i add the following to the struct fb_videomode:

/* 1920x1080 @ 60 Hz */
60, //refresh
1920,  //xres
1080, //yres
7073, //pixclock
55, //left_margin
55, //right_margin
4, //upper_margin
4, //lower_margin
112, //hsync_len
12,	//vsync_len

then i create a patch in the kernel to apply these changes. I also create a patch for the device tree to add the following changes:

mxcfb1: fb@0 {
compatible = "fsl,mxc_sdc_fb";
disp_dev = "ldb";
interface_pix_fmt = "RGB24";
mode_str ="LDB-XGA"; 
default_bpp = <16>;
int_clk = <0>;
late_init = <0>;
status = "okay";

ldb: ldb@020e0008 {
    ipu_id = <0>;
    disp_id = <0>;
    ext_ref = <1>;
    mode = "spl0";
    sec_ipu_id = <0>;
    sec_disp_id = <1>;
    status = "okay";
    split-mode = <1>;
    compatible = "fsl,imx6q-ldb";
    reg = <0x020e0000 0x4000>;
    clocks = <&clks 135>, <&clks 136>,
        <&clks 39>, <&clks 40>,
        <&clks 41>, <&clks 42>,
        <&clks 184>, <&clks 185>,
        <&clks 205>, <&clks 206>,
        <&clks 207>, <&clks 208>;
    clock-names = "ldb_di0", "ldb_di1",
         "ipu1_di0_sel", "ipu1_di1_sel",
         "ipu2_di0_sel", "ipu2_di1_sel",
         "di0_div_3_5", "di1_div_3_5",
         "di0_div_7", "di1_div_7",
         "di0_div_sel", "di1_div_sel";
        fsl,data-mapping = "jeida";
        fsl,data-width = <24>;
        crtc = "ipu1-di0";
        status = "okay";
        fsl,data-mapping = "jeida";
        fsl,data-width = <24>;
        crtc = "ipu1-di0";
        status = "okay";

And then i change the bootargs parameter in u-boot to set the video as following:

video=mxcfb0:dev=ldb,Full-HD,if=RGB24 ldb=spl0

I already try to change the interface_pix_fmt and the default_bpp in many different ways but i can’t get the correct colors. Anyone could show me where is the mistake?




What exact version of HW and SW are you using?

Note that the kernel which still used ldb as a cmdline parameter really used it as such and not as an addition to the video parameter.

e.g. try:

video=mxcfb0:dev=ldb,Full-HD,if=RGB24 ldb=spl0

Note the space in place of the comma.



As HW I use an imx6 DualLite, as SW Yocto Dizzy 1.7.3 with 3.10.17 kernel version.

The comma is not present in cmdline. It’s been an error while writing the question. I reedit immediatly.



You could try the blue/red/green test pictures from here.
They draw colums of their color with decreasing brightness. Each colum has exactly one bit set.
That might help to find out what bit(s) are wrongly mapped.


P.S. You are using a real old Yocto / Kernel Version

P.P.S. What actual HW are you using. I don’t know of a Toradex product with an i.MX 6DualLite with access to
the CPU’s LVDS signals…