disp: msm: dsi: add new function to cleanup post command transfer
Currently we are always doing command transfer cleanup which includes disabling command engine, clocks, gdsc and unmasking overflow interrupt as part of post command transfer function only after CMD DMA wait is done. Cleanup should also be done if an ESD failure happens before kickoff of a batch command. Organize code so that command transfer cleanup can be done irrespective of whether command kickoff is done or not. Change-Id: Ieb92daa7f5da62c16c71f1b23ceff20adfbf3621 Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
8ef80f7cf4
commit
ddb854d52d
@@ -3399,7 +3399,8 @@ static int dsi_host_detach(struct mipi_dsi_host *host,
|
||||
int dsi_host_transfer_sub(struct mipi_dsi_host *host, struct dsi_cmd_desc *cmd)
|
||||
{
|
||||
struct dsi_display *display;
|
||||
int rc = 0;
|
||||
struct dsi_display_ctrl *ctrl;
|
||||
int i, rc = 0;
|
||||
|
||||
if (!host || !cmd) {
|
||||
DSI_ERR("Invalid params\n");
|
||||
@@ -3414,6 +3415,16 @@ int dsi_host_transfer_sub(struct mipi_dsi_host *host, struct dsi_cmd_desc *cmd)
|
||||
/* Avoid sending DCS commands when ESD recovery is pending */
|
||||
if (atomic_read(&display->panel->esd_recovery_pending)) {
|
||||
DSI_DEBUG("ESD recovery pending\n");
|
||||
display_for_each_ctrl(i, display) {
|
||||
ctrl = &display->ctrl[i];
|
||||
if ((!ctrl) || (!ctrl->ctrl))
|
||||
continue;
|
||||
if ((ctrl->ctrl->pending_cmd_flags & DSI_CTRL_CMD_FETCH_MEMORY) &&
|
||||
ctrl->ctrl->cmd_len != 0) {
|
||||
dsi_ctrl_transfer_cleanup(ctrl->ctrl);
|
||||
ctrl->ctrl->cmd_len = 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user