Loading drivers/video/msm/mdss/dsi_host_v2.c +5 −3 Original line number Diff line number Diff line Loading @@ -886,17 +886,18 @@ void msm_dsi_cmdlist_rx(struct mdss_dsi_ctrl_pdata *ctrl, if (req->cb) req->cb(len); } void msm_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) int msm_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) { struct dcs_cmd_req *req; int dsi_on; int ret = -EINVAL; mutex_lock(&ctrl->mutex); dsi_on = dsi_host_private->dsi_on; mutex_unlock(&ctrl->mutex); if (!dsi_on) { pr_err("try to send DSI commands while dsi is off\n"); return; return ret; } mutex_lock(&ctrl->cmd_mutex); Loading @@ -904,7 +905,7 @@ void msm_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) if (!req) { mutex_unlock(&ctrl->cmd_mutex); return; return ret; } msm_dsi_clk_ctrl(&ctrl->panel_data, 1); Loading @@ -919,6 +920,7 @@ void msm_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) msm_dsi_clk_ctrl(&ctrl->panel_data, 0); mutex_unlock(&ctrl->cmd_mutex); return 0; } static int msm_dsi_cal_clk_rate(struct mdss_panel_data *pdata, Loading drivers/video/msm/mdss/mdss_dsi.h +2 −2 Original line number Diff line number Diff line Loading @@ -228,7 +228,7 @@ struct mdss_dsi_ctrl_pdata { int (*off) (struct mdss_panel_data *pdata); int (*partial_update_fnc) (struct mdss_panel_data *pdata); int (*check_status) (struct mdss_dsi_ctrl_pdata *pdata); void (*cmdlist_commit)(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp); int (*cmdlist_commit)(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp); struct mdss_panel_data panel_data; unsigned char *ctrl_base; int reg_size; Loading Loading @@ -333,7 +333,7 @@ void mdss_dsi_panel_pwm_cfg(struct mdss_dsi_ctrl_pdata *ctrl); void mdss_dsi_ctrl_init(struct mdss_dsi_ctrl_pdata *ctrl); void mdss_dsi_cmd_mdp_busy(struct mdss_dsi_ctrl_pdata *ctrl); void mdss_dsi_wait4video_done(struct mdss_dsi_ctrl_pdata *ctrl); void mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp); int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp); void mdss_dsi_cmdlist_kickoff(int intf); int mdss_dsi_bta_status_check(struct mdss_dsi_ctrl_pdata *ctrl); Loading drivers/video/msm/mdss/mdss_dsi_cmd.c +2 −3 Original line number Diff line number Diff line Loading @@ -655,7 +655,7 @@ int mdss_dsi_cmdlist_put(struct mdss_dsi_ctrl_pdata *ctrl, { struct dcs_cmd_req *req; struct dcs_cmd_list *clist; int ret = 0; int ret = -EINVAL; mutex_lock(&ctrl->cmd_mutex); clist = &ctrl->cmdlist; Loading @@ -674,7 +674,6 @@ int mdss_dsi_cmdlist_put(struct mdss_dsi_ctrl_pdata *ctrl, } mutex_unlock(&ctrl->cmd_mutex); ret++; pr_debug("%s: tot=%d put=%d get=%d\n", __func__, clist->tot, clist->put, clist->get); Loading @@ -682,7 +681,7 @@ int mdss_dsi_cmdlist_put(struct mdss_dsi_ctrl_pdata *ctrl, if (!ctrl->cmdlist_commit) pr_err("cmdlist_commit not implemented!\n"); else ctrl->cmdlist_commit(ctrl, 0); ret = ctrl->cmdlist_commit(ctrl, 0); } return ret; } Loading drivers/video/msm/mdss/mdss_dsi_host.c +25 −7 Original line number Diff line number Diff line Loading @@ -1156,38 +1156,55 @@ void mdss_dsi_cmd_mdp_busy(struct mdss_dsi_ctrl_pdata *ctrl) __func__, current->pid); } void mdss_dsi_cmdlist_tx(struct mdss_dsi_ctrl_pdata *ctrl, int mdss_dsi_cmdlist_tx(struct mdss_dsi_ctrl_pdata *ctrl, struct dcs_cmd_req *req) { int ret; int ret, ret_val = -EINVAL; ret = mdss_dsi_cmds_tx(ctrl, req->cmds, req->cmds_cnt); if (!IS_ERR_VALUE(ret)) ret_val = 0; if (req->cb) req->cb(ret); return ret_val; } void mdss_dsi_cmdlist_rx(struct mdss_dsi_ctrl_pdata *ctrl, int mdss_dsi_cmdlist_rx(struct mdss_dsi_ctrl_pdata *ctrl, struct dcs_cmd_req *req) { struct dsi_buf *rp; int len = 0; int len = 0, ret = -EINVAL; if (req->rbuf) { rp = &ctrl->rx_buf; len = mdss_dsi_cmds_rx(ctrl, req->cmds, req->rlen); memcpy(req->rbuf, rp->data, rp->len); /* * For dual DSI cases, early return of controller - 0 * is valid. Hence, for those cases the return value * is zero even though we don't send any commands. * */ if ((ctrl->shared_pdata.broadcast_enable && ctrl->ndx == DSI_CTRL_0) || (len != 0)) ret = 0; } else { pr_err("%s: No rx buffer provided\n", __func__); } if (req->cb) req->cb(len); return ret; } void mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) { struct dcs_cmd_req *req; int ret = -EINVAL; mutex_lock(&ctrl->cmd_mutex); req = mdss_dsi_cmdlist_get(ctrl); Loading @@ -1212,9 +1229,9 @@ void mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) mdss_dsi_clk_ctrl(ctrl, 1); if (req->flags & CMD_REQ_RX) mdss_dsi_cmdlist_rx(ctrl, req); ret = mdss_dsi_cmdlist_rx(ctrl, req); else mdss_dsi_cmdlist_tx(ctrl, req); ret = mdss_dsi_cmdlist_tx(ctrl, req); mdss_dsi_clk_ctrl(ctrl, 0); mdss_bus_bandwidth_ctrl(0); Loading @@ -1225,6 +1242,7 @@ need_lock: mdss_dsi_cmd_mdp_start(ctrl); mutex_unlock(&ctrl->cmd_mutex); return ret; } static void dsi_send_events(struct mdss_dsi_ctrl_pdata *ctrl, u32 events) Loading Loading
drivers/video/msm/mdss/dsi_host_v2.c +5 −3 Original line number Diff line number Diff line Loading @@ -886,17 +886,18 @@ void msm_dsi_cmdlist_rx(struct mdss_dsi_ctrl_pdata *ctrl, if (req->cb) req->cb(len); } void msm_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) int msm_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) { struct dcs_cmd_req *req; int dsi_on; int ret = -EINVAL; mutex_lock(&ctrl->mutex); dsi_on = dsi_host_private->dsi_on; mutex_unlock(&ctrl->mutex); if (!dsi_on) { pr_err("try to send DSI commands while dsi is off\n"); return; return ret; } mutex_lock(&ctrl->cmd_mutex); Loading @@ -904,7 +905,7 @@ void msm_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) if (!req) { mutex_unlock(&ctrl->cmd_mutex); return; return ret; } msm_dsi_clk_ctrl(&ctrl->panel_data, 1); Loading @@ -919,6 +920,7 @@ void msm_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) msm_dsi_clk_ctrl(&ctrl->panel_data, 0); mutex_unlock(&ctrl->cmd_mutex); return 0; } static int msm_dsi_cal_clk_rate(struct mdss_panel_data *pdata, Loading
drivers/video/msm/mdss/mdss_dsi.h +2 −2 Original line number Diff line number Diff line Loading @@ -228,7 +228,7 @@ struct mdss_dsi_ctrl_pdata { int (*off) (struct mdss_panel_data *pdata); int (*partial_update_fnc) (struct mdss_panel_data *pdata); int (*check_status) (struct mdss_dsi_ctrl_pdata *pdata); void (*cmdlist_commit)(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp); int (*cmdlist_commit)(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp); struct mdss_panel_data panel_data; unsigned char *ctrl_base; int reg_size; Loading Loading @@ -333,7 +333,7 @@ void mdss_dsi_panel_pwm_cfg(struct mdss_dsi_ctrl_pdata *ctrl); void mdss_dsi_ctrl_init(struct mdss_dsi_ctrl_pdata *ctrl); void mdss_dsi_cmd_mdp_busy(struct mdss_dsi_ctrl_pdata *ctrl); void mdss_dsi_wait4video_done(struct mdss_dsi_ctrl_pdata *ctrl); void mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp); int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp); void mdss_dsi_cmdlist_kickoff(int intf); int mdss_dsi_bta_status_check(struct mdss_dsi_ctrl_pdata *ctrl); Loading
drivers/video/msm/mdss/mdss_dsi_cmd.c +2 −3 Original line number Diff line number Diff line Loading @@ -655,7 +655,7 @@ int mdss_dsi_cmdlist_put(struct mdss_dsi_ctrl_pdata *ctrl, { struct dcs_cmd_req *req; struct dcs_cmd_list *clist; int ret = 0; int ret = -EINVAL; mutex_lock(&ctrl->cmd_mutex); clist = &ctrl->cmdlist; Loading @@ -674,7 +674,6 @@ int mdss_dsi_cmdlist_put(struct mdss_dsi_ctrl_pdata *ctrl, } mutex_unlock(&ctrl->cmd_mutex); ret++; pr_debug("%s: tot=%d put=%d get=%d\n", __func__, clist->tot, clist->put, clist->get); Loading @@ -682,7 +681,7 @@ int mdss_dsi_cmdlist_put(struct mdss_dsi_ctrl_pdata *ctrl, if (!ctrl->cmdlist_commit) pr_err("cmdlist_commit not implemented!\n"); else ctrl->cmdlist_commit(ctrl, 0); ret = ctrl->cmdlist_commit(ctrl, 0); } return ret; } Loading
drivers/video/msm/mdss/mdss_dsi_host.c +25 −7 Original line number Diff line number Diff line Loading @@ -1156,38 +1156,55 @@ void mdss_dsi_cmd_mdp_busy(struct mdss_dsi_ctrl_pdata *ctrl) __func__, current->pid); } void mdss_dsi_cmdlist_tx(struct mdss_dsi_ctrl_pdata *ctrl, int mdss_dsi_cmdlist_tx(struct mdss_dsi_ctrl_pdata *ctrl, struct dcs_cmd_req *req) { int ret; int ret, ret_val = -EINVAL; ret = mdss_dsi_cmds_tx(ctrl, req->cmds, req->cmds_cnt); if (!IS_ERR_VALUE(ret)) ret_val = 0; if (req->cb) req->cb(ret); return ret_val; } void mdss_dsi_cmdlist_rx(struct mdss_dsi_ctrl_pdata *ctrl, int mdss_dsi_cmdlist_rx(struct mdss_dsi_ctrl_pdata *ctrl, struct dcs_cmd_req *req) { struct dsi_buf *rp; int len = 0; int len = 0, ret = -EINVAL; if (req->rbuf) { rp = &ctrl->rx_buf; len = mdss_dsi_cmds_rx(ctrl, req->cmds, req->rlen); memcpy(req->rbuf, rp->data, rp->len); /* * For dual DSI cases, early return of controller - 0 * is valid. Hence, for those cases the return value * is zero even though we don't send any commands. * */ if ((ctrl->shared_pdata.broadcast_enable && ctrl->ndx == DSI_CTRL_0) || (len != 0)) ret = 0; } else { pr_err("%s: No rx buffer provided\n", __func__); } if (req->cb) req->cb(len); return ret; } void mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) { struct dcs_cmd_req *req; int ret = -EINVAL; mutex_lock(&ctrl->cmd_mutex); req = mdss_dsi_cmdlist_get(ctrl); Loading @@ -1212,9 +1229,9 @@ void mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp) mdss_dsi_clk_ctrl(ctrl, 1); if (req->flags & CMD_REQ_RX) mdss_dsi_cmdlist_rx(ctrl, req); ret = mdss_dsi_cmdlist_rx(ctrl, req); else mdss_dsi_cmdlist_tx(ctrl, req); ret = mdss_dsi_cmdlist_tx(ctrl, req); mdss_dsi_clk_ctrl(ctrl, 0); mdss_bus_bandwidth_ctrl(0); Loading @@ -1225,6 +1242,7 @@ need_lock: mdss_dsi_cmd_mdp_start(ctrl); mutex_unlock(&ctrl->cmd_mutex); return ret; } static void dsi_send_events(struct mdss_dsi_ctrl_pdata *ctrl, u32 events) Loading