disp: msm: dsi: avoid taking ctrl lock while waiting for CMD DMA done
Currently, ctrl lock is taken while waiting for CMD DMA done even in case of ASYNC command transfer, which doesn't allow any other operation on the controller until the command transfer is done. Avoid this by not taking ctrl lock while waiting for CMD DMA done. Change-Id: I91f2638fa02f48ec4c7a41c750daa46b52c5e2f2 Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
68e4c1a426
commit
0331bcf0fe
@@ -419,20 +419,21 @@ static void dsi_ctrl_clear_dma_status(struct dsi_ctrl *dsi_ctrl)
|
|||||||
|
|
||||||
dsi_hw_ops = dsi_ctrl->hw.ops;
|
dsi_hw_ops = dsi_ctrl->hw.ops;
|
||||||
|
|
||||||
|
mutex_lock(&dsi_ctrl->ctrl_lock);
|
||||||
|
|
||||||
status = dsi_hw_ops.poll_dma_status(&dsi_ctrl->hw);
|
status = dsi_hw_ops.poll_dma_status(&dsi_ctrl->hw);
|
||||||
SDE_EVT32(dsi_ctrl->cell_index, SDE_EVTLOG_FUNC_ENTRY, status);
|
SDE_EVT32(dsi_ctrl->cell_index, SDE_EVTLOG_FUNC_ENTRY, status);
|
||||||
|
|
||||||
status |= (DSI_CMD_MODE_DMA_DONE | DSI_BTA_DONE);
|
status |= (DSI_CMD_MODE_DMA_DONE | DSI_BTA_DONE);
|
||||||
dsi_hw_ops.clear_interrupt_status(&dsi_ctrl->hw, status);
|
dsi_hw_ops.clear_interrupt_status(&dsi_ctrl->hw, status);
|
||||||
|
|
||||||
|
mutex_unlock(&dsi_ctrl->ctrl_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dsi_ctrl_post_cmd_transfer(struct dsi_ctrl *dsi_ctrl)
|
static void dsi_ctrl_post_cmd_transfer(struct dsi_ctrl *dsi_ctrl)
|
||||||
{
|
{
|
||||||
struct dsi_ctrl_hw_ops dsi_hw_ops = dsi_ctrl->hw.ops;
|
struct dsi_ctrl_hw_ops dsi_hw_ops = dsi_ctrl->hw.ops;
|
||||||
|
|
||||||
mutex_lock(&dsi_ctrl->ctrl_lock);
|
|
||||||
|
|
||||||
SDE_EVT32(SDE_EVTLOG_FUNC_ENTRY, dsi_ctrl->cell_index, dsi_ctrl->pending_cmd_flags);
|
SDE_EVT32(SDE_EVTLOG_FUNC_ENTRY, dsi_ctrl->cell_index, dsi_ctrl->pending_cmd_flags);
|
||||||
|
|
||||||
/* In case of broadcast messages, we poll on the slave controller. */
|
/* In case of broadcast messages, we poll on the slave controller. */
|
||||||
@@ -444,6 +445,8 @@ static void dsi_ctrl_post_cmd_transfer(struct dsi_ctrl *dsi_ctrl)
|
|||||||
dsi_ctrl_dma_cmd_wait_for_done(dsi_ctrl);
|
dsi_ctrl_dma_cmd_wait_for_done(dsi_ctrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mutex_lock(&dsi_ctrl->ctrl_lock);
|
||||||
|
|
||||||
if (dsi_ctrl->hw.reset_trig_ctrl)
|
if (dsi_ctrl->hw.reset_trig_ctrl)
|
||||||
dsi_hw_ops.reset_trig_ctrl(&dsi_ctrl->hw,
|
dsi_hw_ops.reset_trig_ctrl(&dsi_ctrl->hw,
|
||||||
&dsi_ctrl->host_config.common_config);
|
&dsi_ctrl->host_config.common_config);
|
||||||
|
Reference in New Issue
Block a user