Skip to content

Commit

Permalink
gpu: ipu-v3: initially clear all interrupts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Philipp Zabel committed Oct 20, 2016
1 parent eae13c9 commit a92d814
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/gpu/ipu-v3/ipu-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a92d814

Please sign in to comment.