I am currently working on upgrading my Yocto distribution for IMX6ULL target from sumo to dunfell, and have run into a peculiar problem I am unable to solve. In short, the problem is that red comes out as blue, and vice-versa, on my LCD touch display. The problem persists in both u-boot-imx (fixed splash image) and linux. It seems that fb, xorg or a driver is configured to utilize BGR24 instead of RGB24. I did not have this problem at all on sumo. My new kernel configuration is more or less the same as before. The device tree is the same.
The fbset command provides the following information. The "rgba" setting clearly says BGR24. I am unable to change the rgba setting using the fbset command. Nothing happens. I have also tried to do the same from code, using ioctl: "ioctl(fbfd, FBIOPUT_VSCREENINFO, &vinfo)", and setting vinfo.red.offset = 0 and vinfo.blue.offset = 16. It seems to me that this information is read-only.
mode "480x272-60"
# 9.200 MHz, H: 17.359 kHz, V: 60.273 Hz
geometry 480 272 480 272 32
timings 108695 4 5 2 4 41 10
accel false
rgba 8/16,8/8,8/0,0/0
endmode
Here is my lcd device tree configuration:
&lcdif {
pinctrl-names = "default";
compatible = "fsl,imx28-lcdif";
pinctrl-0 = <&pinctrl_lcdif_dat
&pinctrl_lcdif_ctrl>;
lcd-supply = <®_all_3v3>;
interface_pix_fmt = "RGB24";
display = <&display0>;
status = "okay";
display0: display0 {
bits-per-pixel = <32>;
bus-width = <24>;
display-timings {
native-mode = <&timing0>;
timing0: timing0 {
clock-frequency = <9200000>;
hactive = <480>;
vactive = <272>;
hfront-porch = <5>;
hback-porch = <4>;
hsync-len = <41>;
vback-porch = <2>;
vfront-porch = <4>;
vsync-len = <10>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <0>;
};
};
};
};
Do you have any idea how I can change this setting? I'd be happy to provide more information if necessary.