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

Commit 5b5116de 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: dsi: use right mask to confirm dma transfer done"

parents 6cc6371c ffb17742
Loading
Loading
Loading
Loading
+10 −11
Original line number Diff line number Diff line
@@ -1741,28 +1741,27 @@ static int mdss_dsi_cmd_dma_tx(struct mdss_dsi_ctrl_pdata *ctrl,

	ret = wait_for_completion_timeout(&ctrl->dma_comp,
				msecs_to_jiffies(DMA_TX_TIMEOUT));

	if (ret <= 0) {
		u32 reg_val, status, mask;
	if (ret == 0) {
		u32 reg_val, status;

		reg_val = MIPI_INP(ctrl->ctrl_base + 0x0110);/* DSI_INTR_CTRL */
		mask = reg_val & DSI_INTR_CMD_DMA_DONE_MASK;
		status = mask & reg_val;
		status = reg_val & DSI_INTR_CMD_DMA_DONE;
		if (status) {
			pr_warn("dma tx done but irq not triggered\n");
			reg_val &= DSI_INTR_MASK_ALL;
			/* clear CMD DMA isr only */
			reg_val |= DSI_INTR_CMD_DMA_DONE;
			MIPI_OUTP(ctrl->ctrl_base + 0x0110, reg_val);
			mdss_dsi_disable_irq_nosync(ctrl, DSI_MDP_TERM);
			mdss_dsi_disable_irq_nosync(ctrl, DSI_CMD_TERM);
			complete(&ctrl->dma_comp);
			ret = 1;

			pr_warn("%s: dma tx done but irq not triggered\n",
				__func__);
		} else {
			ret = -ETIMEDOUT;
		}
	}

	if (ret == 0)
		ret = -ETIMEDOUT;
	else
	if (!IS_ERR_VALUE(ret))
		ret = tp->len;

	if (mctrl && mctrl->dma_addr) {