I am using the Android 12.0.0 2.0.0 in a custom i.MX8M Mini hardware. The board has 4GB of RAM and a display attached through LCDIF and a TI SN65DSI83 DSI to LVDS bridge.
On the display I can see false colors on some images (e.g. background wallpaper of the launcher or at boot animation).
I have digged down the problem and found out, that it is related to the 2D composition done in IMX graphics composer.
If I disable it via the "vendor.2d.composition" property set to 0 colors are correct.
So I digged a little further and found the following problem.
See source located in vendor/nxp-opensource/imx/display/display/Composer.cpp function "composeLayer".
There the function "blitSurface" get called to apply 2D composition:
If the source surface to this function has pixel format G2D_RGBX8888 the colors are wrong. Red and Blue channel is swapped when shown on the display.
If the source surface to this function has pixel format G2D_BGRA8888 the colors are right.
Destination surface always has pixel format G2D_RGBA8888.
For example bootsplash uses G2D_RGBX8888 pixel format and shows false colors. Rendered system UI screen use G2D_BGRA8888 and show right colors.
As the blitSurface function goes down to "libg2d-viv.so" which is a proprietary and precompiled library I cannot analyse any further now.
What could be the reason for that behaviour?
Might it be some problem on kernel driver level (unsupported pixel format conversation)? The board uses lcdif (driver unchanged) -> sec_mipi_dsim-imx (driver unchanged) -> TI SN65DSI83 DSI2LVDS bridge (this driver is not default in IMX kernel)
Does anyone know about an issue in g2d composition regarding pixel format conversion?
BTW: On our latest Android11 2.6.0 port for the board the colors are displayed correctly.