zoukankan      html  css  js  c++  java
  • 修改LVDS支持1024*600分辨率

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

          1、修改文件TQIMX6_android-4.2.2ootableootloaderuboot-imxcommoncmd_menu.c文件

          在函数lcd_menu_shell中添加:

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

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

        

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

        1、修改文件TQIMX6_android-4.2.2kernel_imxdriversvideomxcldb.c

          在ldb_modedb[]中添加以下代码

    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,},
        {

      fb_videomode每个参数的意思:

     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 };

        

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

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

    ---------------------------------------------------
    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
    --------------------------------------------------------

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

  • 相关阅读:
    2011年需要关注的9大编程语言 狼人:
    微软在华推广Win7拒绝“黑屏” 狼人:
    ifanr访谈:GuruDigger — Web工程师排排坐 狼人:
    10种破除网页设计师障碍的实用方法 狼人:
    英特尔CEO:微软Windows 7是PC更新的催化剂 狼人:
    Windows 7市场份额突破25% XP持续下滑 狼人:
    Office Web Apps中文版正式上线 狼人:
    机器学习实现线性梯度算实现octave
    管理系统数据库sql server 数据库管理
    缓存代码sencha Touch 缓存问题解析
  • 原文地址:https://www.cnblogs.com/wang-le/p/3773705.html
Copyright © 2011-2022 走看看