AnsweredAssumed Answered

IMX6Q support two LCD's

Question asked by Sebastian Panceac on Sep 11, 2015
Latest reply on Dec 3, 2015 by Sebastian Panceac

Hi everyone,

 

I'm trying to make the IMX6Q display data on two LCD displays but only one works.

I'm using 3.10.62 kernel.

The display that works is connected to IPU2 (ipu1 in device tree) and the one that doesn't work is connected to IPU1 (ipu0 in device tree).

The device tree looks like this:

aliases {
mxcfb0 = &lcd_display;
lcd_display = &lcd_display;
mxcfb1 = &lcd_display1;
lcd_display1 = &lcd_display1;
};

 

lcd_display: fb@0 {
compatible = "fsl,mxc_sdc_fb";
disp_dev = "lcd";
interface_pix_fmt = "RGB666";
mode_str = "800x480@60";
default_bpp = <32>;
int_clk = <0>;
late_init = <0>;
status = "okay";
};

 

lcd_display1: fb@1 {
compatible = "fsl,mxc_sdc_fb";
disp_dev = "lcd";
interface_pix_fmt = "RGB666";
mode_str = "800x480@60";
default_bpp = <32>;
int_clk = <0>;
late_init = <1>;
status = "okay";
};

 

lcd: lcd@0 {
compatible = "fsl,lcd";
ipu_id = <1>;
disp_id = <0>;
default_ifmt = "RGB24";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ipu2_1 &pinctrl_lcd0_1>;
status = "okay";
};

 

lcd1: lcd@1{
compatible = "fsl,lcd";
ipu_id = <0>;
disp_id = <0>;
default_ifmt = "RGB24";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ipu1_4>;
status = "okay";

};

 

The problem that I'm facing is that when mxcfb registers, it says that ipu1-di0 is already taken.

[    1.849931] mxc_sdc_fb fb.14: di_pixfmt:0x33424752, bpp:0x20, di:0, ipu:1

 

[    1.971470] mxc_sdc_fb fb.15: di_pixfmt:0x36424752, bpp:0x20, di:0, ipu:1

[    1.971484] mxc_sdc_fb fb.15: ipu1-di0 already in use

[    1.971514] mxc_sdc_fb: probe of fb.15 failed with error -16

 

I traced the problem to the lcdif_init() function in mxc_lcdif.c file.

This function is called 2 times at fb driver probe, each time for each fb that I'm adding.

Here, the ipu_ids that are retrieved should be 1 first time, and 0 second time, but for both times the value 1 is retrieved.

The function calls that lead to this are the following: mxcfb_dispdrv_init() -> mxc_dispdrv_gethandle() ->  lcdif_init() -> mxc_dispdrv_getdata().

 

Is this a kernel bug or am I doing something wrong?

Thank you!

Outcomes