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

Commit d925caec authored by Kuogee Hsieh's avatar Kuogee Hsieh
Browse files

msm: mdss: disable irq to enforce mutex within dsi_event_thread



Mdp spin lock is used in dsi_event_thread and in irq context.
Disable irq while holding spinlock to avoid context switching
into irq context and cause spinlock recursion

CRs-fixed: 652850
Change-Id: I4bd8cadb1f5d83acc7e866344b7585e7944e08ac
Signed-off-by: default avatarKuogee Hsieh <khsieh@codeaurora.org>
parent 6791a1be
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1351,11 +1351,11 @@ static int dsi_event_thread(void *data)
		}

		if (todo & DSI_EV_MDP_BUSY_RELEASE) {
			spin_lock(&ctrl->mdp_lock);
			spin_lock_irqsave(&ctrl->mdp_lock, flag);
			ctrl->mdp_busy = false;
			mdss_dsi_disable_irq_nosync(ctrl, DSI_MDP_TERM);
			complete(&ctrl->mdp_comp);
			spin_unlock(&ctrl->mdp_lock);
			spin_unlock_irqrestore(&ctrl->mdp_lock, flag);

			/* enable dsi error interrupt */
			mdss_dsi_err_intr_ctrl(ctrl, DSI_INTR_ERROR_MASK, 1);