Skip to content

Commit f2bc2af

Browse files
committed
accel/ivpu: Clear runtime_error after pm_runtime_resume_and_get() fails
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: 7d4b4c7 ("accel/ivpu: Remove suspend_reschedule_counter") Cc: [email protected] # v6.11+ Reviewed-by: Maciej Falkowski <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Signed-off-by: Jacek Lawrynowicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f3be8a9 commit f2bc2af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/accel/ivpu/ivpu_pm.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,10 @@ int ivpu_rpm_get(struct ivpu_device *vdev)
309309
int ret;
310310

311311
ret = pm_runtime_resume_and_get(vdev->drm.dev);
312-
drm_WARN_ON(&vdev->drm, ret < 0);
312+
if (ret < 0) {
313+
ivpu_err(vdev, "Failed to resume NPU: %d\n", ret);
314+
pm_runtime_set_suspended(vdev->drm.dev);
315+
}
313316

314317
return ret;
315318
}

0 commit comments

Comments
 (0)