From: Jacek Lawrynowicz Date: Tue, 11 Jun 2024 12:04:28 +0000 (+0200) Subject: accel/ivpu: Disable MMU before checking for idle X-Git-Tag: io_uring-6.11-20240722~49^2~21^2~23 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=86c1d13b8fb6cc63def27abd90a22fb1683eb67d;p=linux-block.git 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 --- 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");