msm: mdss: remove unnecessary lock in checking DSI status
Since DSI status checking is purely DSI operation, it's not necessary to acquire ov_lock in case of video mode, otherwise this function could block other overlay functions, therefore introducing extra delay. CRs-fixed: 714531 Change-Id: I5051ff3495d516b405cd3bf5dc32ea712187975e Signed-off-by: Ray Zhang <rayz@codeaurora.org>
This commit is contained in:
parent
eca7092bac
commit
e2e79b5fe8
1 changed files with 16 additions and 9 deletions
|
@ -31,6 +31,7 @@ void mdss_check_dsi_ctrl_status(struct work_struct *work, uint32_t interval)
|
|||
{
|
||||
struct dsi_status_data *pstatus_data = NULL;
|
||||
struct mdss_panel_data *pdata = NULL;
|
||||
struct mipi_panel_info *mipi = NULL;
|
||||
struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL;
|
||||
struct mdss_overlay_private *mdp5_data = NULL;
|
||||
struct mdss_mdp_ctl *ctl = NULL;
|
||||
|
@ -48,6 +49,7 @@ void mdss_check_dsi_ctrl_status(struct work_struct *work, uint32_t interval)
|
|||
pr_err("%s: Panel data not available\n", __func__);
|
||||
return;
|
||||
}
|
||||
mipi = &pdata->panel_info.mipi;
|
||||
|
||||
ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata,
|
||||
panel_data);
|
||||
|
@ -73,14 +75,20 @@ void mdss_check_dsi_ctrl_status(struct work_struct *work, uint32_t interval)
|
|||
}
|
||||
|
||||
mutex_lock(&ctrl_pdata->mutex);
|
||||
if (ctl->shared_lock)
|
||||
mutex_lock(ctl->shared_lock);
|
||||
|
||||
/*
|
||||
* TODO: Because mdss_dsi_cmd_mdp_busy has made sure DMA to
|
||||
* be idle in mdss_dsi_cmdlist_commit, it is not necessary
|
||||
* to acquire ov_lock in case of video mode. Removing this
|
||||
* lock to fix issues so that ESD thread would not block other
|
||||
* overlay operations. Need refine this lock for command mode
|
||||
*/
|
||||
if (mipi->mode == DSI_CMD_MODE)
|
||||
mutex_lock(&mdp5_data->ov_lock);
|
||||
|
||||
if (mdss_panel_is_power_off(pstatus_data->mfd->panel_power_state)) {
|
||||
if (mipi->mode == DSI_CMD_MODE)
|
||||
mutex_unlock(&mdp5_data->ov_lock);
|
||||
if (ctl->shared_lock)
|
||||
mutex_unlock(ctl->shared_lock);
|
||||
mutex_unlock(&ctrl_pdata->mutex);
|
||||
pr_err("%s: DSI turning off, avoiding panel status check\n",
|
||||
__func__);
|
||||
|
@ -106,9 +114,8 @@ void mdss_check_dsi_ctrl_status(struct work_struct *work, uint32_t interval)
|
|||
ret = ctrl_pdata->check_status(ctrl_pdata);
|
||||
mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF);
|
||||
|
||||
if (mipi->mode == DSI_CMD_MODE)
|
||||
mutex_unlock(&mdp5_data->ov_lock);
|
||||
if (ctl->shared_lock)
|
||||
mutex_unlock(ctl->shared_lock);
|
||||
mutex_unlock(&ctrl_pdata->mutex);
|
||||
|
||||
if ((pstatus_data->mfd->panel_power_state == MDSS_PANEL_POWER_ON)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue