MTK Android Driver :lcm
1.怎样新建一个LCD驱动
LCD模组主要包括LCD显示屏和驱动IC。比如LF040DNYB16a模组的驱动IC型号为NT35510。要在MTK6577平台上新建这个lcd的驱动,步骤如下:
A. 新建文件夹nt35510:
mediatekcustomcommonkernellcm nt35510
mediatekcustomcommonlklcm nt35510 //mediatekcustomcommonubootlcm t35510
B.修改mediatekcustomcommonkernellcm mt65xx_lcm_list.c, 在lcm_driver_list [ lcm_count ] 中增加nt35510_lcm_drv。
C.打开mediatekconfigprjProjectConfig.mk:
BUILD_LK=yes //BUILD_UBOOT=yes
BOOT_LOGO=wsvganl
CUSTOM_KERNEL_LCM = nt35510
CUSTOM_LK_LCM= nt35510 // CUSTOM_UBOOT_LCM =nt35510
LCM_WIDTH=600
LCM_HEIGHT=1024
驱动文件移植原则:
根据具体平台,填充对应的函数,不能直接复制整个文件,避免不必要编译和接口错误。
2.LCD显示旋转(横竖屏旋转,关联到很多界面,需要统一修改)
方式一:横竖屏分辨率修改(还需要修改TP驱动):
LCM_WIDTH=1024
LCM_HEIGHT=600
方式二:lcm显示旋转,只需要修改:(还需要旋转camera驱动)
MTK_LCM_PHYSICAL_ROTATION=90
MTK_TOUCH_PHYSICAL_ROTATION_RELATIVE_TO_LCM=90
camera 旋转
alpsmediatekcustomprjhalimgsensorsrccfg_setting_imgsensor.cpp
static SensorOrientation_T const inst = {
u4Degree_0 : 180,//90, // main sensor in degree (0, 90,180, 270)
u4Degree_1 : 0,//90, // sub sensor in degree (0, 90, 180, 270)
3.lcm参数修改
mediatekcustomcommonkernellcm gb_mt8193
staticvoid lcm_get_params(LCM_PARAMS *params){}
lcd rgb频率:
//params->dpi.mipi_pll_clk_ref =536870912;
params->dpi.mipi_pll_clk_ref= (33.3*(16777216*8*2))/26; //33.3MHz
//params->dpi.mipi_pll_clk_ref= 536870912; //52.0MHz
colorformat 修改
params->dpi.format = LCM_DPI_FORMAT_RGB888; // format is 24 bit//LCM_DPI_FORMAT_RGB666
4.修改显示分辨率:
A:配置修改:
打开mediatekconfigprjProjectConfig.mk:
LCM_WIDTH=600
LCM_HEIGHT=1024
Lk_logo= wsvganl
B:lcm驱动分辨率修改(注意横竖数值对应)
对应的lcm :mediatekcustomcommonkernellcm gb_mt8193
#defineFRAME_WIDTH (1024)
#defineFRAME_HEIGHT (600)
5.tpsensor driver修改,对应分辨率(sensor fae提供修改方式)。