修改LVDS支持1024*600分辨率

时间:2024-01-16 10:12:56
  • 一、在boot中增加LVDS设置分辨率1024*600选项

   1、修改文件TQIMX6_android-4.2.2\bootable\bootloader\uboot-imx\common\cmd_menu.c文件

      在函数lcd_menu_shell中添加:


 case '':
do
{
printf("\r\n##### display select LVDS #####\r\n");
printf("[1] 800*600 for LVDS->VGA\r\n");
printf("[2] 1024*600 for LVDS->VGA\r\n");
printf("[3] 1024*768 for LVDS->VGA \r\n");
printf("[4] 1280*800 for LVDS->VGA \r\n");
printf("[5] 1366*768 for LVDS \r\n");
printf("[6] 1920*1080 for LVDS (2 lvds is needed,LVDS only) \r\n");
printf("[q] quit \r\n");
printf("Enter your selection: ");
c = getc();
printf("%c\n", c);
if (c == '') ………………………
} else if (c == '')
{
sprintf(cmd_buf, "dev=ldb,LDB-LVDS,if=RGB666,bpp=32 ldb=dul0");
break;
}

    2、修改后烧入板子后效果:  

    修改LVDS支持1024*600分辨率

  • 二、修改内核驱动支持1024*600

    1、修改文件TQIMX6_android-4.2.2\kernel_imx\drivers\video\mxc\ldb.c

      在ldb_modedb[]中添加以下代码

static struct fb_videomode ldb_modedb[] = {
{
"LDB-LVDS", , , , ,
, ,
, ,
, ,
,
FB_VMODE_NONINTERLACED,http://i.cnblogs.com/EditPosts.aspx?postid=3773705
FB_MODE_IS_DETAILED,},
{

  fb_videomode每个参数的意思:

 struct fb_videomode {
const char *name; //name
u32 refresh; //Frequency
u32 xres;      
u32 yres;      
u32 pixclock;    //时钟频率
u32 left_margin;  //HBPD( Horizontal sync Back porch (pixels))
u32 right_margin;  //HFPD(Horizontal sync Front porch (pixels))
u32 upper_margin;   //VBPD(Vertical sync Back porch (pixels))
u32 lower_margin;  //VFPD( vertical sync Front porch (pixels))
u32 hsync_len;    //HSPW(Horizontal sync pulse width (pixels))
u32 vsync_len;    //VSPW(Vertical Sync pulse width (pixels))
u32 sync;
u32 vmode;
u32 flag;
};

    修改LVDS支持1024*600分辨率

  这个参数在屏幕的规格书里都有

修改LVDS支持1024*600分辨率

    或者可以参考下面的设置:

---------------------------------------------------
720x480p:
Generic timing details for 720x480:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=60Hz
----------------------------------------------------
Widescreen :
848x480p Generic timing details for 848x480:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=60Hz
----------------------------------------------------
Widescreen :
856x480p Generic timing details for 856x480:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=60Hz
----------------------------------------------------
Screen :
1080x480p Generic timing details for 1080x480:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=60Hz
----------------------------------------------------
Screen :
1440x480p Generic timing details for 1440x480:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=60Hz
-----------------------------------------------------
Screen :
1800x480p Generic timing details for 1800x480:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=60Hz
-----------------------------------------------------
Screen :
1800x540p Generic timing details for 1800x540:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=60Hz
-----------------------------------------------------
Screen :
1920x540p Generic timing details for 1920x540:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=60Hz
-----------------------------------------------------
Screen :
960x540p Generic timing details for 960x540:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=60Hz
--------------------------------------------------------------------------------------
Powerstrip dongle 540P/1080i custom timings:
------------------------------------------------------------------------
Screen :
640x480p HDTV Generic timing details for 640x480:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=60Hz
-------------------------------------------------------------------
Screen :
720x480p HDTV Generic timing details for 720x480:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=60Hz
-------------------------------------------------------------------
Screen :
856x480p HDTV Generic timing details for 856x480:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=60Hz
--------------------------------------------------------------------
Screen :
1776x1000i HDTV Generic timing details for 1776x1000:
HFP= HSW= HBP= kHz= VFP= VSW= VBP= Hz=
interlace
--------------------------------------------------------------------
Screen :
1920x1080i HDTV Generic timing details for 1920x1080:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=30Hz
interlace
------------------------------------------------------------------------------------
Screen :
800x600i Generic timing details for 800x600:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF =30Hz
interlace
-------------------------------------------------------
Screen :
1024x768i Generic timing details for 1024x768:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=30Hz
interlace
--------------------------------------------------------
Screen :
1152x864i Generic timing details for 1152x864:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=30Hz
interlace
-----------------------------------------------------------
Screen :
1280x720i Generic timing details for 1280x720:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=30Hz
interlace
-----------------------------------------------------------
Screen :
1280x768i Generic timing details for 1280x768:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=30Hz
interlace
--------------------------------------------------------------
Screen :
1280x960i Generic timing details for 1280x960:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=30Hz
interlace
----------------------------------------------------------------
Screen :
1280x1024i Generic timing details for 1280x1024:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=30Hz
interlace
----------------------------------------------------------------
Screen :
1440x960i Generic timing details for 1440x960:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=30Hz
interlace
------------------------------------------------------------------
Screen :
1600x900i Generic timing details for 1600x900:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=30Hz
interlace
-----------------------------------------------------------------
Screen :
1776x1000i Generic timing details for 1776x1000:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=30Hz
interlace
------------------------------------------------------------------
Screen :
1920x1080i Generic timing details for 1920x1080:
HFP= HSW= HBP= HF=34KHz VFP= VSW= VBP= VF=30Hz
interlace
***************************************
480p timings
***************************************
Screen :
640x480p Generic timing details for 640x480:
HFP= HSW= HBP= HF=32KHz VFP= VSW= VBP= VF=60Hz
-------------------------------------------------------
Screen :
720x480p Generic timing details for 720x480:
HFP= HSW= HBP= HF=32KHz VFP= VSW= VBP= VF=60Hz
--------------------------------------------------------
Screen :
1440x480p Generic timing details for 1440x480:
HFP= HSW= HBP= HF=32KHz VFP= VSW= VBP= VF=60Hz
--------------------------------------------------------

重新编译内核烧入板子中,就可以正常显示;