码迷,mamicode.com
首页 > 其他好文 > 详细

修改LVDS支持1024*600分辨率

时间:2014-06-11 07:29:52      阅读:1203      评论:0      收藏:0      [点我收藏+]

标签:des   android   style   class   blog   code   

  • 一、在boot中增加LVDS设置分辨率1024*600选项

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

      在函数lcd_menu_shell中添加:

bubuko.com,布布扣

 1 case 2:
 2         do
 3         {
 4             printf("\r\n##### display select LVDS #####\r\n");
 5             printf("[1] 800*600 for LVDS->VGA\r\n");
 6             printf("[2] 1024*600 for LVDS->VGA\r\n");
 7             printf("[3] 1024*768 for LVDS->VGA \r\n");
 8             printf("[4] 1280*800 for LVDS->VGA \r\n");
 9             printf("[5] 1366*768 for LVDS \r\n");
10             printf("[6] 1920*1080 for LVDS (2 lvds is needed,LVDS only) \r\n");
11             printf("[q] quit \r\n");
12             printf("Enter your selection: ");
13             c = getc();
14             printf("%c\n", c);
15             if (c == 1)11     ………………………
12     }

1     else if (c == 2)
2             {
3                 sprintf(cmd_buf, "dev=ldb,LDB-LVDS,if=RGB666,bpp=32 ldb=dul0");
4                 break;
5             }

 

bubuko.com,布布扣

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

    bubuko.com,布布扣

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

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

      在ldb_modedb[]中添加以下代码

