Re: [PATCH v15 04/15] accel/rocket: let the core suspend after a reset
From: Heiko Stübner
Date: Wed Nov 04 2026 - 05:30:32 EST
Am Sonntag, 1. November 2026, 09:22:56 Mitteleuropäische Normalzeit schrieb Jiaxing Hu:
> rocket_reset() drops the in-flight job's runtime PM reference with
> pm_runtime_put_noidle(), which requests nothing, so the core does not
> suspend until something else asks and its power domain does not cycle. On
> RK3576 the domain's power-on resets the NPU bus interface; without it the
> IOMMU stops answering and the job after a timeout fails.
>
> Use pm_runtime_put_autosuspend(), as the completion path does. On a ROCK 4D
> the job after a timeout goes from 0 to 128 of 128 channels correct.
>
> Link: https://lore.kernel.org/all/20260819073530.6087-1-royalnet026@xxxxxxxxx/
> Fixes: 0810d5ad88a1 ("accel/rocket: Add job submission IOCTL")
> Signed-off-by: Jiaxing Hu <gahing@xxxxxxxxxxxxx>
> Tested-by: Igor Paunovic <royalnet026@xxxxxxxxx> # RK3588, three cores, induced reset, JOB_TIMEOUT_MS=2
> ---
> drivers/accel/rocket/rocket_job.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/accel/rocket/rocket_job.c b/drivers/accel/rocket/rocket_job.c
> index 5b2abf40b618..152a9098634b 100644
> --- a/drivers/accel/rocket/rocket_job.c
> +++ b/drivers/accel/rocket/rocket_job.c
> @@ -467,12 +467,12 @@ rocket_reset(struct rocket_core *core, struct drm_sched_job *bad)
>
> /*
> * No handler is running now, but we might still have stuck jobs. Let's
> - * make sure the PM counters stay balanced by manually calling
> - * pm_runtime_put_noidle().
> + * make sure the PM counters stay balanced by putting the reference the
> + * job took, and request idle while doing it so the core can suspend.
> */
with my comment in patch 3/15 fixed
Reviewed-by: Heiko Stuebner <heiko@xxxxxxxxx>
> scoped_guard(mutex, &core->job_lock) {
> if (core->in_flight_job)
> - pm_runtime_put_noidle(core->dev);
> + pm_runtime_put_autosuspend(core->dev);
>
> iommu_detach_group(NULL, core->iommu_group);
>
>