dri-devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] drm/etnaviv: fix runtime pm imbalance on error
@ 2020-05-20 10:05 Dinghao Liu
  0 siblings, 0 replies; only message in thread
From: Dinghao Liu @ 2020-05-20 10:05 UTC (permalink / raw)
  To: dinghao.liu, kjlu
  Cc: David Airlie, etnaviv, dri-devel, linux-kernel, Russell King

pm_runtime_get_sync() increments the runtime PM usage counter even
the call returns an error code. Thus a pairing decrement is needed
on the error handling path to keep the counter balanced.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.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 a31eeff2b297..da3f6ca5849f 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -1691,6 +1691,9 @@ static int etnaviv_gpu_bind(struct device *dev, struct device *master,
 	return 0;
+#ifdef CONFIG_PM
+	pm_runtime_put_autosuspend(gpu->dev);

dri-devel mailing list

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20 10:05 [PATCH] drm/etnaviv: fix runtime pm imbalance on error Dinghao Liu

dri-devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dri-devel/0 dri-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dri-devel dri-devel/ https://lore.kernel.org/dri-devel \
	public-inbox-index dri-devel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git