From: Greg Kroah-Hartman Date: Tue, 31 Oct 2023 12:02:48 +0000 (+0100) Subject: 6.5-stable patches X-Git-Tag: v6.1.61~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a54e5994b3f2c13fb452f02790cd9eb3abf4f3be;p=thirdparty%2Fkernel%2Fstable-queue.git 6.5-stable patches added patches: accel-ivpu-37xx-fix-missing-vpuip-interrupts.patch --- diff --git a/queue-6.5/accel-ivpu-37xx-fix-missing-vpuip-interrupts.patch b/queue-6.5/accel-ivpu-37xx-fix-missing-vpuip-interrupts.patch new file mode 100644 index 00000000000..6f2275e5a1a --- /dev/null +++ b/queue-6.5/accel-ivpu-37xx-fix-missing-vpuip-interrupts.patch @@ -0,0 +1,66 @@ +From b132ac51d7a50c37683be56c96ff64f8c887930f Mon Sep 17 00:00:00 2001 +From: Karol Wachowski +Date: Tue, 24 Oct 2023 18:19:52 +0200 +Subject: accel/ivpu/37xx: Fix missing VPUIP interrupts + +From: Karol Wachowski + +commit b132ac51d7a50c37683be56c96ff64f8c887930f upstream. + +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 will cause the driver to miss any +VPUIP interrupt that comes after reading VPU_37XX_HOST_SS_ICB_STATUS_0 +and before clearing all active interrupt sources. + +Fixes: 35b137630f08 ("accel/ivpu: Introduce a new DRM driver for Intel VPU") +Cc: stable@vger.kernel.org +Signed-off-by: Karol Wachowski +Reviewed-by: Stanislaw Gruszka +Signed-off-by: Stanislaw Gruszka +Link: https://patchwork.freedesktop.org/patch/msgid/20231024161952.759914-1-stanislaw.gruszka@linux.intel.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/accel/ivpu/ivpu_hw_mtl.c | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +--- a/drivers/accel/ivpu/ivpu_hw_mtl.c ++++ b/drivers/accel/ivpu/ivpu_hw_mtl.c +@@ -953,9 +953,6 @@ static u32 ivpu_hw_mtl_irqb_handler(stru + if (status == 0) + return 0; + +- /* Disable global interrupt before handling local buttress interrupts */ +- REGB_WR32(MTL_BUTTRESS_GLOBAL_INT_MASK, 0x1); +- + if (REG_TEST_FLD(MTL_BUTTRESS_INTERRUPT_STAT, FREQ_CHANGE, status)) + ivpu_dbg(vdev, IRQ, "FREQ_CHANGE irq: %08x", REGB_RD32(MTL_BUTTRESS_CURRENT_PLL)); + +@@ -986,9 +983,6 @@ static u32 ivpu_hw_mtl_irqb_handler(stru + else + REGB_WR32(MTL_BUTTRESS_INTERRUPT_STAT, status); + +- /* Re-enable global interrupt */ +- REGB_WR32(MTL_BUTTRESS_GLOBAL_INT_MASK, 0x0); +- + if (schedule_recovery) + ivpu_pm_schedule_recovery(vdev); + +@@ -1000,9 +994,14 @@ static irqreturn_t ivpu_hw_mtl_irq_handl + struct ivpu_device *vdev = ptr; + u32 ret_irqv, ret_irqb; + ++ REGB_WR32(MTL_BUTTRESS_GLOBAL_INT_MASK, 0x1); ++ + ret_irqv = ivpu_hw_mtl_irqv_handler(vdev, irq); + ret_irqb = ivpu_hw_mtl_irqb_handler(vdev, irq); + ++ /* Re-enable global interrupts to re-trigger MSI for pending interrupts */ ++ REGB_WR32(MTL_BUTTRESS_GLOBAL_INT_MASK, 0x0); ++ + return IRQ_RETVAL(ret_irqb | ret_irqv); + } + diff --git a/queue-6.5/series b/queue-6.5/series index 7b4624867ae..ef5b643d347 100644 --- a/queue-6.5/series +++ b/queue-6.5/series @@ -110,3 +110,4 @@ clk-socfpga-gate-account-for-the-divider-in-determine_rate.patch clk-stm32-fix-a-signedness-issue-in-clk_stm32_composite_determine_rate.patch platform-x86-add-s2idle-quirk-for-more-lenovo-laptop.patch mm-damon-sysfs-check-damos-regions-update-progress-from-before_terminate.patch +accel-ivpu-37xx-fix-missing-vpuip-interrupts.patch