所谓图形加速,一般都是指加速渲染,比如可以把2D渲染归类为一系列“原语”:画线,画长方形等等。如果是软件自己画,即不加速,则由软件一个像素一个像素的按照图形算法将线和长方形在“显存”(framebuffer, rendertarget,随便你怎么称呼)上“填”出来;即是由CPU在显存上画出来的。如果加速呢?那么CPU要做的事就很少了,它只需要通过某种方式告诉“加速硬件”,就是通常意义上的“GPU(图形芯片)”,或者嵌入式的DSP等,你希望画什么就行了,比如emit_prim_command(quad), emit_prim_command(line),具体在显存上将像素“填”出来的工作就是由GPU来完成的。自然CPU的负担少了很多。
还有一种就是upload to screen的操作,这个也可以看作一种原语(抽象),即“BitBlt”,这种操作一般来说就是启用DMA操作就行了。
eclipse开发工具开发QT应用程序
http://www.armbbs.net/forum.php?mod=viewthread&tid=10437
http://dl.dbank.com/c0k6fw5n8b
pDeviceInfo->RGBOutMode = DISP_16BIT_RGB565_P;
pDeviceInfo->uiWidth = 800;
pDeviceInfo->uiHeight = 480;
pDeviceInfo->VBPD_Value = 29;
pDeviceInfo->VFPD_Value = 13;
pDeviceInfo->VSPW_Value = 3;
pDeviceInfo->HBPD_Value = 40;
pDeviceInfo->HFPD_Value = 40;
pDeviceInfo->HSPW_Value = 48;
pDeviceInfo->VCLK_Polarity = IVCLK_FALL_EDGE;
pDeviceInfo->HSYNC_Polarity = IHSYNC_LOW_ACTIVE;
pDeviceInfo->VSYNC_Polarity = IVSYNC_LOW_ACTIVE;
pDeviceInfo->VDEN_Polarity = IVDEN_HIGH_ACTIVE;
pDeviceInfo->PNR_Mode = PNRMODE_RGB_P;
pDeviceInfo->VCLK_Source = CLKSEL_F_LCDCLK;
pDeviceInfo->VCLK_Direction = CLKDIR_DIVIDED;
pDeviceInfo->Frame_Rate = 60;
break
;
pDeviceInfo->RGBOutMode = DISP_16BIT_RGB565_P;
pDeviceInfo->uiWidth = 800;
pDeviceInfo->uiHeight = 600;
pDeviceInfo->VBPD_Value = 25;
pDeviceInfo->VFPD_Value = 12;
pDeviceInfo->VSPW_Value = 4;
pDeviceInfo->HBPD_Value = 47;
pDeviceInfo->HFPD_Value = 15;
pDeviceInfo->HSPW_Value = 95;
pDeviceInfo->VCLK_Polarity = IVCLK_FALL_EDGE;
pDeviceInfo->HSYNC_Polarity = IHSYNC_LOW_ACTIVE;
pDeviceInfo->VSYNC_Polarity = IVSYNC_LOW_ACTIVE;
pDeviceInfo->VDEN_Polarity = IVDEN_HIGH_ACTIVE;
pDeviceInfo->PNR_Mode = PNRMODE_RGB_P;
pDeviceInfo->VCLK_Source = CLKSEL_F_HCLK;//CLKSEL_F_LCDCLK;
pDeviceInfo->VCLK_Direction = CLKDIR_DIVIDED;
pDeviceInfo->Frame_Rate = 60;
break;
pDeviceInfo->RGBOutMode = DISP_16BIT_RGB565_P;
pDeviceInfo->uiWidth = 480;
pDeviceInfo->uiHeight = 800;
pDeviceInfo->VBPD_Value = 3;
pDeviceInfo->VFPD_Value = 3;
pDeviceInfo->VSPW_Value = 3;
pDeviceInfo->HBPD_Value = 6;
pDeviceInfo->HFPD_Value = 6;
pDeviceInfo->HSPW_Value = 15;
pDeviceInfo->VCLK_Polarity = IVCLK_FALL_EDGE;
pDeviceInfo->HSYNC_Polarity = IHSYNC_LOW_ACTIVE;
pDeviceInfo->VSYNC_Polarity = IVSYNC_LOW_ACTIVE;
pDeviceInfo->VDEN_Polarity = IVDEN_HIGH_ACTIVE;
pDeviceInfo->PNR_Mode = PNRMODE_RGB_P;
pDeviceInfo->VCLK_Source = CLKSEL_F_LCDCLK;
pDeviceInfo->VCLK_Direction = CLKDIR_DIVIDED;
pDeviceInfo->Frame_Rate = 60;
1,对于水平波纹,这个很可能是LCD背板输出电压不稳定造成的,可以用示波器查看下;
2,如果时序不对,同步信号的极性,那么在EBOOT阶段就会出现花屏等现象,WINCE5.0中,LCD时序是在Kernel\0al/init.c和EBOOT中的MAIN.C中两部分都有的;而在WINCE6.0中,结构不同了~但思想还是一致的;
使用S3C2416 ARM 系统平台,使用WINCE6.0操作系统,LCD屏是奇美的LQ035NC111或科万宏的KWH035ST12-F01,其时序入下图。根据S3C2416芯片资料,自己编写的FrameRate计算器软件计算FrameRate,如下图:
得到FrameRate=61
一、修改的程序文件
1. D:\WINCE600\PLATFORM\SMDK2416\Src\Drivers\Display\s3c2416_ldi_lib\s3c2416_ldi.c
2. D:\WINCE600\PLATFORM\SMDK2416\Src\Inc\bsp_cfg.h
二、修改内容
1. D:\WINCE600\PLATFORM\SMDK2416\Src\Drivers\Display\s3c2416_ldi_lib\s3c2416_ldi.c
switch(g_ModuleType)
{
// Tianma 3.5"
case LDI_UT35A_RGB:
//SureLion
pDeviceInfo->RGBOutMode = DISP_24BIT_RGB888_P ;
pDeviceInfo->uiWidth = 320;
pDeviceInfo->uiHeight = 240;
pDeviceInfo->VBPD_Value = 15;
pDeviceInfo->VFPD_Value = 4;
pDeviceInfo->VSPW_Value = 3;
pDeviceInfo->HBPD_Value = 38;
pDeviceInfo->HFPD_Value = 20;
pDeviceInfo->HSPW_Value = 30;
pDeviceInfo->VCLK_Polarity = IVCLK_RISE_EDGE;
pDeviceInfo->HSYNC_Polarity = IHSYNC_LOW_ACTIVE;
pDeviceInfo->VSYNC_Polarity = IVSYNC_LOW_ACTIVE;
pDeviceInfo->VDEN_Polarity = IVDEN_LOW_ACTIVE;
pDeviceInfo->PNR_Mode = PNRMODE_RGB_P;
pDeviceInfo->VCLK_Source = CLKSEL_F_HCLK;
pDeviceInfo->VCLK_Direction = CLKDIR_DIVIDED;
pDeviceInfo->Frame_Rate = 61;
RETAILMSG(1,(TEXT("[LDI:INF] Output Devce Type [LDI_UT35A_RGB] =[%d] x [%d]\n\r"),pDeviceInfo->uiWidth,pDeviceInfo->uiHeight));
break;
2. D:\WINCE600\PLATFORM\SMDK2416\Src\Inc\bsp_cfg.h
#define LCD_MODULE_TYPE (LCD_MODULE_UT35A) // Tianma 3.5" 320x240
//#define LCD_MODULE_TYPE (LCD_MODULE_UT43A) // Qunchuang 4.3" 480x272
//#define LCD_MODULE_TYPE (LCD_MODULE_UT50A) // Dianbang 5 " 800x480
//#define LCD_MODULE_TYPE (LCD_MODULE_UT70A) // Qunchuang 7" 800x480
//#define LCD_MODULE_TYPE (LCD_MODULE_UT102A) // Qunchuang 10.2" 800x480
//#define LCD_MODULE_TYPE (LCD_MODULE_UT104A) // AUO 10.4" 800x600
//#define LCD_MODULE_TYPE (LCD_MODULE_UTVGA6448) // VGA 640x480
//#define LCD_MODULE_TYPE (LCD_MODULE_UTVGA8060) //VGA 800x600
三、编译下载
VISUAL STUDIO 2005 菜单"Build"->"Advanced Build Commands"->"Clean Sysgen"或”Build and Sysgen"编译,最好用DNW软件按步骤下载OK。