diff options
author | Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> | 2025-01-29 13:56:32 +0100 |
---|---|---|
committer | Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> | 2025-02-03 10:40:34 +0100 |
commit | b8c00323ae65e1bbee9f87a1e66592b589f53b50 (patch) | |
tree | d1f7939f4f8d400a2612a033eb62b7519248b630 | |
parent | 34776963452040f199bf9985ad8a2261a82d8b99 (diff) |
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 <karol.wachowski@intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250129125636.1047413-3-jacek.lawrynowicz@linux.intel.com
-rw-r--r-- | drivers/accel/ivpu/ivpu_hw.c | 9 |
1 files changed, 6 insertions, 3 deletions
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 <linux/dmi.h> #include <linux/fault-inject.h> +#include <linux/pm_runtime.h> #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; } |