diff options
| author | Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> | 2025-01-29 13:40:08 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-17 10:05:30 +0100 |
| commit | a468d0585d98466f2faeeb513440fb944c928ff9 (patch) | |
| tree | 642c384e007ea6f06410427b6045624a5c86a43f | |
| parent | 31c2134667ee4228a3fbb7f1a69930c7938f7b88 (diff) | |
| download | linux-a468d0585d98466f2faeeb513440fb944c928ff9.tar.gz linux-a468d0585d98466f2faeeb513440fb944c928ff9.tar.bz2 linux-a468d0585d98466f2faeeb513440fb944c928ff9.zip | |
accel/ivpu: Clear runtime_error after pm_runtime_resume_and_get() fails
commit f2bc2afe34c107a02ce829a4039e85514feafe55 upstream.
pm_runtime_resume_and_get() sets dev->power.runtime_error that causes
all subsequent pm_runtime_get_sync() calls to fail.
Clear the runtime_error using pm_runtime_set_suspended(), so the driver
doesn't have to be reloaded to recover when the NPU fails to boot during
runtime resume.
Fixes: 7d4b4c74432d ("accel/ivpu: Remove suspend_reschedule_counter")
Cc: stable@vger.kernel.org # v6.11+
Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.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/20250129124009.1039982-3-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/accel/ivpu/ivpu_pm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c index 682da13b0d67..ef9a4ba18cb8 100644 --- a/drivers/accel/ivpu/ivpu_pm.c +++ b/drivers/accel/ivpu/ivpu_pm.c @@ -295,7 +295,10 @@ int ivpu_rpm_get(struct ivpu_device *vdev) int ret; ret = pm_runtime_resume_and_get(vdev->drm.dev); - drm_WARN_ON(&vdev->drm, ret < 0); + if (ret < 0) { + ivpu_err(vdev, "Failed to resume NPU: %d\n", ret); + pm_runtime_set_suspended(vdev->drm.dev); + } return ret; } |
