Merge "disp: msm: dsi: add new function to cleanup post command transfer"

This commit is contained in:
qctecmdr
2023-05-08 11:44:03 -07:00
committed by Gerrit - the friendly Code Review server
commit 6ce26bb091
3 muutettua tiedostoa jossa 52 lisäystä ja 24 poistoa

Näytä tiedosto

@@ -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;
}