All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/tegra: dc: Propagate powergate failures on suspend
@ 2026-08-29  4:20 Pengpeng Hou
  2026-08-29  4:31 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Pengpeng Hou @ 2026-08-29  4:20 UTC (permalink / raw)
  To: Thierry Reding, Mikko Perttunen
  Cc: Pengpeng Hou, David Airlie, Simona Vetter, Jonathan Hunter,
	Philipp Zabel, dri-devel, linux-tegra, linux-kernel

A lifecycle transition can continue after a required state restore
operation fails, leaving software state inconsistent with hardware.

Propagate the failure and unwind state acquired by the transition so
callers cannot observe a false success.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
 drivers/gpu/drm/tegra/dc.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 0b3fcc7011b3..bac78b57dcff 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -2878,8 +2878,14 @@ static int tegra_dc_runtime_suspend(struct host1x_client *client)
 		return err;
 	}
 
-	if (dc->soc->has_powergate)
-		tegra_pmc_powergate_power_off(dc->pmc, dc->powergate);
+	if (dc->soc->has_powergate) {
+		err = tegra_pmc_powergate_power_off(dc->pmc, dc->powergate);
+		if (err < 0) {
+			dev_err(dev, "failed to powergate partition: %d\n", err);
+			reset_control_deassert(dc->rst);
+			return err;
+		}
+	}
 
 	clk_disable_unprepare(dc->clk);
 	pm_runtime_put_sync(dev);
-- 
2.43.0


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

end of thread, other threads:[~2026-08-31  7:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-29  4:20 [PATCH] drm/tegra: dc: Propagate powergate failures on suspend Pengpeng Hou
2026-08-29  4:31 ` 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.