소스 검색

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();
 	}
 }