From: Mikko Perttunen <mperttunen@nvidia.com>
To: Thierry Reding <thierry.reding@kernel.org>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
Jonathan Hunter <jonathanh@nvidia.com>
Cc: Thierry Reding <treding@nvidia.com>,
dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org,
Mikko Perttunen <mperttunen@nvidia.com>
Subject: [PATCH v2] drm/tegra: dsi: Unconditionally manage reset line
Date: Fri, 09 Oct 2026 15:45:03 +0900 [thread overview]
Message-ID: <20261009-dalmore-fixes-dsi-reset-v2-1-90237a9461f1@nvidia.com> (raw)
The DSI driver ignores the reset line if a power domain is configured.
This was originally added to support Tegra210, where the power domain
provider has to control the reset line -- at that time, older SoCs
didn't have a power domain for DSI, so the driver continued to manage
the reset line.
Now, however, Tegra20/30/114 place DSI in the core power domain, causing
reset management to be skipped. On Tegra114, DSI should be placed in the
DIS power domain where PMC could manage the reset, but that power domain
hasn't been implemented yet. On Tegra20/30, there is no such power
domain.
On many platforms this seems to happen to work, presumably due to the
bootloader bringing DSI out of reset. However, on Tegra114 Dalmore this
isn't the case and the system ends up hanging during boot. Fix the issue
by managing the reset unconditionally - while there is the alternative
fix for Tegra114, for correctness this is required on Tegra20/30.
While the power domain may also access the reset, managing it also in
the driver is safe -- asserts/deasserts are done in runtime
resume/suspend where the device is guaranteed to be powered on from the
power domain's perspective. Hence we can consider the additional reset
assertion just a "runtime reset" independent of the power gating
sequence. Ownership of the reset line is also no longer a problem with
reset acquire/release semantics.
Finally, the device tree bindings already require the reset and it is
present on all platforms, so this is safe to do.
Fixes: 4cc90d4c043e ("ARM: tegra: Configure Tegra114 power domains")
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
---
Changes in v2:
- Based on offline discussion, updated commit message to clarify
that the reset management is safe and does not interact with the
powergating sequence. Also other commit message improvements.
- Link to v1: https://patch.msgid.link/20260930-dalmore-fixes-dsi-reset-v1-1-58c9d12f5ebd@nvidia.com
---
drivers/gpu/drm/tegra/dsi.c | 40 ++++++++++++++++++++++------------------
1 file changed, 22 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index cb88aafbd36f..7124cf648a1a 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -1113,14 +1113,14 @@ static int tegra_dsi_runtime_suspend(struct host1x_client *client)
struct device *dev = client->dev;
int err;
- if (dsi->rst) {
- err = reset_control_assert(dsi->rst);
- if (err < 0) {
- dev_err(dev, "failed to assert reset: %d\n", err);
- return err;
- }
+ err = reset_control_assert(dsi->rst);
+ if (err < 0) {
+ dev_err(dev, "failed to assert reset: %d\n", err);
+ return err;
}
+ reset_control_release(dsi->rst);
+
usleep_range(1000, 2000);
clk_disable_unprepare(dsi->clk_lp);
@@ -1164,16 +1164,22 @@ static int tegra_dsi_runtime_resume(struct host1x_client *client)
usleep_range(1000, 2000);
- if (dsi->rst) {
- err = reset_control_deassert(dsi->rst);
- if (err < 0) {
- dev_err(dev, "cannot assert reset: %d\n", err);
- goto disable_clk_lp;
- }
+ err = reset_control_acquire(dsi->rst);
+ if (err < 0) {
+ dev_err(dev, "failed to acquire reset: %d\n", err);
+ goto disable_clk_lp;
+ }
+
+ err = reset_control_deassert(dsi->rst);
+ if (err < 0) {
+ dev_err(dev, "cannot deassert reset: %d\n", err);
+ goto release_reset;
}
return 0;
+release_reset:
+ reset_control_release(dsi->rst);
disable_clk_lp:
clk_disable_unprepare(dsi->clk_lp);
disable_clk:
@@ -1623,12 +1629,10 @@ static int tegra_dsi_probe(struct platform_device *pdev)
dsi->format = MIPI_DSI_FMT_RGB888;
dsi->lanes = 4;
- if (!pdev->dev.pm_domain) {
- dsi->rst = devm_reset_control_get(&pdev->dev, "dsi");
- if (IS_ERR(dsi->rst)) {
- err = PTR_ERR(dsi->rst);
- goto remove;
- }
+ dsi->rst = devm_reset_control_get_exclusive_released(&pdev->dev, "dsi");
+ if (IS_ERR(dsi->rst)) {
+ err = PTR_ERR(dsi->rst);
+ goto remove;
}
dsi->clk = devm_clk_get(&pdev->dev, NULL);
---
base-commit: 72d3fcf802c45d00b300f25b848a93c3a2bd7c7e
change-id: 20260930-dalmore-fixes-dsi-reset-4f3191dca886
reply other threads:[~2026-10-09 6:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261009-dalmore-fixes-dsi-reset-v2-1-90237a9461f1@nvidia.com \
--to=mperttunen@nvidia.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=thierry.reding@kernel.org \
--cc=treding@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®