How to change parameters for LCD display

Hi,

I am making changes to use a 24 bits LCD display (800x480) on a Colibri iMX6 with console-trdx-image.
My dts file is based on imx6dl-colibri-eval-v3.dts.
I added

&lcd {
	status = "okay";
	default_ifmt = "RGB24";
};

&mxcfb1 {
	status = "okay";
	interface_pix_fmt = "RGB24";
	mode_str ="800x480M@60";
	default_bpp = <32>;
};

&pinctrl_ipu1_lcd {
	fsl,pins = <
		MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0xa1
		MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15       0xa1
		MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02        0xa1
		MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03        0xa1
		MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00   0xa1
		MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01   0xa1
		MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02   0xa1
		MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03   0xa1
		MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04   0xa1
		MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05   0xa1
		MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06   0xa1
		MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07   0xa1
		MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08   0xa1
		MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09   0xa1
		MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10  0xa1
		MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11  0xa1
		MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12  0xa1
		MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13  0xa1
		MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14  0xa1
		MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15  0xa1
		MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16  0xa1
		MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17  0xa1
		MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18  0xa1
		MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19  0xa1
		MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20  0xa1
		MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21  0xa1
		MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22  0xa1
		MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23  0xa1
	>;
};

&lcdif {
	display = <&display0>;
	status = "okay";

	display0: display {
		bits-per-pixel = <24>;
		bus-width = <24>;

		display-timings {
			native-mode = <&timing_wvga>;

			/* WVGA Timing, LCD 800x480 7" */
			timing_wvga: 800x480 {
				clock-frequency = <33260000>;
				hactive = <800>;
				vactive = <480>;
				hback-porch = <88>;
				hfront-porch = <40>;
				vback-porch = <32>;
				vfront-porch = <13>;
				hsync-len = <48>;
				vsync-len = <3>;

				de-active = <1>;
				hsync-active = <0>;
				vsync-active = <0>;
				pixelclk-active = <0>;
			};
		};
	};
};

In u-boot I have cleared vidargs as requested at the end of Display Output, Resolution and Timings (Linux) | Toradex Developer Center

When I restart the module, the toradex logo is displayed a short time, and after blank screen when linux kernel is started apparently. The display seem to work only in u-boot.

Linux seem to not known the parameters in the dts file:

colibri-imx6 login: root
Last login: Wed Mar 29 17:31:54 UTC 2017 on ttymxc0
root@colibri-imx6:~# fbset

mode "640x480-60"
        # D: 25.175 MHz, H: 31.469 kHz, V: 59.940 Hz
        geometry 640 480 640 480 16
        timings 39722 48 16 33 10 96 2
        accel false
        rgba 5/11,6/5,5/0,0/0
endmode

If I try to change the resolution, I can see that the display timming from the dts are not taken:

root@colibri-imx6:~# fbset -xres 800 -yres 480
[  677.762157] mxc_sdc_fb fb@1: 800x480 h_sync,r,l: 96,16,48  v_sync,l,u: 2,10,33 pixclock=25174000 Hz
root@colibri-imx6:~# cat /sys/class/graphics/fb0/mode
U:800x480p-49

What is wrong? Why my re definition of lcdif seem to not overload the original definition?
I believe that I need 32bpp frame buffer for Qt but the lcd interface use 24 bits. Does I choosen the right values into lcd and mxcfb1 blocks in the dts file?
Curriously, I don’t find in the dts* files (included into imx6dl-colibri-eval-v3.dts) any display-timings block for your EDT 7". Where it is?
I searched in google a definition for fbmem parameter in u-boot and I found nothing, only many cases of use without explanation. Does somebody have a link for definition?

Regards

Hi

What exact kernel version do you base on?

In u-boot I have cleared vidargs as requested at the end of Display Output, Resolution and Timings (Linux) | Toradex Developer Center

Note that that sentence and the example to specify the timing from the device tree is under the ‘Vybrid based modules’ heading and does not apply to i.MX6.


For i.MX6 I would expect that it is enough to:

Then you should be able to set the timings e.g. like this in the vidargs property:
vidargs=video=mxcfb0:dev=lcd,800x480M@60,if=RGB24,bpp=32 video=mxcfb1:off fbmem=8M

Max

Hi There.

Did you solve your pin mix and timing issues. I am facing the same problem using a Newhaven 7inch display with the imx6.

Would you be able to share your driver and pinmux settings?

Thanks

Kieren

This is a one year old thread and refers to a different display then you are using. Please refer to the developer article Display Output, Resolution and Timings (Linux) and open a new question with complete information: Module and carrier board you are using, Software version and the current state of your configuration/issue you are facing.