To get the best display quality for 24bit LVDS display panel in Android, we should use 32bit framebuffer, make IPUv3 display Engine and LDB output 24bit pixels, since RGB component information is aligned from source to destination.
2 stages to enable display:
Uboot splash screen and Kernel framebuffer
Uboot splash screen:
Change should be done in board file, like board/freescale/mx6q_sabresd/mx6q_sabresd.c:
1. Set video mode in structfb_videomode according to the new 24bit LVDS display panel’s spec(please, refer to the example at the end of this doc).
2. Set up pwm, iomux/display related clock trees in lcd_enable(). Note that these should be aligned with Kernel settings to support smooth UI transition
from Uboot splash screen to Kernel framebuffer.
3. Set the output pixel format of IPUv3 display engine and LDB to IPU_PIX_FMT_RGB24 when calling ipuv3_fb_init().
4. Set pixel clock according to the new 24bit LVDS display panel’s spec when calling ipuv3_fb_init().
5. If dual LDB channels are needed to support tough display video mode(high resolution or high pixel clock frequency), we need to enable both of the two LDB
channels and set LDB to work at split mode. LDB_CTRL register should be set accordingly in lcd_enable().
As we may add ‘video=‘ and ‘ldb=’ options in kernel bootup command line, Kernel code is more flexible to handle different LVDS display panels with various display color depth than Uboot code. For detail description of ‘video=’ and ‘ldb=’ option, please refer to MXC Linux BSP release notes and Android User Guide. Some known points are:
1. Add a video mode in structfb_videomode in drivers/video/mxc/ldb.c according to the new 24bit LVDS display panel’s spec(please, refer to the example at
the end of this doc).
2. Set up pwm backlight/display related iomux in platform code.
3. Set appropriate ‘video=‘ option in kernel bootup command line, for example:
4. Set appropriate ‘ldb=‘ option in kernel bootup command line if dual LDB channels are needed to support tough display video mode, for example:
ldb=spl0 (IPUv3 DI0 is used) or ldb=spl1 (IPUv3 DI1 is used)
5. Set appropriate ‘fbmem=‘ option in kernel bootup command line to reserve enoughmemory for framebuffer. For example, if we use 1280x800 LVDS panel
for fb0 and fb0 is in RGB32 pixel format, then ‘fbmem=12M’ should be used, since the formula is: