All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/v3d: Fix PM disable depth imbalance in v3d_platform_drm_probe
@ 2022-01-05 12:04 ` Miaoqian Lin
  0 siblings, 0 replies; 14+ messages in thread
From: Miaoqian Lin @ 2022-01-05 12:04 UTC (permalink / raw)
  Cc: linmq006, Emma Anholt, David Airlie, linux-kernel, dri-devel,
	Eric Anholt

The pm_runtime_enable will increase power disable depth.
If the probe fails, we should use pm_runtime_disable() to balance
pm_runtime_enable().

Fixes: 57692c9 ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 drivers/gpu/drm/v3d/v3d_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
index bd46396a1ae0..4f293aa733b8 100644
--- a/drivers/gpu/drm/v3d/v3d_drv.c
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
@@ -300,6 +300,8 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)
 	v3d_gem_destroy(drm);
 dma_free:
 	dma_free_wc(dev, 4096, v3d->mmu_scratch, v3d->mmu_scratch_paddr);
+pm_disable:
+	pm_runtime_disable(dev);
 	return ret;
 }
 
-- 
2.17.1


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

end of thread, other threads:[~2022-01-10  3:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-05 12:04 [PATCH] drm/v3d: Fix PM disable depth imbalance in v3d_platform_drm_probe Miaoqian Lin
2022-01-05 12:04 ` Miaoqian Lin
2022-01-05 22:37 ` kernel test robot
2022-01-05 22:37   ` kernel test robot
2022-01-06 11:57 ` Dave Stevenson
2022-01-06 11:57   ` Dave Stevenson
2022-01-06 12:46   ` [PATCH v2] " Miaoqian Lin
2022-01-06 12:46     ` Miaoqian Lin
2022-01-07 11:03     ` Dave Stevenson
2022-01-07 11:03       ` Dave Stevenson
2022-01-09 17:48     ` Melissa Wen
2022-01-09 17:48       ` Melissa Wen
2022-01-10  3:05       ` Miaoqian Lin
2022-01-10  3:05         ` Miaoqian Lin

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.