Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e5f2f63 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mdss: display: extend mutex coverage inside cmdlist_put"

parents d33afa92 2b4ba591
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -969,6 +969,7 @@ int msm_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp)
		return ret;
	}

	if (from_mdp)	/* from mdp kickoff */
		mutex_lock(&ctrl->cmd_mutex);
	req = mdss_dsi_cmdlist_get(ctrl);

@@ -999,6 +1000,7 @@ int msm_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp)
	msm_dsi_clk_ctrl(&ctrl->panel_data, 0);
	mdp3_res_update(0, 1, MDP3_CLIENT_DMA_P);

	if (from_mdp)	/* from mdp kickoff */
		mutex_unlock(&ctrl->cmd_mutex);
	return 0;
}
+2 −1
Original line number Diff line number Diff line
@@ -671,7 +671,6 @@ int mdss_dsi_cmdlist_put(struct mdss_dsi_ctrl_pdata *ctrl,
		clist->get %= CMD_REQ_MAX;
		clist->tot--;
	}
	mutex_unlock(&ctrl->cmd_mutex);

	pr_debug("%s: tot=%d put=%d get=%d\n", __func__,
		clist->tot, clist->put, clist->get);
@@ -682,6 +681,8 @@ int mdss_dsi_cmdlist_put(struct mdss_dsi_ctrl_pdata *ctrl,
		else
			ret = ctrl->cmdlist_commit(ctrl, 0);
	}
	mutex_unlock(&ctrl->cmd_mutex);

	return ret;
}
+10 −5
Original line number Diff line number Diff line
@@ -1319,7 +1319,10 @@ int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp)
	struct dcs_cmd_req *req;
	int ret = -EINVAL;
	int rc = 0;

	if (from_mdp)	/* from mdp kickoff */
		mutex_lock(&ctrl->cmd_mutex);

	req = mdss_dsi_cmdlist_get(ctrl);

	MDSS_XLOG(ctrl->ndx, from_mdp, ctrl->mdp_busy, current->pid,
@@ -1362,15 +1365,17 @@ int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp)

need_lock:

	if (from_mdp) { /* from pipe_commit */
	MDSS_XLOG(ctrl->ndx, from_mdp, ctrl->mdp_busy, current->pid,
							XLOG_FUNC_EXIT);

	if (from_mdp) { /* from mdp kickoff */
		/* acquire lock only has new frame update */
		if (ctrl->roi.w != 0 || ctrl->roi.h != 0)
			mdss_dsi_cmd_mdp_start(ctrl);
	}

	MDSS_XLOG(ctrl->ndx, from_mdp, ctrl->mdp_busy, current->pid,
							XLOG_FUNC_EXIT);
		mutex_unlock(&ctrl->cmd_mutex);
	}

	return ret;
}