From: Stefan Ghetu <stefan.ghetu@nxp.com>
To: dri-devel@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
devicetree@vger.kernel.org,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Andrzej Hajda" <andrzej.hajda@intel.com>,
"Conor Dooley" <conor+dt@kernel.org>,
"David Airlie" <airlied@gmail.com>,
"Fabio Estevam" <festevam@gmail.com>,
"Guido Günther" <agx@sigxcpu.org>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Jessica Zhang" <jesszhan0024@gmail.com>,
"Jonas Karlman" <jonas@kwiboo.se>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
"Luca Ceresoli" <luca.ceresoli@bootlin.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Philippe Cornu" <philippe.cornu@foss.st.com>,
"Raphael Gallais-Pou" <raphael.gallais-pou@foss.st.com>,
"Robert Chiras" <robert.chiras@nxp.com>,
"Robert Foss" <rfoss@kernel.org>, "Rob Herring" <robh@kernel.org>,
"Sam Ravnborg" <sam@ravnborg.org>,
"Simona Vetter" <simona@ffwll.ch>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Yannick Fertre" <yannick.fertre@foss.st.com>,
"Liu Ying" <victor.liu@nxp.com>,
"Stefan Ghetu" <stefan.ghetu@nxp.com>
Subject: [PATCH 1/2] drm/bridge: nwl-dsi: Move DSI host disablement to ->atomic_post_disable()
Date: Wed, 25 Nov 2026 09:54:54 +0200 [thread overview]
Message-ID: <20261125075455.772826-2-stefan.ghetu@nxp.com> (raw)
In-Reply-To: <20261125075455.772826-1-stefan.ghetu@nxp.com>
From: Liu Ying <victor.liu@nxp.com>
Some MIPI DSI panels, like the Raydium RM68200, send DCS commands such
as MIPI_DCS_SET_DISPLAY_OFF and MIPI_DCS_ENTER_SLEEP_MODE from their
drm_panel_funcs::unprepare() callback. For those commands to reach the
panel, the DSI host controller and its PHY must still be running.
The panel bridge calls drm_panel_unprepare() from its post_disable
hook, while nwl-dsi currently shuts down the controller, the PHY and
the clocks from ->atomic_disable(). Since all ->atomic_disable() hooks
in a bridge chain run before any ->atomic_post_disable() hook, the DSI
link is already down by the time the panel tries to talk to it.
Move the disablement to ->atomic_post_disable(), so that a downstream
panel bridge that sets pre_enable_prev_first gets a chance to send its
shutdown commands first. The enable side is unaffected: the controller
is brought out of reset in ->mode_set(), which runs before any
pre_enable hook.
Fixes: 44cfc6233447 ("drm/bridge: Add NWL MIPI DSI host controller support")
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Stefan Ghetu <stefan.ghetu@nxp.com>
---
drivers/gpu/drm/bridge/nwl-dsi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c
index 09992529f3d85..5c82f0986eabb 100644
--- a/drivers/gpu/drm/bridge/nwl-dsi.c
+++ b/drivers/gpu/drm/bridge/nwl-dsi.c
@@ -736,8 +736,8 @@ static int nwl_dsi_disable(struct nwl_dsi *dsi)
return 0;
}
-static void nwl_dsi_bridge_atomic_disable(struct drm_bridge *bridge,
- struct drm_atomic_commit *state)
+static void nwl_dsi_bridge_atomic_post_disable(struct drm_bridge *bridge,
+ struct drm_atomic_commit *state)
{
struct nwl_dsi *dsi = bridge_to_dsi(bridge);
int ret;
@@ -963,7 +963,7 @@ static const struct drm_bridge_funcs nwl_dsi_bridge_funcs = {
.atomic_create_state = drm_atomic_helper_bridge_create_state,
.atomic_check = nwl_dsi_bridge_atomic_check,
.atomic_enable = nwl_dsi_bridge_atomic_enable,
- .atomic_disable = nwl_dsi_bridge_atomic_disable,
+ .atomic_post_disable = nwl_dsi_bridge_atomic_post_disable,
.atomic_get_input_bus_fmts = nwl_bridge_atomic_get_input_bus_fmts,
.mode_set = nwl_dsi_bridge_mode_set,
.mode_valid = nwl_dsi_bridge_mode_valid,
--
2.53.0
next prev parent reply other threads:[~2026-11-25 8:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 7:54 [PATCH 0/2] drm: Fix rm68200 panel shutdown on nwl-dsi Stefan Ghetu
2026-11-25 7:54 ` Stefan Ghetu [this message]
2026-11-25 7:54 ` [PATCH 2/2] drm/panel: raydium-rm68200: Set prepare_prev_first Stefan Ghetu
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=20261125075455.772826-2-stefan.ghetu@nxp.com \
--to=stefan.ghetu@nxp.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=agx@sigxcpu.org \
--cc=airlied@gmail.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrzej.hajda@intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=jesszhan0024@gmail.com \
--cc=jonas@kwiboo.se \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=philippe.cornu@foss.st.com \
--cc=raphael.gallais-pou@foss.st.com \
--cc=rfoss@kernel.org \
--cc=robert.chiras@nxp.com \
--cc=robh@kernel.org \
--cc=sam@ravnborg.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=victor.liu@nxp.com \
--cc=yannick.fertre@foss.st.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