summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/ipu-v3/ipu-common.c
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2016-08-29 08:32:03 +0200
committerPhilipp Zabel <p.zabel@pengutronix.de>2016-10-20 14:40:21 +0200
commita92d81456c08ea6917a7630718837f0a01cbd0d0 (patch)
treeaed5d45b049d1509ee64d31c90ce0fa337c79349 /drivers/gpu/ipu-v3/ipu-common.c
parentdrm/imx: ipuv3-plane: add support for YUV 4:2:2 and 4:4:4, NV12, and NV16 for... (diff)
downloadlinux-a92d81456c08ea6917a7630718837f0a01cbd0d0.tar.xz
linux-a92d81456c08ea6917a7630718837f0a01cbd0d0.zip
gpu: ipu-v3: initially clear all interrupts
If we want to stop resetting the IPU in the future, masking all interrupts before registering the irq handlers will not be enough to avoid spurious interrupts. We also have to clear them. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Liu Ying <gnuiyl@gmail.com>
Diffstat (limited to 'drivers/gpu/ipu-v3/ipu-common.c')
-rw-r--r--drivers/gpu/ipu-v3/ipu-common.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index b7d7bd6e3d60..97218af4fe75 100644
--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -1286,8 +1286,11 @@ static int ipu_irq_init(struct ipu_soc *ipu)
return ret;
}
- for (i = 0; i < IPU_NUM_IRQS; i += 32)
+ /* Mask and clear all interrupts */
+ for (i = 0; i < IPU_NUM_IRQS; i += 32) {
ipu_cm_write(ipu, 0, IPU_INT_CTRL(i / 32));
+ ipu_cm_write(ipu, ~unused[i / 32], IPU_INT_STAT(i / 32));
+ }
for (i = 0; i < IPU_NUM_IRQS; i += 32) {
gc = irq_get_domain_generic_chip(ipu->domain, i);