[PATCH] drm/tegra: nvjpg: fix runtime PM setup in probe
From: Jiawen Liu
Date: Sun Nov 29 2026 - 08:44:19 EST
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@xxxxxx>
---
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