Skip to content

Commit 09bb81c

Browse files
kwachowssgruszka
authored andcommitted
accel/ivpu/40xx: Fix missing VPUIP interrupts
Move sequence of masking and unmasking global interrupts from buttress interrupt handler to generic one that handles both VPUIP and BTRS interrupts. Unmasking global interrupts will re-trigger MSI for any pending interrupts. Lack of this sequence can randomly cause to miss any VPUIP interrupt that comes after reading VPU_40XX_HOST_SS_ICB_STATUS_0 and before clearing all active interrupt sources. Fixes: 79cdc56 ("accel/ivpu: Add initial support for VPU 4") Signed-off-by: Karol Wachowski <[email protected]> Reviewed-by: Stanislaw Gruszka <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent ec3e3ad commit 09bb81c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

drivers/accel/ivpu/ivpu_hw_40xx.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,9 +1059,6 @@ static irqreturn_t ivpu_hw_40xx_irqb_handler(struct ivpu_device *vdev, int irq)
10591059
if (status == 0)
10601060
return IRQ_NONE;
10611061

1062-
/* Disable global interrupt before handling local buttress interrupts */
1063-
REGB_WR32(VPU_40XX_BUTTRESS_GLOBAL_INT_MASK, 0x1);
1064-
10651062
if (REG_TEST_FLD(VPU_40XX_BUTTRESS_INTERRUPT_STAT, FREQ_CHANGE, status))
10661063
ivpu_dbg(vdev, IRQ, "FREQ_CHANGE");
10671064

@@ -1109,9 +1106,6 @@ static irqreturn_t ivpu_hw_40xx_irqb_handler(struct ivpu_device *vdev, int irq)
11091106
/* This must be done after interrupts are cleared at the source. */
11101107
REGB_WR32(VPU_40XX_BUTTRESS_INTERRUPT_STAT, status);
11111108

1112-
/* Re-enable global interrupt */
1113-
REGB_WR32(VPU_40XX_BUTTRESS_GLOBAL_INT_MASK, 0x0);
1114-
11151109
if (schedule_recovery)
11161110
ivpu_pm_schedule_recovery(vdev);
11171111

@@ -1123,9 +1117,14 @@ static irqreturn_t ivpu_hw_40xx_irq_handler(int irq, void *ptr)
11231117
struct ivpu_device *vdev = ptr;
11241118
irqreturn_t ret = IRQ_NONE;
11251119

1120+
REGB_WR32(VPU_40XX_BUTTRESS_GLOBAL_INT_MASK, 0x1);
1121+
11261122
ret |= ivpu_hw_40xx_irqv_handler(vdev, irq);
11271123
ret |= ivpu_hw_40xx_irqb_handler(vdev, irq);
11281124

1125+
/* Re-enable global interrupts to re-trigger MSI for pending interrupts */
1126+
REGB_WR32(VPU_40XX_BUTTRESS_GLOBAL_INT_MASK, 0x0);
1127+
11291128
if (ret & IRQ_WAKE_THREAD)
11301129
return IRQ_WAKE_THREAD;
11311130

0 commit comments

Comments
 (0)