int mdss_dsi_config(struct msm_fb_panel_data *panel) { int ret = NO_ERROR; struct msm_panel_info *pinfo; struct mipi_dsi_panel_config mipi_pinfo; if (!panel) return ERR_INVALID_ARGS; pinfo = &(panel->panel_info); mipi_pinfo.mode = pinfo->mipi.mode; mipi_pinfo.num_of_lanes = pinfo->mipi.num_of_lanes; mipi_pinfo.mdss_dsi_phy_config = pinfo->mipi.mdss_dsi_phy_db; mipi_pinfo.panel_cmds = pinfo->mipi.panel_cmds; mipi_pinfo.num_of_panel_cmds = pinfo->mipi.num_of_panel_cmds; mipi_pinfo.lane_swap = pinfo->mipi.lane_swap; mipi_pinfo.pack = 0; mdss_dsi_phy_init(&mipi_pinfo); ret += mipi_dsi_panel_initialize(&mipi_pinfo); if (pinfo->rotate && panel->rotate) pinfo->rotate(); return ret; }
int mipi_config(struct msm_fb_panel_data *panel) { int ret = NO_ERROR; #if (DISPLAY_TYPE_MDSS == 0) struct msm_panel_info *pinfo; struct mipi_dsi_panel_config mipi_pinfo; if (!panel) return ERR_INVALID_ARGS; pinfo = &(panel->panel_info); mipi_pinfo.mode = pinfo->mipi.mode; mipi_pinfo.num_of_lanes = pinfo->mipi.num_of_lanes; mipi_pinfo.dsi_phy_config = pinfo->mipi.dsi_phy_db; mipi_pinfo.panel_on_cmds = pinfo->mipi.panel_on_cmds; mipi_pinfo.num_of_panel_on_cmds = pinfo->mipi.num_of_panel_on_cmds; mipi_pinfo.lane_swap = pinfo->mipi.lane_swap; mipi_pinfo.pack = 1; /* Enable MMSS_AHB_ARB_MATER_PORT_E for arbiter master0 and master 1 request */ #if (!DISPLAY_MIPI_PANEL_RENESAS && !DISPLAY_TYPE_DSI6G && !DISPLAY_TYPE_8610) writel(0x00001800, MMSS_SFPB_GPREG); #endif mipi_dsi_phy_init(&mipi_pinfo); ret += mipi_dsi_panel_initialize(&mipi_pinfo); if (pinfo->rotate && panel->rotate) pinfo->rotate(); #endif return ret; }
struct fbcon_config *mipi_init(void) { int status = 0; struct mipi_dsi_panel_config *panel_info = get_panel_info(); /* Enable MMSS_AHB_ARB_MATER_PORT_E for arbiter master0 and master 1 request */ #if (!DISPLAY_MIPI_PANEL_RENESAS) writel(0x00001800, MMSS_SFPB_GPREG); #endif #if DISPLAY_MIPI_PANEL_TOSHIBA_MDT61 mipi_dsi_phy_init(panel_info); #else mipi_dsi_phy_ctrl_config(panel_info); #endif status += mipi_dsi_panel_initialize(panel_info); #if DISPLAY_MIPI_PANEL_NOVATEK_BLUE mipi_dsi_cmd_bta_sw_trigger(); mipi_novatek_manufacture_id(); #endif mipi_fb_cfg.base = MIPI_FB_ADDR; if (panel_info->mode == MIPI_VIDEO_MODE) status += mipi_dsi_video_config(panel_info->num_of_lanes); if (panel_info->mode == MIPI_CMD_MODE) cmd_mode_status = 1; return &mipi_fb_cfg; }