From: Jacek Lawrynowicz Date: Wed, 29 Jan 2025 12:56:32 +0000 (+0100) Subject: accel/ivpu: Update last_busy in IRQ handler X-Git-Tag: block-6.15-20250403~41^2~20^2~77 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=b8c00323ae65e1bbee9f87a1e66592b589f53b50;p=linux-block.git accel/ivpu: Update last_busy in IRQ handler Call pm_runtime_mark_last_busy() in top half of IRQ handler to prevent device from being runtime suspended before bottom half is executed on a workqueue. Reviewed-by: Karol Wachowski Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-3-jacek.lawrynowicz@linux.intel.com --- diff --git a/drivers/accel/ivpu/ivpu_hw.c b/drivers/accel/ivpu/ivpu_hw.c index 8099ab047bfe..4199f0bbb435 100644 --- a/drivers/accel/ivpu/ivpu_hw.c +++ b/drivers/accel/ivpu/ivpu_hw.c @@ -10,6 +10,7 @@ #include #include +#include #ifdef CONFIG_FAULT_INJECTION DECLARE_FAULT_ATTR(ivpu_hw_failure); @@ -331,7 +332,9 @@ irqreturn_t ivpu_hw_irq_handler(int irq, void *ptr) /* Re-enable global interrupts to re-trigger MSI for pending interrupts */ ivpu_hw_btrs_global_int_enable(vdev); - if (ip_handled || btrs_handled) - return IRQ_HANDLED; - return IRQ_NONE; + if (!ip_handled && !btrs_handled) + return IRQ_NONE; + + pm_runtime_mark_last_busy(vdev->drm.dev); + return IRQ_HANDLED; }