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

Commit c48e0f61 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: avoid corner cases with DSI_INT_CTRL register read/write"

parents 4b89e0e7 3df330be
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -163,6 +163,8 @@ enum dsi_pm_type {
#define DSI_INTR_CMD_MDP_DONE		BIT(8)
#define DSI_INTR_CMD_DMA_DONE_MASK	BIT(1)
#define DSI_INTR_CMD_DMA_DONE		BIT(0)
/* Update this if more interrupt masks are added in future chipsets */
#define DSI_INTR_TOTAL_MASK		0x2222AA02

#define DSI_CMD_TRIGGER_NONE		0x0	/* mdp trigger */
#define DSI_CMD_TRIGGER_TE		0x02
+6 −0
Original line number Diff line number Diff line
@@ -719,6 +719,7 @@ void mdss_dsi_err_intr_ctrl(struct mdss_dsi_ctrl_pdata *ctrl, u32 mask,
	u32 intr;

	intr = MIPI_INP(ctrl->ctrl_base + 0x0110);
	intr &= DSI_INTR_TOTAL_MASK;

	if (enable)
		intr |= mask;
@@ -787,6 +788,7 @@ void mdss_dsi_restore_intr_mask(struct mdss_dsi_ctrl_pdata *ctrl)
	u32 mask;

	mask = MIPI_INP((ctrl->ctrl_base) + 0x0110);
	mask &= DSI_INTR_TOTAL_MASK;
	mask |= (DSI_INTR_CMD_DMA_DONE_MASK | DSI_INTR_ERROR_MASK |
				DSI_INTR_BTA_DONE_MASK);
	MIPI_OUTP((ctrl->ctrl_base) + 0x0110, mask);
@@ -1685,6 +1687,7 @@ void mdss_dsi_en_wait4dynamic_done(struct mdss_dsi_ctrl_pdata *ctrl)
	u32 data;
	/* DSI_INTL_CTRL */
	data = MIPI_INP((ctrl->ctrl_base) + 0x0110);
	data &= DSI_INTR_TOTAL_MASK;
	data |= DSI_INTR_DYNAMIC_REFRESH_MASK;
	MIPI_OUTP((ctrl->ctrl_base) + 0x0110, data);

@@ -1700,6 +1703,7 @@ void mdss_dsi_en_wait4dynamic_done(struct mdss_dsi_ctrl_pdata *ctrl)
		pr_err("Dynamic interrupt timedout\n");

	data = MIPI_INP((ctrl->ctrl_base) + 0x0110);
	data &= DSI_INTR_TOTAL_MASK;
	data &= ~DSI_INTR_DYNAMIC_REFRESH_MASK;
	MIPI_OUTP((ctrl->ctrl_base) + 0x0110, data);
}
@@ -1711,6 +1715,7 @@ void mdss_dsi_wait4video_done(struct mdss_dsi_ctrl_pdata *ctrl)

	/* DSI_INTL_CTRL */
	data = MIPI_INP((ctrl->ctrl_base) + 0x0110);
	data &= DSI_INTR_TOTAL_MASK;
	data |= DSI_INTR_VIDEO_DONE_MASK;

	MIPI_OUTP((ctrl->ctrl_base) + 0x0110, data);
@@ -1724,6 +1729,7 @@ void mdss_dsi_wait4video_done(struct mdss_dsi_ctrl_pdata *ctrl)
			msecs_to_jiffies(VSYNC_PERIOD * 4));

	data = MIPI_INP((ctrl->ctrl_base) + 0x0110);
	data &= DSI_INTR_TOTAL_MASK;
	data &= ~DSI_INTR_VIDEO_DONE_MASK;
	MIPI_OUTP((ctrl->ctrl_base) + 0x0110, data);
}