bubuko.com,布布扣
static struct fb_videomode ldb_modedb[] = {
    {
     "LDB-LVDS", 60, 1024, 600, 19531,
     140, 160,
     20, 12,
     20, 12,
     0,
     FB_VMODE_NONINTERLACED,http://i.cnblogs.com/EditPosts.aspx?postid=3773705
     FB_MODE_IS_DETAILED,},
    {
bubuko.com,布布扣

  fb_videomode每个参数的意思:

bubuko.com,布布扣
 1 struct fb_videomode {
 2     const char *name;    //name
 3     u32 refresh;        //Frequency
 4     u32 xres;      
 5     u32 yres;      
 6     u32 pixclock;    //时钟频率
 7     u32 left_margin;  //HBPD( Horizontal sync Back porch (pixels))
 8     u32 right_margin;  //HFPD(Horizontal sync Front porch (pixels))
 9     u32 upper_margin;   //VBPD(Vertical sync Back porch (pixels))
10     u32 lower_margin;  //VFPD( vertical sync Front porch (pixels))
11     u32 hsync_len;    //HSPW(Horizontal sync pulse width (pixels))
12     u32 vsync_len;    //VSPW(Vertical Sync pulse width (pixels))
13     u32 sync;
14     u32 vmode;
15     u32 flag;
16 };
bubuko.com,布布扣

    bubuko.com,布布扣

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

bubuko.com,布布扣

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

bubuko.com,布布扣
---------------------------------------------------
720x480p:
Generic timing details for 720x480:
HFP=76 HSW=40 HBP=100 HF=34KHz VFP=29 VSW=1 VBP=53 VF=60Hz
----------------------------------------------------
Widescreen 16:9
848x480p

Generic timing details for 848x480:
HFP=88 HSW=48 HBP=120 HF=34KHz VFP=28 VSW=1 VBP=54 VF=60Hz
----------------------------------------------------
Widescreen 16:9
856x480p

Generic timing details for 856x480:
HFP=87 HSW=48 HBP=121 HF=34KHz VFP=28 VSW=1 VBP=54 VF=60Hz
----------------------------------------------------
Screen 4:3
1080x480p

Generic timing details for 1080x480:
HFP=108 HSW=48 HBP=164 HF=34KHz VFP=29 VSW=1 VBP=53 VF=60Hz
----------------------------------------------------
Screen 4:3
1440x480p

Generic timing details for 1440x480:
HFP=144 HSW=80 HBP=208 HF=34KHz VFP=29 VSW=1 VBP=53 VF=60Hz
-----------------------------------------------------
Screen 4:3
1800x480p

Generic timing details for 1800x480:
HFP=154 HSW=96 HBP=246 HF=34KHz VFP=32 VSW=1 VBP=50 VF=60Hz
-----------------------------------------------------
Screen 4:3
1800x540p

Generic timing details for 1800x540:
HFP=148 HSW=96 HBP=244 HF=34KHz VFP=7 VSW=1 VBP=15 VF=60Hz
-----------------------------------------------------
Screen 4:3
1920x540p

Generic timing details for 1920x540:
HFP=161 HSW=104 HBP=255 HF=34KHz VFP=7 VSW=1 VBP=15 VF=60Hz
-----------------------------------------------------
Screen 4:3
960x540p

Generic timing details for 960x540:
HFP=98 HSW=48 HBP=142 HF=34KHz VFP=7 VSW=1 VBP=15 VF=60Hz
--------------------------------------------------------------------------------------
Powerstrip dongle 540P/1080i custom timings:
------------------------------------------------------------------------
Screen 4:3
640x480p HDTV

Generic timing details for 640x480:
HFP=143 HSW=48 HBP=169 HF=34KHz VFP=28 VSW=1 VBP=54 VF=60Hz
-------------------------------------------------------------------
Screen 4:3
720x480p HDTV

Generic timing details for 720x480:
HFP=72 HSW=48 HBP=88 HF=34KHz VFP=29 VSW=1 VBP=53 VF=60Hz
-------------------------------------------------------------------
Screen 4:3
856x480p HDTV

Generic timing details for 856x480:
HFP=88 HSW=48 HBP=120 HF=34KHz VFP=28 VSW=1 VBP=54 VF=60Hz
--------------------------------------------------------------------
Screen 4:3
1776x1000i HDTV

Generic timing details for 1776x1000:
HFP=136 HSW=48 HBP=240 kHz=34 VFP=42 VSW=5 VBP=78 Hz=30
interlace
--------------------------------------------------------------------
Screen 16:9
1920x1080i HDTV

Generic timing details for 1920x1080:
HFP=169 HSW=64 HBP=295 HF=34KHz VFP=20 VSW=5 VBP=20 VF=30Hz
interlace
------------------------------------------------------------------------------------
Screen 4:3
800x600i

Generic timing details for 800x600:
HFP=279 HSW=56 HBP=329 HF=34KHz VFP=250 VSW=1 VBP=274 VF =30Hz
interlace
-------------------------------------------------------
Screen 4:3
1024x768i

Generic timing details for 1024x768:
HFP=164 HSW=56 HBP=220 HF=34KHz VFP=160 VSW=1 VBP=196 VF=30Hz
interlace
--------------------------------------------------------
Screen 4:3
1152x864i

Generic timing details for 1152x864:
HFP=190 HSW=112 HBP=218 HF=34KHz VFP=112 VSW=1 VBP=148 VF=30Hz
interlace
-----------------------------------------------------------
Screen 4:3
1280x720i

Generic timing details for 1280x720:
HFP=125 HSW=120 HBP=139 HF=34KHz VFP=180 VSW=1 VBP=224 VF=30Hz
interlace
-----------------------------------------------------------
Screen 4:3
1280x768i

Generic timing details for 1280x768:
HFP=138 HSW=96 HBP=166 HF=34KHz VFP=156 VSW=1 VBP=200 VF=30Hz
interlace
--------------------------------------------------------------
Screen 4:3
1280x960i

Generic timing details for 1280x960:
HFP=128 HSW=96 HBP=160 HF=34KHz VFP=44 VSW=1 VBP=120 VF=30Hz
interlace
----------------------------------------------------------------
Screen 4:3
1280x1024i

Generic timing details for 1280x1024:
HFP=127 HSW=96 HBP=161 HF=34KHz VFP=43 VSW=3 VBP=55 VF=30Hz
interlace
----------------------------------------------------------------
Screen 4:3
1440x960i

Generic timing details for 1440x960:
HFP=140 HSW=104 HBP=180 HF=34KHz VFP=60 VSW=1 VBP=104 VF=30Hz
interlace
------------------------------------------------------------------
Screen 4:3
1600x900i

Generic timing details for 1600x900:
HFP=159 HSW=80 HBP=249 HF=34KHz VFP=89 VSW=3 VBP=133 VF=30Hz
interlace
-----------------------------------------------------------------
Screen 4:3
1776x1000i

Generic timing details for 1776x1000:
HFP=166 HSW=88 HBP=274 HF=34KHz VFP=44 VSW=5 VBP=76 VF=30Hz
interlace
------------------------------------------------------------------
Screen 4:3
1920x1080i

Generic timing details for 1920x1080:
HFP=180 HSW=144 HBP=244 HF=34KHz VFP=24 VSW=2 VBP=20 VF=30Hz
interlace
***************************************
480p timings
***************************************
Screen 4:3
640x480p

Generic timing details for 640x480:
HFP=55 HSW=96 HBP=57 HF=32KHz VFP=11 VSW=5 VBP=29 VF=60Hz
-------------------------------------------------------
Screen 4:3
720x480p

Generic timing details for 720x480:
HFP=67 HSW=96 HBP=85 HF=32KHz VFP=21 VSW=5 VBP=19 VF=60Hz
--------------------------------------------------------
Screen 4:3
1440x480p

Generic timing details for 1440x480:
HFP=118 HSW=144 HBP=218 HF=32KHz VFP=13 VSW=5 VBP=27 VF=60Hz
--------------------------------------------------------
bubuko.com,布布扣

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

 

修改LVDS支持1024*600分辨率,布布扣,bubuko.com

修改LVDS支持1024*600分辨率

标签:des   android   style   class   blog   code   

原文地址:http://www.cnblogs.com/wang-le/p/3773705.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!