All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/tegra: nvjpg: fix runtime PM setup in probe
@ 2026-11-29 13:44 Jiawen Liu
  2026-11-29 14:00 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Jiawen Liu @ 2026-11-29 13:44 UTC (permalink / raw)
  To: Thierry Reding, Mikko Perttunen, David Airlie, Simona Vetter,
	Jonathan Hunter
  Cc: dri-devel, linux-tegra, linux-kernel

devm_pm_runtime_enable() can fail after rolling runtime PM back to its
disabled state. nvjpg_probe() ignored that failure and could register a
Host1x client that was unable to resume for a channel submission.

Use the non-fallible pm_runtime_enable() after the client is registered,
and disable runtime PM explicitly in nvjpg_remove() after Host1x and
Falcon teardown.

Fixes: 2e1fe44e06e3 ("drm/tegra: Add NVJPG driver")
Signed-off-by: Jiawen Liu <1298662399@qq.com>
---
 drivers/gpu/drm/tegra/nvjpg.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tegra/nvjpg.c b/drivers/gpu/drm/tegra/nvjpg.c
index e302a8d1f6e7f..0b6a8467f5183 100644
--- a/drivers/gpu/drm/tegra/nvjpg.c
+++ b/drivers/gpu/drm/tegra/nvjpg.c
@@ -292,7 +292,7 @@ static int nvjpg_probe(struct platform_device *pdev)
 
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_set_autosuspend_delay(dev, 500);
-	devm_pm_runtime_enable(dev);
+	pm_runtime_enable(dev);
 
 	return 0;
 
@@ -308,6 +308,8 @@ static void nvjpg_remove(struct platform_device *pdev)
 
 	host1x_client_unregister(&nvjpg->client.base);
 	falcon_exit(&nvjpg->falcon);
+	pm_runtime_dont_use_autosuspend(&pdev->dev);
+	pm_runtime_disable(&pdev->dev);
 }
 
 static const struct dev_pm_ops nvjpg_pm_ops = {
-- 
2.34.1


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

end of thread, other threads:[~2026-11-29 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-29 13:44 [PATCH] drm/tegra: nvjpg: fix runtime PM setup in probe Jiawen Liu
2026-11-29 14:00 ` sashiko-bot

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.