Преглед на файлове

disp: msm: dp: clear all dp interrupts before deinit

If there are any uncleared DP interrupts before deinitialing
and turning off the clocks, the interrupt might get stuck at
the MDP level and can't be cleared without turning the DP
clocks back on. To avoid this situation, this change clears
all the interrupts before turning off the clocks.

Change-Id: Id13b102fa81c85f92ae8c1d11ffaf7d5bad5fd12
Signed-off-by: Rajkumar Subbiah <[email protected]>
Rajkumar Subbiah преди 3 години
родител
ревизия
29534b6d5c
променени са 1 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. 8 0
      msm/dp/dp_catalog.c

+ 8 - 0
msm/dp/dp_catalog.c

@@ -1684,9 +1684,17 @@ static void dp_catalog_ctrl_enable_irq(struct dp_catalog_ctrl *ctrl,
 		dp_write(DP_INTR_STATUS2, DP_INTR_MASK2);
 		dp_write(DP_INTR_STATUS5, DP_INTR_MASK5);
 	} else {
+		/* disable interrupts */
 		dp_write(DP_INTR_STATUS, 0x00);
 		dp_write(DP_INTR_STATUS2, 0x00);
 		dp_write(DP_INTR_STATUS5, 0x00);
+		wmb();
+
+		/* clear all pending interrupts */
+		dp_write(DP_INTR_STATUS, DP_INTERRUPT_STATUS1 << 1);
+		dp_write(DP_INTR_STATUS2, DP_INTERRUPT_STATUS2 << 1);
+		dp_write(DP_INTR_STATUS5, DP_INTERRUPT_STATUS5 << 1);
+		wmb();
 	}
 }