Wrong color on LinuxImageV2.6

I’m developing an application based on Qt LinuxImageV2.4 (qt4e-demo-image). After updating to LinuxImageV2.6, the color red is showing as blue and blue as red (only in qt app). Any image / text showing on Linux is fine.

There is a difference between the old fbdev driver and the new DCU driver: The DCU driver uses 24-bit depth and bpp by default whereas the fbdev driver did use 16-bit by default. However, a higher color depth should really not swap colors. I could reproduce the issue here and a closer look showed that there is also a bug in Qt 4.8.7 how 24-bit depth/bpp gets handled.

To track the issue I opened a Qt bug (QTBUG-56740) and created a fix for it. Since there are no more Qt4 releases planned I guess this bugfix won’t make it in a official release…

The same patch is now also part of our demo meta layer, hence when you use the latest version of it the Qt framework should get the fix applied automatically:

You can also get rid of the issue by changing color depth to 16 or 32-bit. But both choices have its downside: With 16-bit you loose color space resolution, and with 32-bit the display controller will consume more bandwidth and your frame buffer will be larger. The easy way to change the default depth is to change the video mode via video= kernel parameter. This also changes the display timings which might be problematic especially when you use a custom panel driver (panel-simple.c)…