* [PATCH] [v2] drm/panfrost: Fix runtime PM imbalance on error
@ 2020-05-22 13:41 Dinghao Liu
2020-05-27 15:52 ` Steven Price
0 siblings, 1 reply; 2+ messages in thread
From: Dinghao Liu @ 2020-05-22 13:41 UTC (permalink / raw)
To: dinghao.liu, kjlu
Cc: Rob Herring, Tomeu Vizoso, Steven Price, Alyssa Rosenzweig,
David Airlie, Daniel Vetter, dri-devel, linux-kernel
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(-)
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;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [v2] drm/panfrost: Fix runtime PM imbalance on error
2020-05-22 13:41 [PATCH] [v2] drm/panfrost: Fix runtime PM imbalance on error Dinghao Liu
@ 2020-05-27 15:52 ` Steven Price
0 siblings, 0 replies; 2+ messages in thread
From: Steven Price @ 2020-05-27 15:52 UTC (permalink / raw)
To: Dinghao Liu, kjlu
Cc: Rob Herring, Tomeu Vizoso, Alyssa Rosenzweig, David Airlie,
Daniel Vetter, dri-devel, linux-kernel
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;
> }
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-27 15:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 13:41 [PATCH] [v2] drm/panfrost: Fix runtime PM imbalance on error Dinghao Liu
2020-05-27 15:52 ` Steven Price
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).