1. 关于时序
JB版本中,接口disp_drv_get_lcm_driver实现compare id并获取到lcm driver以及lcm param的动作,对于DSI,每次尝试读取id之前都会根据lcm driver中的设置重新设置时序,所以担心时序不同无法读取id的担心就显得多余了
2. 关于开机logo
我们默认的做法,在ProjectConfig.mk中会定义Macro BOOT_LOGO方便在目录\mediatek\custom\common\lk\logo中读取到相应的资源,作为开机logo显示。
这里的开机logo分为两种,分别为U-boot logo以及kernel logo。我们分别讨论这两种logo的显示原理
· U-boot logo(and Battery logo)
U-boot logo是开机后的第一个界面,U-boot logo以及Battery logo会统一打包为logo.bin。对于JB版本,主要工作 流程如下
1. Little Kernel会在platform_early_init阶段首先会获取lcm params,其工作流程就是透过读id找到现在插入的LCM,根据LCM的分辨率申请相应大小的frame buffer并确定frame buffer起始地址
2. 为logo.bin预留4M Ram
3. 之后在platform_init阶段,直接将logo.bin载入到4M Ram中
4, 完成载入后,在platform_init中mt_disp_show_boot_logo();会调用show_logo(0);完成第一张logo显示。其中的index=0代表在logo.bin中压缩的第一张图片,logo.bin中的图片压缩顺序可以察看文件mediatek\custom\common\lk\logo\rules.mk,如下
RESOURCE_OBJ_LIST := \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_uboot.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_battery.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_low_battery.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_charger_ov.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_num_0.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_num_1.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_num_2.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_num_3.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_num_4.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_num_5.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_num_6.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_num_7.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_num_8.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_num_9.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_num_percent.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_animation_01.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_animation_02.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_animation_03.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_animation_04.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_animation_05.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_animation_06.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_animation_07.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_animation_08.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_animation_09.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_animation_10.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_10_01.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_10_02.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_10_03.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_10_04.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_10_05.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_10_06.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_10_07.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_10_08.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_10_09.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_10_10.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_bg.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_img.raw \
$(BOOT_LOGO_DIR)/$(BOOT_LOGO)/$(BOOT_LOGO)_bat_100.raw \
· Kernel logo
Kernel logo的工作方式与U-boot logo不同,是透过init.rc中注册的boot_logo_updater service完成读取raw data文件,进行绘画的,所以在kernel logo只是经过了bmp向raw的转换,在目录mediatek\custom\common\lk\logo\下生成raw data 文件boot_logo。之后透过脚本文件将boot_logo文件搬移到out\target\product\xxxx\system\media\images下,打包为system.img,download到手机种,并存放于/system/media/images目录下。