Disable MMU communication before checking if NPU is idle.
NPU may otherwise be woken up when adding/removing contexts.

Signed-off-by: Jacek Lawrynowicz <jacek.lawrynow...@linux.intel.com>
---
 drivers/accel/ivpu/ivpu_pm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c
index 602fa4e65c22..e7aed16b1a36 100644
--- a/drivers/accel/ivpu/ivpu_pm.c
+++ b/drivers/accel/ivpu/ivpu_pm.c
@@ -245,6 +245,8 @@ int ivpu_pm_runtime_suspend_cb(struct device *dev)
 
        ivpu_dbg(vdev, PM, "Runtime suspend..\n");
 
+       ivpu_mmu_disable(vdev);
+
        is_idle = ivpu_hw_is_idle(vdev) || vdev->pm->dct_active_percent;
        if (!is_idle)
                ivpu_err(vdev, "NPU is not idle before autosuspend\n");
-- 
2.45.1

Reply via email to