int mdss_dsi_cont_splash_on(struct mdss_panel_data *pdata) { int ret = 0; struct mipi_panel_info *mipi; struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL; pr_info("%s:%d DSI on for continuous splash.\n", __func__, __LINE__); if (pdata == NULL) { pr_err("%s: Invalid input data\n", __func__); return -EINVAL; } mipi = &pdata->panel_info.mipi; ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata, panel_data); pr_debug("%s+: ctrl=%p ndx=%d\n", __func__, ctrl_pdata, ctrl_pdata->ndx); /* LGE_CHANGE, command panel does not be powered off */ if (pdata->panel_info.type == MIPI_VIDEO_PANEL) WARN((ctrl_pdata->ctrl_state & CTRL_STATE_PANEL_INIT), "Incorrect Ctrl state=0x%x\n", ctrl_pdata->ctrl_state); mdss_dsi_sw_reset(pdata); mdss_dsi_host_init(mipi, pdata); if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) { mdss_dsi_op_mode_config(DSI_CMD_MODE, pdata); ret = mdss_dsi_unblank(pdata); if (ret) { pr_err("%s: unblank failed\n", __func__); return ret; } } /* FixMe AU_106 */ #ifndef CONFIG_OLED_SUPPORT /* because of redish issue */ ctrl_pdata->ctrl_state = CTRL_STATE_MDP_ACTIVE; #endif #if defined(CONFIG_MACH_LGE) pdata_base = pdata; #endif pr_debug("%s-:End\n", __func__); return ret; }
int mdss_dsi_cont_splash_on(struct mdss_panel_data *pdata) { int ret = 0; struct mipi_panel_info *mipi; struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL; pr_info("%s:%d DSI on for continuous splash.\n", __func__, __LINE__); if (pdata == NULL) { pr_err("%s: Invalid input data\n", __func__); return -EINVAL; } mipi = &pdata->panel_info.mipi; ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata, panel_data); pr_debug("%s+: ctrl=%p ndx=%d\n", __func__, ctrl_pdata, ctrl_pdata->ndx); //ASUS_BSP: Louis, cmd mode splash won't unblank panel in bootup, don't need to check panel state +++ if (!(pdata->panel_info.type == MIPI_CMD_PANEL && pdata->panel_info.panel_power_on == 1)) { WARN((ctrl_pdata->ctrl_state & CTRL_STATE_PANEL_INIT), "Incorrect Ctrl state=0x%x\n", ctrl_pdata->ctrl_state); } //ASUS_BSP: Louis --- mdss_dsi_sw_reset(pdata); mdss_dsi_host_init(mipi, pdata); mdss_dsi_op_mode_config(mipi->mode, pdata); if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) { ret = mdss_dsi_unblank(pdata); if (ret) { pr_err("%s: unblank failed\n", __func__); return ret; } } pr_debug("%s-:End\n", __func__); return ret; }
int mdss_dsi_cont_splash_on(struct mdss_panel_data *pdata) { int ret = 0; struct mipi_panel_info *mipi; struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL; pr_info("%s:%d DSI on for continuous splash.\n", __func__, __LINE__); if (pdata == NULL) { pr_err("%s: Invalid input data\n", __func__); return -EINVAL; } mipi = &pdata->panel_info.mipi; ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata, panel_data); pr_debug("%s+: ctrl=%p ndx=%d\n", __func__, ctrl_pdata, ctrl_pdata->ndx); WARN((ctrl_pdata->ctrl_state & CTRL_STATE_PANEL_INIT), "Incorrect Ctrl state=0x%x\n", ctrl_pdata->ctrl_state); mdss_dsi_sw_reset(pdata); mdss_dsi_host_init(mipi, pdata); mdss_dsi_op_mode_config(mipi->mode, pdata); if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) { ret = mdss_dsi_unblank(pdata); if (ret) { pr_err("%s: unblank failed\n", __func__); return ret; } } pr_debug("%s-:End\n", __func__); return ret; }
static int mdss_dsi_event_handler(struct mdss_panel_data *pdata, int event, void *arg) { int rc = 0; struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL; if (pdata == NULL) { pr_err("%s: Invalid input data\n", __func__); return -EINVAL; } ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata, panel_data); pr_debug("%s+:event=%d\n", __func__, event); switch (event) { case MDSS_EVENT_UNBLANK: rc = mdss_dsi_on(pdata); mdss_dsi_op_mode_config(pdata->panel_info.mipi.mode, pdata); if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_PANEL_ON: ctrl_pdata->ctrl_state |= CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->on_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_BLANK: if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_blank(pdata); break; case MDSS_EVENT_PANEL_OFF: ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->off_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_blank(pdata); rc = mdss_dsi_off(pdata); break; case MDSS_EVENT_CONT_SPLASH_FINISH: if (ctrl_pdata->off_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_blank(pdata); ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; rc = mdss_dsi_cont_splash_on(pdata); break; case MDSS_EVENT_PANEL_CONT_SPLASH_FINISH: if (ctrl_pdata->cont_splash_on) rc = ctrl_pdata->cont_splash_on(pdata); break; case MDSS_EVENT_PANEL_CLK_CTRL: mdss_dsi_clk_req(ctrl_pdata, (int)arg); break; case MDSS_EVENT_DSI_CMDLIST_KOFF: mdss_dsi_cmdlist_commit(ctrl_pdata, 1, NULL); break; case MDSS_EVENT_PANEL_UPDATE_FPS: if (arg != NULL) { rc = mdss_dsi_dfps_config(pdata, (int)arg); pr_debug("%s:update fps to = %d\n", __func__, (int)arg); } break; case MDSS_EVENT_CONT_SPLASH_BEGIN: /* * TODO: Stubbed out for now until we can remove whole * black screen when kernel starts. */ break; case MDSS_EVENT_ENABLE_PARTIAL_UPDATE: rc = mdss_dsi_ctl_partial_update(pdata); break; case MDSS_EVENT_DSI_ULPS_CTRL: rc = mdss_dsi_ulps_config(ctrl_pdata, (int)arg); break; case MDSS_EVENT_REGISTER_RECOVERY_HANDLER: rc = mdss_dsi_register_recovery_handler(ctrl_pdata, (struct mdss_panel_recovery *)arg); break; case MDSS_EVENT_SET_CABC: if (ctrl_pdata->set_cabc) rc = ctrl_pdata->set_cabc(ctrl_pdata, (int)arg); break; case MDSS_EVENT_ENABLE_TE: rc = mdss_dsi_hndl_enable_te(ctrl_pdata, (int) arg); break; case MDSS_EVENT_ENABLE_HBM: rc = mdss_dsi_hndl_enable_hbm(ctrl_pdata, (int) arg); break; default: pr_debug("%s: unhandled event=%d\n", __func__, event); break; } pr_debug("%s-:event=%d, rc=%d\n", __func__, event, rc); return rc; }
static int mdss_dsi_event_handler(struct mdss_panel_data *pdata, int event, void *arg) { int rc = 0; struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL; if (pdata == NULL) { pr_err("%s: Invalid input data\n", __func__); return -EINVAL; } ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata, panel_data); pr_debug("%s+:event=%d\n", __func__, event); switch (event) { case MDSS_EVENT_UNBLANK: rc = mdss_dsi_on(pdata); mdss_dsi_op_mode_config(pdata->panel_info.mipi.mode, pdata); if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_PANEL_ON: ctrl_pdata->ctrl_state |= CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->on_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_BLANK: if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_blank(pdata); break; case MDSS_EVENT_PANEL_OFF: ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->off_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_blank(pdata); rc = mdss_dsi_off(pdata); break; case MDSS_EVENT_CONT_SPLASH_FINISH: ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) { rc = mdss_dsi_cont_splash_on(pdata); } else { pr_debug("%s:event=%d, Dsi On not called: ctrl_state: %d\n", __func__, event, ctrl_pdata->on_cmds.link_state); rc = -EINVAL; } break; case MDSS_EVENT_PANEL_CLK_CTRL: mdss_dsi_clk_req(ctrl_pdata, (int)arg); break; case MDSS_EVENT_DSI_CMDLIST_KOFF: ctrl_pdata->recovery = (struct mdss_panel_recovery *)arg; mdss_dsi_cmdlist_commit(ctrl_pdata, 1); break; case MDSS_EVENT_PANEL_UPDATE_FPS: if (arg != NULL) { rc = mdss_dsi_dfps_config(pdata, (int)arg); pr_debug("%s:update fps to = %d\n", __func__, (int)arg); } break; case MDSS_EVENT_CONT_SPLASH_BEGIN: if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) { /* Panel is Enabled in Bootloader */ rc = mdss_dsi_blank(pdata); } break; case MDSS_EVENT_ENABLE_PARTIAL_UPDATE: rc = mdss_dsi_ctl_partial_update(pdata); break; default: pr_debug("%s: unhandled event=%d\n", __func__, event); break; } pr_debug("%s-:event=%d, rc=%d\n", __func__, event, rc); return rc; }
static int mdss_dsi_event_handler(struct mdss_panel_data *pdata, int event, void *arg) { int rc = 0; struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL; int power_state; if (pdata == NULL) { pr_err("%s: Invalid input data\n", __func__); return -EINVAL; } ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata, panel_data); pr_debug("%s+: ctrl=%d event=%d\n", __func__, ctrl_pdata->ndx, event); MDSS_XLOG(event, arg, ctrl_pdata->ndx, 0x3333); switch (event) { case MDSS_EVENT_UNBLANK: // pr_info("%s : MDSS_EVENT_UNBLANK \n", __func__); pr_info("%s :(%d) MDSS_EVENT_UNBLANK (%s)\n", __func__, ctrl_pdata->ndx, ctrl_pdata->on_cmds.link_state? "HS" : "LP"); rc = mdss_dsi_on(pdata); mdss_dsi_op_mode_config(pdata->panel_info.mipi.mode, pdata); if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_PANEL_ON: //pr_info("%s : MDSS_EVENT_PANEL_ON \n", __func__); pr_info("%s :(%d) MDSS_EVENT_PANEL_ON (%s)\n", __func__, ctrl_pdata->ndx, ctrl_pdata->on_cmds.link_state? "HS" : "LP"); ctrl_pdata->ctrl_state |= CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->on_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_BLANK: pr_info("%s :(%d) MDSS_EVENT_BLANK (%s)\n", __func__, ctrl_pdata->ndx, ctrl_pdata->off_cmds.link_state? "HS" : "LP"); power_state = (int) (unsigned long) arg; if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_blank(pdata, power_state); break; case MDSS_EVENT_PANEL_OFF: pr_info("%s :(%d) MDSS_EVENT_PANEL_OFF (%s) \n", __func__, ctrl_pdata->ndx, ctrl_pdata->off_cmds.link_state? "HS" : "LP"); power_state = (int) (unsigned long) arg; ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->off_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_blank(pdata, power_state); rc = mdss_dsi_off(pdata, power_state); break; case MDSS_EVENT_FB_REGISTERED: pr_info("%s : MDSS_EVENT_FB_REGISTERED \n", __func__); if (ctrl_pdata->registered) { pr_debug("%s:event=%d, calling panel registered callback \n", __func__, event); rc = ctrl_pdata->registered(pdata); } break; case MDSS_EVENT_CONT_SPLASH_FINISH: pr_info("%s : MDSS_EVENT_CONT_SPLASH_FINISH \n", __func__); if (ctrl_pdata->off_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_blank(pdata, MDSS_PANEL_POWER_OFF); ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; #if defined(CONFIG_FB_MSM_MDSS_SAMSUNG) ctrl_pdata->ctrl_state &= ~CTRL_STATE_PANEL_INIT; #endif rc = mdss_dsi_cont_splash_on(pdata); break; case MDSS_EVENT_PANEL_CLK_CTRL: mdss_dsi_clk_req(ctrl_pdata, (int) (unsigned long) arg); break; case MDSS_EVENT_DSI_CMDLIST_KOFF: ctrl_pdata->recovery = (struct mdss_panel_recovery *)arg; mdss_dsi_cmdlist_commit(ctrl_pdata, 1); break; case MDSS_EVENT_PANEL_UPDATE_FPS: if (arg != NULL) { rc = mdss_dsi_dfps_config(pdata, (int) (unsigned long) arg); pr_debug("%s:update fps to = %d\n", __func__, (int) (unsigned long) arg); } break; case MDSS_EVENT_CONT_SPLASH_BEGIN: pr_info("%s : MDSS_EVENT_CONT_SPLASH_BEGIN \n", __func__); if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) { /* Panel is Enabled in Bootloader */ rc = mdss_dsi_blank(pdata, MDSS_PANEL_POWER_OFF); } break; case MDSS_EVENT_ENABLE_PARTIAL_ROI: rc = mdss_dsi_ctl_partial_roi(pdata); break; case MDSS_EVENT_DSI_STREAM_SIZE: rc = mdss_dsi_set_stream_size(pdata); break; default: #if defined(CONFIG_FB_MSM_MDSS_SAMSUNG) if(ctrl_pdata->event_handler) rc = ctrl_pdata->event_handler(pdata, event, arg); else #endif pr_debug("%s: unhandled event=%d\n", __func__, event); break; } pr_debug("%s-:event=%d, rc=%d\n", __func__, event, rc); return rc; }
static int mdss_dsi_event_handler(struct mdss_panel_data *pdata, int event, void *arg) { int rc = 0; struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL; if (pdata == NULL) { pr_err("%s: Invalid input data\n", __func__); return -EINVAL; } ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata, panel_data); pr_debug("%s+:event=%d\n", __func__, event); switch (event) { case MDSS_EVENT_UNBLANK: rc = mdss_dsi_on(pdata); mdss_dsi_op_mode_config(pdata->panel_info.mipi.mode, pdata); if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_PANEL_ON: ctrl_pdata->ctrl_state |= CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->on_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_BLANK: if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_blank(pdata); break; case MDSS_EVENT_PANEL_OFF: ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->off_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_blank(pdata); rc = mdss_dsi_off(pdata); break; case MDSS_EVENT_CONT_SPLASH_FINISH: ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) { rc = mdss_dsi_cont_splash_on(pdata); } else { pr_debug("%s:event=%d, Dsi On not called: ctrl_state: %d\n", __func__, event, ctrl_pdata->on_cmds.link_state); rc = -EINVAL; } break; case MDSS_EVENT_PANEL_CLK_CTRL: mdss_dsi_clk_req(ctrl_pdata, (int)arg); break; case MDSS_EVENT_DSI_CMDLIST_KOFF: mdss_dsi_cmdlist_commit(ctrl_pdata, 1); break; case MDSS_EVENT_CONT_SPLASH_BEGIN: /* * TODO: Stubbed out for now until we can remove whole * black screen when kernel starts. */ break; case MDSS_EVENT_LOCK_PANEL_MUTEX: if (ctrl_pdata->lock_mutex) ctrl_pdata->lock_mutex(pdata); break; case MDSS_EVENT_UNLOCK_PANEL_MUTEX: if (ctrl_pdata->unlock_mutex) ctrl_pdata->unlock_mutex(pdata); break; default: pr_debug("%s: unhandled event=%d\n", __func__, event); break; } pr_debug("%s-:event=%d, rc=%d\n", __func__, event, rc); return rc; }
static int mdss_dsi_event_handler(struct mdss_panel_data *pdata, int event, void *arg) { int rc = 0; struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL; if (pdata == NULL) { pr_err("%s: Invalid input data\n", __func__); return -EINVAL; } ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata, panel_data); pr_debug("%s+:event=%d\n", __func__, event); #ifdef CONFIG_MACH_LGE if (pdata_base == NULL) { if(ctrl_pdata->shared_pdata.broadcast_enable) pdata_base = pdata->next; else pdata_base = pdata; } #endif switch (event) { case MDSS_EVENT_UNBLANK: lcd_notifier_call_chain(LCD_EVENT_ON_START); rc = mdss_dsi_on(pdata); mdss_dsi_op_mode_config(pdata->panel_info.mipi.mode, pdata); if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_PANEL_ON: ctrl_pdata->ctrl_state |= CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->on_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_unblank(pdata); lcd_notifier_call_chain(LCD_EVENT_ON_END); break; case MDSS_EVENT_BLANK: lcd_notifier_call_chain(LCD_EVENT_OFF_START); if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_blank(pdata); break; case MDSS_EVENT_PANEL_OFF: ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->off_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_blank(pdata); rc = mdss_dsi_off(pdata); lcd_notifier_call_chain(LCD_EVENT_OFF_END); break; case MDSS_EVENT_CONT_SPLASH_FINISH: ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) { rc = mdss_dsi_cont_splash_on(pdata); } else { pr_debug("%s:event=%d, Dsi On not called: ctrl_state: %d\n", __func__, event, ctrl_pdata->on_cmds.link_state); rc = -EINVAL; } break; case MDSS_EVENT_PANEL_CLK_CTRL: mdss_dsi_clk_req(ctrl_pdata, (int)arg); break; case MDSS_EVENT_DSI_CMDLIST_KOFF: ctrl_pdata->recovery = (struct mdss_panel_recovery *)arg; mdss_dsi_cmdlist_commit(ctrl_pdata, 1); break; case MDSS_EVENT_PANEL_UPDATE_FPS: if (arg != NULL) { rc = mdss_dsi_dfps_config(pdata, (int)arg); pr_debug("%s:update fps to = %d\n", __func__, (int)arg); } break; case MDSS_EVENT_CONT_SPLASH_BEGIN: if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) { /* Panel is Enabled in Bootloader */ rc = mdss_dsi_blank(pdata); } break; case MDSS_EVENT_ENABLE_PARTIAL_UPDATE: rc = mdss_dsi_ctl_partial_update(pdata); break; #ifdef CONFIG_LGE_SHARPENING case MDSS_EVENT_SET_SHARPENING: rc = ctrl_pdata->set_sharpening(ctrl_pdata, (int) arg, NULL); break; case MDSS_EVENT_GET_SHARPENING: rc = ctrl_pdata->get_sharpening(ctrl_pdata); break; case MDSS_EVENT_QUEUE_SHARPENING: rc = ctrl_pdata->queue_sharpening(ctrl_pdata, (int) arg); break; #endif default: pr_debug("%s: unhandled event=%d\n", __func__, event); break; } pr_debug("%s-:event=%d, rc=%d\n", __func__, event, rc); return rc; }
static int mdss_dsi_event_handler(struct mdss_panel_data *pdata, int event, void *arg) { int rc = 0; struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL; if (pdata == NULL) { pr_err("%s: Invalid input data\n", __func__); return -EINVAL; } ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata, panel_data); pr_debug("%s+:event=%d\n", __func__, event); switch (event) { case MDSS_EVENT_UNBLANK: rc = mdss_dsi_on(pdata); if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_PANEL_ON: ctrl_pdata->ctrl_state |= CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->on_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_BLANK: if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_blank(pdata); break; case MDSS_EVENT_PANEL_OFF: ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->off_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_blank(pdata); rc = mdss_dsi_off(pdata); break; case MDSS_EVENT_CONT_SPLASH_FINISH: ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) { rc = mdss_dsi_cont_splash_on(pdata); } else { pr_debug("%s:event=%d, Dsi On not called: ctrl_state: %d\n", __func__, event, ctrl_pdata->on_cmds.link_state); rc = -EINVAL; } break; #ifdef CONFIG_OLED_SUPPORT case MDSS_EVENT_FIRST_FRAME_UPDATE: /*Event is send only if cont_splash feature is enabled */ if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) { /* Panel is Enabled already in Bootloader */ ctrl_pdata->ctrl_state |= CTRL_STATE_PANEL_INIT; rc = mdss_dsi_blank(pdata); } break; #endif case MDSS_EVENT_PANEL_CLK_CTRL: mdss_dsi_clk_req(ctrl_pdata, (int)arg); break; case MDSS_EVENT_DSI_CMDLIST_KOFF: mdss_dsi_cmdlist_commit(ctrl_pdata, 1); break; case MDSS_EVENT_CONT_SPLASH_BEGIN: if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) { /* Panel is Enabled in Bootloader */ rc = mdss_dsi_blank(pdata); } break; default: pr_debug("%s: unhandled event=%d\n", __func__, event); break; } pr_debug("%s-:event=%d, rc=%d\n", __func__, event, rc); return rc; }
static int mdss_dsi_event_handler(struct mdss_panel_data *pdata, int event, void *arg) { int rc = 0; struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL; if (pdata == NULL) { pr_err("%s: Invalid input data\n", __func__); return -EINVAL; } ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata, panel_data); pr_debug("%s+:event=%d\n", __func__, event); MDSS_XLOG(event, arg, ctrl_pdata->ndx, 0x3333); switch (event) { case MDSS_EVENT_UNBLANK: rc = mdss_dsi_on(pdata); mdss_dsi_op_mode_config(pdata->panel_info.mipi.mode, pdata); if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_PANEL_ON: ctrl_pdata->ctrl_state |= CTRL_STATE_MDP_ACTIVE; #if (defined(CONFIG_FB_MSM_MDSS_SPECIFIC_PANEL) && defined(CONFIG_MACH_SONY_YUKON)) if (ctrl_pdata->spec_pdata->disp_on_in_hs && ctrl_pdata->spec_pdata->disp_on) rc = ctrl_pdata->spec_pdata->disp_on(pdata); #endif if (ctrl_pdata->on_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_BLANK: if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_blank(pdata); break; case MDSS_EVENT_PANEL_OFF: ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->off_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_blank(pdata); rc = mdss_dsi_off(pdata); break; case MDSS_EVENT_CONT_SPLASH_FINISH: if (ctrl_pdata->off_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_blank(pdata); ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; rc = mdss_dsi_cont_splash_on(pdata); break; case MDSS_EVENT_PANEL_CLK_CTRL: mdss_dsi_clk_req(ctrl_pdata, (int)arg); break; case MDSS_EVENT_DSI_CMDLIST_KOFF: mdss_dsi_cmdlist_commit(ctrl_pdata, 1); break; case MDSS_EVENT_PANEL_UPDATE_FPS: if (arg != NULL) { rc = mdss_dsi_dfps_config(pdata, (int)arg); pr_debug("%s:update fps to = %d\n", __func__, (int)arg); } break; case MDSS_EVENT_CONT_SPLASH_BEGIN: if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) { /* Panel is Enabled in Bootloader */ rc = mdss_dsi_blank(pdata); } break; case MDSS_EVENT_ENABLE_PARTIAL_UPDATE: rc = mdss_dsi_ctl_partial_update(pdata); break; case MDSS_EVENT_DSI_ULPS_CTRL: rc = mdss_dsi_ulps_config(ctrl_pdata, (int)arg); break; case MDSS_EVENT_REGISTER_RECOVERY_HANDLER: rc = mdss_dsi_register_recovery_handler(ctrl_pdata, (struct mdss_panel_recovery *)arg); break; case MDSS_EVENT_DSI_DYNAMIC_SWITCH: rc = mdss_dsi_update_panel_config(ctrl_pdata, (int)(unsigned long) arg); break; default: pr_debug("%s: unhandled event=%d\n", __func__, event); break; } pr_debug("%s-:event=%d, rc=%d\n", __func__, event, rc); return rc; }
static int mdss_dsi_event_handler(struct mdss_panel_data *pdata, int event, void *arg) { int rc = 0; struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL; if (pdata == NULL) { pr_err("%s: Invalid input data\n", __func__); return -EINVAL; } #if defined(CONFIG_LCD_CONNECTION_CHECK) && defined(CONFIG_FB_MSM_MDSS_HIMAX_QHD_PANEL) if(is_lcd_attached() == 0){ pr_err("%s: LCD not connected.\n", __func__); return 0; } #endif ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata, panel_data); pr_debug("%s+:event=%d\n", __func__, event); switch (event) { case MDSS_EVENT_UNBLANK: rc = mdss_dsi_on(pdata); mdss_dsi_op_mode_config(pdata->panel_info.mipi.mode, pdata); if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_PANEL_ON: ctrl_pdata->ctrl_state |= CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->on_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_unblank(pdata); break; case MDSS_EVENT_BLANK: if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) rc = mdss_dsi_blank(pdata); break; case MDSS_EVENT_PANEL_OFF: ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->off_cmds.link_state == DSI_LP_MODE) rc = mdss_dsi_blank(pdata); rc = mdss_dsi_off(pdata); break; case MDSS_EVENT_FB_REGISTERED: /* * Okay, since framebuffer is registered, display the kernel logo if needed */ if (!ctrl_pdata->panel_data.panel_info.cont_splash_enabled) { // load_samsung_boot_logo(); } break; case MDSS_EVENT_CONT_SPLASH_FINISH: ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE; if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) { rc = mdss_dsi_cont_splash_on(pdata); } else { pr_debug("%s:event=%d, Dsi On not called: ctrl_state: %d\n", __func__, event, ctrl_pdata->on_cmds.link_state); rc = -EINVAL; } break; case MDSS_EVENT_PANEL_CLK_CTRL: mdss_dsi_clk_req(ctrl_pdata, (int)arg); break; case MDSS_EVENT_DSI_CMDLIST_KOFF: mdss_dsi_cmdlist_commit(ctrl_pdata, 1); break; case MDSS_EVENT_PANEL_UPDATE_FPS: if (arg != NULL) { rc = mdss_dsi_dfps_config(pdata, (int)arg); pr_debug("%s:update fps to = %d\n", __func__, (int)arg); } break; case MDSS_EVENT_CONT_SPLASH_BEGIN: if (ctrl_pdata->off_cmds.link_state == DSI_HS_MODE) { /* Panel is Enabled in Bootloader */ rc = mdss_dsi_blank(pdata); } break; case MDSS_EVENT_ENABLE_PARTIAL_UPDATE: rc = mdss_dsi_ctl_partial_update(pdata); break; default: pr_debug("%s: unhandled event=%d\n", __func__, event); break; } pr_debug("%s-:event=%d, rc=%d\n", __func__, event, rc); return rc; }
int mdss_dsi_cont_splash_on(struct mdss_panel_data *pdata) { int ret = 0; struct mipi_panel_info *mipi; struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL; pr_info("%s:%d DSI on for continuous splash.\n", __func__, __LINE__); if (pdata == NULL) { pr_err("%s: Invalid input data\n", __func__); return -EINVAL; } #if defined(CONFIG_FB_MSM_MDSS_S6E8AA0A_HD_PANEL) mdss_dsi_reset(pdata); #endif mipi = &pdata->panel_info.mipi; ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata, panel_data); pr_debug("%s+: ctrl=%p ndx=%d\n", __func__, ctrl_pdata, ctrl_pdata->ndx); WARN((ctrl_pdata->ctrl_state & CTRL_STATE_PANEL_INIT), "Incorrect Ctrl state=0x%x\n", ctrl_pdata->ctrl_state); #if defined(CONFIG_FB_MSM_MDSS_SDC_WXGA_PANEL) ret = mdss_dsi_panel_power_on(pdata, 0); if (ret) { pr_err("%s: Panel power on with 0 failed\n", __func__); return ret; } mdelay(10); ret = mdss_dsi_panel_power_on(pdata, 1); if (ret) { pr_err("%s: Panel power on with 1 failed\n", __func__); return ret; } #endif mdss_dsi_sw_reset(pdata); mdss_dsi_host_init(mipi, pdata); #if RESET_IN_LP11 // add for LP11 // LP11 { u32 tmp; tmp = MIPI_INP((ctrl_pdata->ctrl_base) + 0xac); tmp &= ~(1<<28); MIPI_OUTP((ctrl_pdata->ctrl_base) + 0xac, tmp); wmb(); } // LP11 (ctrl_pdata->panel_data).panel_reset_fn(pdata, 1); #endif if (mipi->force_clk_lane_hs) { u32 tmp; tmp = MIPI_INP((ctrl_pdata->ctrl_base) + 0xac); tmp |= (1<<28); MIPI_OUTP((ctrl_pdata->ctrl_base) + 0xac, tmp); wmb(); } mdss_dsi_op_mode_config(mipi->mode, pdata); if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE) { ret = mdss_dsi_unblank(pdata); if (ret) { pr_err("%s: unblank failed\n", __func__); return ret; } } pr_debug("%s-:End\n", __func__); return ret; }