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

Commit 69c00fad authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran
Browse files

msm: mdss: use spin_lock_irqsave while checking the intr status



Use spin_lock_irqsave instead of spin_lock for mdp_lock as the
former would disable the interrupts before acquiring the lock
and saves the previous interrupt state. The states are restored
during spin_unlock_irqrestore. Using raw spin_lock would allow
interrupts and that might lead to deadlock since the mdp_isr_handler
also waits on the same mdp_lock.

Change-Id: If34fe27055b704e9606f772b421662d140fa7ddf
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent 42b00d91
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -572,11 +572,12 @@ void mdss_mdp_irq_disable(u32 intr_type, u32 intf_num)
void mdss_mdp_intr_check_and_clear(u32 intr_type, u32 intf_num)
{
	u32 status, irq;
	unsigned long irq_flags;
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();

	irq = mdss_mdp_irq_mask(intr_type, intf_num);

	spin_lock(&mdp_lock);
	spin_lock_irqsave(&mdp_lock, irq_flags);
	status = irq & readl_relaxed(mdata->mdp_base +
			MDSS_MDP_REG_INTR_STATUS);
	if (status) {
@@ -584,7 +585,7 @@ void mdss_mdp_intr_check_and_clear(u32 intr_type, u32 intf_num)
				intr_type, intf_num);
		writel_relaxed(irq, mdata->mdp_base + MDSS_MDP_REG_INTR_CLEAR);
	}
	spin_unlock(&mdp_lock);
	spin_unlock_irqrestore(&mdp_lock, irq_flags);
}

void mdss_mdp_hist_irq_disable(u32 irq)