diff --git a/msm/dsi/dsi_ctrl.c b/msm/dsi/dsi_ctrl.c index 2cb3950bca..6a5c542af2 100644 --- a/msm/dsi/dsi_ctrl.c +++ b/msm/dsi/dsi_ctrl.c @@ -419,20 +419,21 @@ static void dsi_ctrl_clear_dma_status(struct dsi_ctrl *dsi_ctrl) dsi_hw_ops = dsi_ctrl->hw.ops; + mutex_lock(&dsi_ctrl->ctrl_lock); + status = dsi_hw_ops.poll_dma_status(&dsi_ctrl->hw); SDE_EVT32(dsi_ctrl->cell_index, SDE_EVTLOG_FUNC_ENTRY, status); status |= (DSI_CMD_MODE_DMA_DONE | DSI_BTA_DONE); 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) { 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); /* 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); } + mutex_lock(&dsi_ctrl->ctrl_lock); + if (dsi_ctrl->hw.reset_trig_ctrl) dsi_hw_ops.reset_trig_ctrl(&dsi_ctrl->hw, &dsi_ctrl->host_config.common_config);