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

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

Merge "msm: mdss: send DSI command using TPG when in secure session"

parents 83009919 53c5d2a0
Loading
Loading
Loading
Loading
+17 −5
Original line number Diff line number Diff line
@@ -2533,9 +2533,6 @@ int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp)
	bool hs_req = false;
	bool cmd_mutex_acquired = false;

	if (mdss_get_sd_client_cnt())
		return -EPERM;

	if (from_mdp) {	/* from mdp kickoff */
		if (!ctrl->burst_mode_enabled) {
			mutex_lock(&ctrl->cmd_mutex);
@@ -2563,6 +2560,21 @@ int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp)
		mdss_dsi_cmd_mdp_busy(ctrl);
	}

	/*
	 * if secure display session is enabled
	 * and DSI controller version is above 1.3.0,
	 * then send DSI commands using TPG FIFO.
	 */
	if (mdss_get_sd_client_cnt() && req) {
		if (ctrl->shared_data->hw_rev >= MDSS_DSI_HW_REV_103) {
			req->flags |= CMD_REQ_DMA_TPG;
		} else {
			if (cmd_mutex_acquired)
				mutex_unlock(&ctrl->cmd_mutex);
			return -EPERM;
		}
	}

	/* For DSI versions less than 1.3.0, CMD DMA TPG is not supported */
	if (req && (ctrl->shared_data->hw_rev < MDSS_DSI_HW_REV_103))
		req->flags &= ~CMD_REQ_DMA_TPG;
@@ -2651,10 +2663,10 @@ int mdss_dsi_cmdlist_commit(struct mdss_dsi_ctrl_pdata *ctrl, int from_mdp)
			ctrl->mdss_util->iommu_ctrl(0);

		(void)mdss_dsi_bus_bandwidth_vote(ctrl->shared_data, false);
		mdss_dsi_clk_ctrl(ctrl, ctrl->dsi_clk_handle, MDSS_DSI_ALL_CLKS,
			  MDSS_DSI_CLK_OFF);
	}

	mdss_dsi_clk_ctrl(ctrl, ctrl->dsi_clk_handle, MDSS_DSI_ALL_CLKS,
			MDSS_DSI_CLK_OFF);
need_lock:

	MDSS_XLOG(ctrl->ndx, from_mdp, ctrl->mdp_busy, current->pid,