Loading drivers/video/msm/mdss/dsi_status_6g.c +1 −28 Original line number Diff line number Diff line Loading @@ -18,33 +18,6 @@ #include "mdss_dsi.h" #include "mdss_mdp.h" /* * mdss_report_panel_dead() - Sends the PANEL_ALIVE=0 status to HAL layer. * @pstatus_data : dsi status data * * This function is called if the panel fails to respond as expected to * the register read/BTA or if the TE signal is not coming as expected * from the panel. The function sends the PANEL_ALIVE=0 status to HAL * layer. */ static void mdss_report_panel_dead(struct dsi_status_data *pstatus_data) { char *envp[2] = {"PANEL_ALIVE=0", NULL}; struct mdss_panel_data *pdata = dev_get_platdata(&pstatus_data->mfd->pdev->dev); if (!pdata) { pr_err("%s: Panel data not available\n", __func__); return; } pdata->panel_info.panel_dead = true; kobject_uevent_env(&pstatus_data->mfd->fbi->dev->kobj, KOBJ_CHANGE, envp); pr_err("%s: Panel has gone bad, sending uevent - %s\n", __func__, envp[0]); return; } /* * mdss_check_te_status() - Check the status of panel for TE based ESD. * @ctrl_pdata : dsi controller data Loading Loading @@ -210,5 +183,5 @@ void mdss_check_dsi_ctrl_status(struct work_struct *work, uint32_t interval) return; status_dead: mdss_report_panel_dead(pstatus_data); mdss_fb_report_panel_dead(pstatus_data->mfd); } drivers/video/msm/mdss/mdss_dsi.c +57 −1 Original line number Diff line number Diff line Loading @@ -1804,11 +1804,14 @@ static int mdss_dsi_ctl_partial_roi(struct mdss_panel_data *pdata) return -EINVAL; } if (!pdata->panel_info.partial_update_enabled) return 0; ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata, panel_data); if (ctrl_pdata->set_col_page_addr) rc = ctrl_pdata->set_col_page_addr(pdata); rc = ctrl_pdata->set_col_page_addr(pdata, false); return rc; } Loading Loading @@ -1881,6 +1884,56 @@ static int mdss_dsi_set_stream_size(struct mdss_panel_data *pdata) return 0; } static int mdss_dsi_reset_write_ptr(struct mdss_panel_data *pdata) { struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL; struct mdss_panel_info *pinfo; int rc = 0; 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); pinfo = &ctrl_pdata->panel_data.panel_info; mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 1); /* Need to reset the DSI core since the pixel stream was stopped. */ mdss_dsi_sw_reset(ctrl_pdata, true); /* * Reset the partial update co-ordinates to the panel height and * width */ if (pinfo->dcs_cmd_by_left && (ctrl_pdata->ndx == 1)) goto skip_cmd_send; pinfo->roi.x = 0; pinfo->roi.y = 0; pinfo->roi.w = pinfo->xres; if (pinfo->dcs_cmd_by_left) pinfo->roi.w = pinfo->xres; if (pdata->next) pinfo->roi.w += pdata->next->panel_info.xres; pinfo->roi.h = pinfo->yres; mdss_dsi_set_stream_size(pdata); if (ctrl_pdata->set_col_page_addr) rc = ctrl_pdata->set_col_page_addr(pdata, true); skip_cmd_send: mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 0); pr_debug("%s: DSI%d write ptr reset finished\n", __func__, ctrl_pdata->ndx); return rc; } int mdss_dsi_register_recovery_handler(struct mdss_dsi_ctrl_pdata *ctrl, struct mdss_intf_recovery *recovery) { Loading Loading @@ -2000,6 +2053,9 @@ static int mdss_dsi_event_handler(struct mdss_panel_data *pdata, case MDSS_EVENT_ENABLE_PARTIAL_ROI: rc = mdss_dsi_ctl_partial_roi(pdata); break; case MDSS_EVENT_DSI_RESET_WRITE_PTR: rc = mdss_dsi_reset_write_ptr(pdata); break; case MDSS_EVENT_DSI_STREAM_SIZE: rc = mdss_dsi_set_stream_size(pdata); break; Loading drivers/video/msm/mdss/mdss_dsi.h +1 −1 Original line number Diff line number Diff line Loading @@ -348,7 +348,7 @@ struct mdss_dsi_ctrl_pdata { int (*post_panel_on)(struct mdss_panel_data *pdata); int (*off) (struct mdss_panel_data *pdata); int (*low_power_config) (struct mdss_panel_data *pdata, int enable); int (*set_col_page_addr) (struct mdss_panel_data *pdata); int (*set_col_page_addr)(struct mdss_panel_data *pdata, bool force); int (*check_status) (struct mdss_dsi_ctrl_pdata *pdata); int (*check_read_status) (struct mdss_dsi_ctrl_pdata *pdata); int (*cmdlist_commit)(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp); Loading drivers/video/msm/mdss/mdss_dsi_host.c +7 −0 Original line number Diff line number Diff line Loading @@ -436,6 +436,7 @@ void mdss_dsi_set_tx_power_mode(int mode, struct mdss_panel_data *pdata) void mdss_dsi_sw_reset(struct mdss_dsi_ctrl_pdata *ctrl, bool restore) { u32 data0; unsigned long flag; if (!ctrl) { pr_err("%s: Invalid input data\n", __func__); Loading Loading @@ -464,6 +465,12 @@ void mdss_dsi_sw_reset(struct mdss_dsi_ctrl_pdata *ctrl, bool restore) MIPI_OUTP(ctrl->ctrl_base + 0x0004, data0); wmb(); /* make sure dsi controller enabled again */ } /* It is safe to clear mdp_busy as reset is happening */ spin_lock_irqsave(&ctrl->mdp_lock, flag); ctrl->mdp_busy = false; complete_all(&ctrl->mdp_comp); spin_unlock_irqrestore(&ctrl->mdp_lock, flag); } static void mdss_dsi_cfg_lane_ctrl(struct mdss_dsi_ctrl_pdata *ctrl, Loading drivers/video/msm/mdss/mdss_dsi_panel.c +4 −3 Original line number Diff line number Diff line Loading @@ -448,7 +448,8 @@ static void mdss_dsi_send_col_page_addr(struct mdss_dsi_ctrl_pdata *ctrl, mdss_dsi_cmdlist_put(ctrl, &cmdreq); } static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata) static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata, bool force_send) { struct mdss_panel_info *pinfo; struct mdss_rect roi = {0}; Loading Loading @@ -487,7 +488,7 @@ static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata) } /* roi had changed, do col_page update */ if (!mdss_rect_cmp(c_roi, &roi)) { if (force_send || !mdss_rect_cmp(c_roi, &roi)) { pr_debug("%s: ndx=%d x=%d y=%d w=%d h=%d\n", __func__, ctrl->ndx, p_roi->x, p_roi->y, p_roi->w, p_roi->h); Loading Loading @@ -1572,8 +1573,8 @@ static int mdss_dsi_parse_panel_features(struct device_node *np, pinfo->partial_update_enabled = pinfo->partial_update_supported; pr_info("%s: partial_update_enabled=%d\n", __func__, pinfo->partial_update_enabled); if (pinfo->partial_update_enabled) { ctrl->set_col_page_addr = mdss_dsi_set_col_page_addr; if (pinfo->partial_update_enabled) { pinfo->partial_update_roi_merge = of_property_read_bool(np, "qcom,partial-update-roi-merge"); Loading Loading
drivers/video/msm/mdss/dsi_status_6g.c +1 −28 Original line number Diff line number Diff line Loading @@ -18,33 +18,6 @@ #include "mdss_dsi.h" #include "mdss_mdp.h" /* * mdss_report_panel_dead() - Sends the PANEL_ALIVE=0 status to HAL layer. * @pstatus_data : dsi status data * * This function is called if the panel fails to respond as expected to * the register read/BTA or if the TE signal is not coming as expected * from the panel. The function sends the PANEL_ALIVE=0 status to HAL * layer. */ static void mdss_report_panel_dead(struct dsi_status_data *pstatus_data) { char *envp[2] = {"PANEL_ALIVE=0", NULL}; struct mdss_panel_data *pdata = dev_get_platdata(&pstatus_data->mfd->pdev->dev); if (!pdata) { pr_err("%s: Panel data not available\n", __func__); return; } pdata->panel_info.panel_dead = true; kobject_uevent_env(&pstatus_data->mfd->fbi->dev->kobj, KOBJ_CHANGE, envp); pr_err("%s: Panel has gone bad, sending uevent - %s\n", __func__, envp[0]); return; } /* * mdss_check_te_status() - Check the status of panel for TE based ESD. * @ctrl_pdata : dsi controller data Loading Loading @@ -210,5 +183,5 @@ void mdss_check_dsi_ctrl_status(struct work_struct *work, uint32_t interval) return; status_dead: mdss_report_panel_dead(pstatus_data); mdss_fb_report_panel_dead(pstatus_data->mfd); }
drivers/video/msm/mdss/mdss_dsi.c +57 −1 Original line number Diff line number Diff line Loading @@ -1804,11 +1804,14 @@ static int mdss_dsi_ctl_partial_roi(struct mdss_panel_data *pdata) return -EINVAL; } if (!pdata->panel_info.partial_update_enabled) return 0; ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata, panel_data); if (ctrl_pdata->set_col_page_addr) rc = ctrl_pdata->set_col_page_addr(pdata); rc = ctrl_pdata->set_col_page_addr(pdata, false); return rc; } Loading Loading @@ -1881,6 +1884,56 @@ static int mdss_dsi_set_stream_size(struct mdss_panel_data *pdata) return 0; } static int mdss_dsi_reset_write_ptr(struct mdss_panel_data *pdata) { struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL; struct mdss_panel_info *pinfo; int rc = 0; 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); pinfo = &ctrl_pdata->panel_data.panel_info; mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 1); /* Need to reset the DSI core since the pixel stream was stopped. */ mdss_dsi_sw_reset(ctrl_pdata, true); /* * Reset the partial update co-ordinates to the panel height and * width */ if (pinfo->dcs_cmd_by_left && (ctrl_pdata->ndx == 1)) goto skip_cmd_send; pinfo->roi.x = 0; pinfo->roi.y = 0; pinfo->roi.w = pinfo->xres; if (pinfo->dcs_cmd_by_left) pinfo->roi.w = pinfo->xres; if (pdata->next) pinfo->roi.w += pdata->next->panel_info.xres; pinfo->roi.h = pinfo->yres; mdss_dsi_set_stream_size(pdata); if (ctrl_pdata->set_col_page_addr) rc = ctrl_pdata->set_col_page_addr(pdata, true); skip_cmd_send: mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 0); pr_debug("%s: DSI%d write ptr reset finished\n", __func__, ctrl_pdata->ndx); return rc; } int mdss_dsi_register_recovery_handler(struct mdss_dsi_ctrl_pdata *ctrl, struct mdss_intf_recovery *recovery) { Loading Loading @@ -2000,6 +2053,9 @@ static int mdss_dsi_event_handler(struct mdss_panel_data *pdata, case MDSS_EVENT_ENABLE_PARTIAL_ROI: rc = mdss_dsi_ctl_partial_roi(pdata); break; case MDSS_EVENT_DSI_RESET_WRITE_PTR: rc = mdss_dsi_reset_write_ptr(pdata); break; case MDSS_EVENT_DSI_STREAM_SIZE: rc = mdss_dsi_set_stream_size(pdata); break; Loading
drivers/video/msm/mdss/mdss_dsi.h +1 −1 Original line number Diff line number Diff line Loading @@ -348,7 +348,7 @@ struct mdss_dsi_ctrl_pdata { int (*post_panel_on)(struct mdss_panel_data *pdata); int (*off) (struct mdss_panel_data *pdata); int (*low_power_config) (struct mdss_panel_data *pdata, int enable); int (*set_col_page_addr) (struct mdss_panel_data *pdata); int (*set_col_page_addr)(struct mdss_panel_data *pdata, bool force); int (*check_status) (struct mdss_dsi_ctrl_pdata *pdata); int (*check_read_status) (struct mdss_dsi_ctrl_pdata *pdata); int (*cmdlist_commit)(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp); Loading
drivers/video/msm/mdss/mdss_dsi_host.c +7 −0 Original line number Diff line number Diff line Loading @@ -436,6 +436,7 @@ void mdss_dsi_set_tx_power_mode(int mode, struct mdss_panel_data *pdata) void mdss_dsi_sw_reset(struct mdss_dsi_ctrl_pdata *ctrl, bool restore) { u32 data0; unsigned long flag; if (!ctrl) { pr_err("%s: Invalid input data\n", __func__); Loading Loading @@ -464,6 +465,12 @@ void mdss_dsi_sw_reset(struct mdss_dsi_ctrl_pdata *ctrl, bool restore) MIPI_OUTP(ctrl->ctrl_base + 0x0004, data0); wmb(); /* make sure dsi controller enabled again */ } /* It is safe to clear mdp_busy as reset is happening */ spin_lock_irqsave(&ctrl->mdp_lock, flag); ctrl->mdp_busy = false; complete_all(&ctrl->mdp_comp); spin_unlock_irqrestore(&ctrl->mdp_lock, flag); } static void mdss_dsi_cfg_lane_ctrl(struct mdss_dsi_ctrl_pdata *ctrl, Loading
drivers/video/msm/mdss/mdss_dsi_panel.c +4 −3 Original line number Diff line number Diff line Loading @@ -448,7 +448,8 @@ static void mdss_dsi_send_col_page_addr(struct mdss_dsi_ctrl_pdata *ctrl, mdss_dsi_cmdlist_put(ctrl, &cmdreq); } static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata) static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata, bool force_send) { struct mdss_panel_info *pinfo; struct mdss_rect roi = {0}; Loading Loading @@ -487,7 +488,7 @@ static int mdss_dsi_set_col_page_addr(struct mdss_panel_data *pdata) } /* roi had changed, do col_page update */ if (!mdss_rect_cmp(c_roi, &roi)) { if (force_send || !mdss_rect_cmp(c_roi, &roi)) { pr_debug("%s: ndx=%d x=%d y=%d w=%d h=%d\n", __func__, ctrl->ndx, p_roi->x, p_roi->y, p_roi->w, p_roi->h); Loading Loading @@ -1572,8 +1573,8 @@ static int mdss_dsi_parse_panel_features(struct device_node *np, pinfo->partial_update_enabled = pinfo->partial_update_supported; pr_info("%s: partial_update_enabled=%d\n", __func__, pinfo->partial_update_enabled); if (pinfo->partial_update_enabled) { ctrl->set_col_page_addr = mdss_dsi_set_col_page_addr; if (pinfo->partial_update_enabled) { pinfo->partial_update_roi_merge = of_property_read_bool(np, "qcom,partial-update-roi-merge"); Loading