From 86c1d13b8fb6cc63def27abd90a22fb1683eb67d Mon Sep 17 00:00:00 2001 From: Jacek Lawrynowicz Date: Tue, 11 Jun 2024 14:04:28 +0200 Subject: [PATCH] accel/ivpu: Disable MMU before checking for idle Disable MMU communication before checking if NPU is idle. NPU may otherwise be woken up when adding/removing contexts. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Wachowski, Karol Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-12-jacek.lawrynowicz@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 602fa4e65c226..e7aed16b1a36f 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.39.5