目录
一、读取显示屏id
二、区分不同屏幕id
转载请备注:daisy.skye的博客_CSDN博客-Qt,嵌入式,Linux领域博主
一、读取显示屏id
相关函数 | int mdss_dsi_panel_initialize() |
文件路径 | /home/scooper/workspace/ljh/sdm450/bootable/bootloader/lk/platform/msm_shared/mipi_dsi.c |
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; //去除低八位,保留高八位dprintf(CRITICAL, "lk_lcd_id =0x%x\n",lk_lcd_id )
……
}
二、区分不同屏幕id
相关函数 | int oem_panel_select() |
文件路径 | /home/scooper/workspace/ljh/sdm450/bootable/bootloader/lk/target/P326/oem_panel.c |
int oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,struct msm_panel_info *pinfo, struct dss_dsi_phy_ctrl *phy_db)
{
……
switch (hw_id) {case HW_PLATFORM_MTP:case HW_PLATFORM_SURF:case HW_PLATFORM_RCM:
panel_id = TRULY_1080P_VIDEO_PANEL;break;case HW_PLATFORM_QRD:if(lk_lcd_id == 0x213000)
panel_id = ST7701S_WVGA_VIDEO_PANEL;else
panel_id = ST7701S_3_WVGA_VIDEO_PANEL;break;default:dprintf(CRITICAL, "Display not enabled for %d HW type\n",
hw_id);return PANEL_TYPE_UNKNOWN;}
……}