All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/etnaviv: Add missing pm_runtime_put
@ 2022-01-18 14:16 ` Yongzhi Liu
  0 siblings, 0 replies; 6+ messages in thread
From: Yongzhi Liu @ 2022-01-18 14:16 UTC (permalink / raw)
  To: l.stach, linux+etnaviv, christian.gmeiner, airlied, daniel, etnaviv
  Cc: dri-devel, linux-kernel, Yongzhi Liu

pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code, thus a matching decrement is needed
on the error handling path to keep the counter balanced.

Signed-off-by: Yongzhi Liu <lyz_cs@pku.edu.cn>
---
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 242a5fd..5e81a98 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -1714,6 +1714,9 @@ static int etnaviv_gpu_bind(struct device *dev, struct device *master,
 	return 0;
 
 out_sched:
+#ifdef CONFIG_PM
+	pm_runtime_put_autosuspend(gpu->dev);
+#endif
 	etnaviv_sched_fini(gpu);
 
 out_workqueue:
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-01-19 11:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18 14:16 [PATCH] drm/etnaviv: Add missing pm_runtime_put Yongzhi Liu
2022-01-18 14:16 ` Yongzhi Liu
2022-01-19 10:51 ` Lucas Stach
2022-01-19 10:51   ` Lucas Stach
2022-01-19 11:36   ` 刘永志
2022-01-19 11:36     ` 刘永志

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.