I have multiple screens, LVDS dual-channel, LVDS single-channel, HDMI1980P, what should I say, this private life is really a bit pitiful, but fortunately, it is easy to do
Case 1 LVDS single channel
I believe that those who have read the freescale driver source code know that this block supports several modes. Paste the code below.
mxc_ipuv3_fb.c freescale GPU driver file
Path myandroid/kernel_imx/drivers/video/mxc/ldb.c
/*
* "ldb=spl0/1" -- split mode on DI0/1
* "ldb=dul0/1" -- dual mode on DI0/1
* "ldb=sin0/1" -- single mode on LVDS0/1
* "ldb=sep0/1" -- separate mode begin from LVDS0/1
*
* there are two LVDS channels(LVDS0 and LVDS1) which can transfer video
* datas, there two channels can be used as split/dual/single/separate mode.
*
* split mode means display data from DI0 or DI1 will send to both channels
* LVDS0+LVDS1.
* dual mode means display data from DI0 or DI1 will be duplicated on LVDS0
* and LVDS1, it said, LVDS0 and LVDS1 has the same content.
* single mode means only work for DI0/DI1->LVDS0 or DI0/DI1->LVDS1.
* separate mode means you can make DI0/DI1->LVDS0 and DI0/DI1->LVDS1 work
* at the same time.
*/
Well, after reading the supported modes above and comparing the two single-channel and dual-channel screens in my hand, I am still confused. I found this, but how to adjust the resolution?
The next step is to look at a structure, I believe everyone is familiar with it, it is defined in myandroid/kernel_imx/include/linux/fb.h
struct fb_videomode {
const char *name; /* optional */
u32 refresh; /* optional */
u32 xres;
u32 yres;
u32 pixclock;
u32 left_margin;
u32 right_margin;
u32 upper_margin;
u32 lower_margin;
u32 hsync_len;
u32 vsync_len;
u32 sync;
u32 vmode;
u32 flag;
};
Well, we modify the corresponding screen according to the parameters of the specific screen,
My single-channel screen resolution here is 1024*768 resolution M121GNX2 R1
{
"LDB-1024P768", 60, 1024, 768, 15384,
100, 100,
12, 12,
120, 14,
FB_VMODE_NONINTERLACED,
FB_MODE_IS_DETAILED,
},
双通道的分辨率是1440*900 M190PW01 V8
{
"LDB-WXGA", 60, 1440, 900, 18868,
160, 160,
12, 10,
168, 10,
FB_SYNC_EXT,
FB_VMODE_NONINTERLACED,
0,},
{
"LDB-XGA", 60, 1440, 900, 18501,
220, 40,
21, 7,
60, 10,
FB_SYNC_EXT,
FB_VMODE_NONINTERLACED,
0,},
{
"LDB-1080P60", 60, 1440, 900, 18868,
160, 160,
12, 10,
168, 10,
FB_SYNC_EXT,
FB_VMODE_NONINTERLACED,
0,},
修改完以上的参数,剩下的就是要修改我们uboot启动时候传递的参数了,这个相信大家比我还熟悉,我就不用明说了
单通道显示的参数
U-Boot > setenv bootargs console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,LDB-1024PP768,if=RGB18 ldb=sin0 video=mxcfb1:off video=mxcfb2:off fbmem=10M fb0base=0x27b00000 vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale
双通道显示的参数
U-Boot > setenv bootargs console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24 ldb=spl0 video=mxcfb1:off video=mxcfb2:off fbmem=10M fb0base=0x27b00000 vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale
以上是LVDS的修改,接下来我们说一下HDMI的1080p的调试
其实方法差不多
/* #16: 1920x1080p@60Hz 16:9 */
100 [16] = {
101 NULL, 60, 1920, 1080, 6734, 148, 88, 36, 4, 44, 5,
102 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
103 FB_VMODE_NONINTERLACED | FB_VMODE_ASPECT_16_9, 0,
104 },
U-Boot > setenv bootargs console=ttymxc0,115200 init=/init rw video=mxcfb0:dev=hdmi,1920x1080@60,bpp=25 video=mxcfb1:off video=mxcfb2:off fbmem=10M,28M vmalloc=512M androidboot.console=ttymxc0 androidboot.hardware=freescale
U-Boot > setenv bootargs console=ttymxc0,115200 init=/init rw video=mxcfb0:dev=hdmi,1920x1080@60,if=RGB32,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=40M,68M vmalloc=512M androidboot.console=ttymxc0 androidboot.hardware=freescale
http://blog.csdn.net/xxu0123456789/article/details/45268309