author | daisy.skye的博客_CSDN博客-嵌入式,Qt,Linux领域博主 |
sdm450 | P326 在高通的 SDM450 中,有两种屏幕初始化代码,分别称为 "lk" 和 "kernel" 代码, "lk" 代码是用于在内核中初始化屏幕的代码。它通常在内核启动时调用,并且旨在初始化屏幕的各种属性,例如刷新率、分辨率、色彩深度等。这种代码通常涉及与 SDM450 中的内核模块通信,以便初始化屏幕。 "kernel" 代码则是在用户空间中初始化屏幕的代码。它通常在应用程序中调用,例如显示驱动程序或系统设置应用程序。这种代码通常涉及与 SDM450 中的用户空间库通信,以便初始化屏幕。 |
lk panel.h | /home/scooper/workspace2/qis/P313/bootable/bootloader/lk/dev/gcdb/display/include/panel_st7701s_wvga_video.h |
kernel dtsi | /home/scooper/workspace2/qis/P313/kernel/msm-3.18/arch/arm64/boot/dts/scooper/P326/dsi-panel-st7701s-wvga-video.dtsi |
kernel 加载dtsi | /home/scooper/workspace/ljh/sdm450/kernel/msm-3.18/arch/arm64/boot/dts/scooper/P326/msm8953-mdss-panels.dtsi |
oem_panel.c | /home/scooper/workspace/ljh/sdm450/bootable/bootloader/lk/target/P326/oem_panel.c
#include"include/panel_st7701s_wvga_video.h"
enum{ST7701S_WVGA_VIDEO_PANEL,};
static struct panel_list supp_panels[]= { {"st7701s_wvga_video", ST7701S_WVGA_VIDEO_PANEL},}; 4、根据结构枚举调用针对st7701s的参数值 5、根据屏幕 id 区分调用的屏幕初始化文件 |
重点mipi_dsi.c | /home/scooper/workspace/ljh/sdm450/bootable/bootloader/lk/platform/msm_shared/mipi_dsi.c 改内容是驱动时,初始化读取屏幕id,并传递给上面oem_panel.c用于区分id调用不同的屏幕初始化参数 int mdss_dsi_panel_initialize(struct mipi_panel_info *mipi, uint32_t broadcast) { …… mdss_dsi_cmds_tx(mipi, &read_da_start_cmd, 1, 0);//下发读取id的指令 mdss_dsi_cmds_rx(mipi, &lcm, 1, 1);//读取显示屏返回的id地址 data1 = ntohl(*lcm); //数据处理 // lk_lcd_id = data1 >> 8; //注释 lk_lcd_id = data1 & 0x00FF0000 ;//daisy new add lk_lcd_id = lk_lcd_id >> 16;//daisy new add 保留id两位参数 dprintf(CRITICAL, "lk_lcd_id =0x%x\n",lk_lcd_id ) …… } |