Hi,All.
I try to use lvds display on sabre-sd board (i.MX 6Quad), Android 4.2.2_1, but the display is not correct ,both the resolution and color is not right :
the panel is LP101WX1-SLN2 from LG , its specification is:
I folow the below steps to port the display driver:
1. connect the hardware between the panel and board through lvds1
2. modify fb_videomode variable of kernel drivers/video/mxc/ldb.c:
--------------------------------------------------------------------
static struct fb_videomode ldb_modedb[] = {
{
"LDB-WXGA", 60, 1280, 800, 14065,
40, 40,
10, 3,
80, 10,
0,
FB_VMODE_NONINTERLACED,
FB_MODE_IS_DETAILED,},
{
"LDB-XGA", 60, 1280, 800, 14430,
80, 48,
15, 2,
32, 47,
0,
FB_VMODE_NONINTERLACED,
FB_MODE_IS_DETAILED,},
{
"LDB-1080P60", 60, 1920, 1080, 7692,
100, 40,
30, 3,
10, 2,
0,
FB_VMODE_NONINTERLACED,
FB_MODE_IS_DETAILED,},
};
i change the 'LDB-XGA‘ member's parameters refer to my panel:
1)name is LDB-XGA
2)refresh is 60
3)resolution is 1280*800
4)clock is 10^12/(69.3*10^6)=14430
5)left_margin=80, right_margin=48, upper_margin=15 , lower_margin=2
6)hsync_len=32 , vsync_len=47
3. build and run the jb4.2.2_1 system, set bootargs below :
setenv bootargs console=ttymxc0,115200 androidboot.console=ttymxc0 vmalloc=400M init=/init video=mxcfb0:dev=ldb video=mxcfb1:dev=hdmi,1920x1080M@60,bpp=32 video=mxcfb2:off fbmem=10M androidboot.hardware=freescale
After it boots up, the lvds display appears not normal as I said at the start ,but the hdmi display is ok.
I've try several ways to resolve this problem, but none of it work.
1)edit fb_videomode variable of u-boot-imx/board/freescale/mx6q_sabresd.c ,make it the same as ldb.c of kernel:
{
" XGA", 60, 1280, 800, 14430,
80, 48,
15, 2,
32, 47,
0,
FB_VMODE_NONINTERLACED,
FB_MODE_IS_DETAILED,
}
2)change bootargs like: video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666,bpp=16 video=mxcfb1:off video=mxcfb2
...
Finally, I download android 4.0.4 source ,andr patch imx-android-r13.4.1 , and modify fb_videomode variable of ldb.c (the same as I said before), build and run the system, the lvds display's resolution is correct , and the color is better:
So the display on android 4.0.4 is ok, but for android 4.2.2_1 is not ok,both base on the same sabre-sd board and display panel.
Can anyone tell me, how to resolve this problem on android 4.2.2_1, just make correct resolution of lvds display?
Solved! Go to Solution.
Hi,All.
I've find the reason, the color issue is caused by lvds cable, after i change a better lvds cable, the colour becomes normal.
Thanks all.
The resolution problem on android 4.2.2_1 is fixed now, i add 'bpp=32' at bootargs like:
setenv bootargs console=ttymxc0,115200 androidboot.console=ttymxc0 vmalloc=400M init=/init video=mxcfb0:dev=ldb, bpp=32 video=mxcfb1:dev=hdmi,1920x1080M@60,bpp=32 video=mxcfb2:off fbmem=10M androidboot.hardware=freescale
but the color of display is not right, like photos below:
I think it's due to the 'bpp=32', my display panel is 18 bit of 3 pairs of data signals, so when using bpp=32 get correct resolution but wrong color.
if someone konw, please tell me how to do fo resolve this color problem, thanks.
Hi,All.
I've find the reason, the color issue is caused by lvds cable, after i change a better lvds cable, the colour becomes normal.
Thanks all.
Have you try "video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666,bpp=32" ?
Thanks for your reply, the resolution is ok when adding 'bpp=32', but the color still not right as showed in adjacent post.
Please try to increase the fbmem.
The reserved Framebuffer size is configured through boot parameters "fbmem=nM" in U-Boot. The formula to calculate "n" is shown below:
n= width * height * buffer_number * sizeof(format)
Width is the width of the display panel by pixel.
Height is the height of the display panel by pixel.
buffer_number is the number of buffers for Framebuffer0. The default value is 3.
sizeof (format) is the size of each pixel of specific format by bytes. For 16bpp, sizeof (format) is 2 bytes. For 32bpp, the sizeof (32bpp) is 4 bytes.
Hi, jimmy.
According to my panel , fbmen=1280*800*3*4B=12MB, I've try fbmem=12M or 64M, it doesn't seem to work.
Hi,
According to function mxcfb_option_setup, maybe you can try "video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666,bpp=24" ?
I've try bpp=24 or 16, they would cause the resolution and color problem as showed at the start of topic.
Only bpp=32 can get correct resolution, but it's color is not right as showed at my second post.
check the bootargs of the android 4.0.4 vs the android 4.2.2_1 versions for the u-boot. Are they different? Look for when the kernel boots. The bootargs should be in the log at the beginning of the kernel booting.
Also, you can use the "fbset -t" and/or "fbset --move" and use trial and error to get the timing params that will work with your lvds display.
thanks for you reply, the resolution is ok when adding 'bpp=32' to bootargs.