Message ID | 20200522134109.27204-1-dinghao.liu@zju.edu.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] drm/panfrost: Fix runtime PM imbalance on error | expand |
On 22/05/2020 14:41, Dinghao Liu wrote: > The caller expects panfrost_job_hw_submit() to increase > runtime PM usage counter. The refcount decrement on the > error branch of WARN_ON() will break the counter balance > and needs to be removed. > > Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Reviewed-by: Steven Price <steven.price@arm.com> Thanks, Steve > --- > > Changelog: > > v2: - Remove refcount decrement on the error path of > WARN_ON() rather than add refcount decrement > on the error path of pm_runtime_get_sync(). > --- > drivers/gpu/drm/panfrost/panfrost_job.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c > index 7914b1570841..1092d9754f0f 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_job.c > +++ b/drivers/gpu/drm/panfrost/panfrost_job.c > @@ -150,7 +150,6 @@ static void panfrost_job_hw_submit(struct panfrost_job *job, int js) > return; > > if (WARN_ON(job_read(pfdev, JS_COMMAND_NEXT(js)))) { > - pm_runtime_put_sync_autosuspend(pfdev->dev); > return; > } > >
diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c index 7914b1570841..1092d9754f0f 100644 --- a/drivers/gpu/drm/panfrost/panfrost_job.c +++ b/drivers/gpu/drm/panfrost/panfrost_job.c @@ -150,7 +150,6 @@ static void panfrost_job_hw_submit(struct panfrost_job *job, int js) return; if (WARN_ON(job_read(pfdev, JS_COMMAND_NEXT(js)))) { - pm_runtime_put_sync_autosuspend(pfdev->dev); return; }
The caller expects panfrost_job_hw_submit() to increase runtime PM usage counter. The refcount decrement on the error branch of WARN_ON() will break the counter balance and needs to be removed. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> --- Changelog: v2: - Remove refcount decrement on the error path of WARN_ON() rather than add refcount decrement on the error path of pm_runtime_get_sync(). --- drivers/gpu/drm/panfrost/panfrost_job.c | 1 - 1 file changed, 1 deletion(-)