[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<TYCPR01MB11332EA012210659410F95E18868EA@TYCPR01MB11332.jpnprd01.prod.outlook.com>
Date: Tue, 13 Jan 2026 13:15:47 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: Hugo Villeneuve <hugo@...ovil.com>, Maarten Lankhorst
<maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>
CC: Hugo Villeneuve <hvilleneuve@...onoff.com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-renesas-soc@...r.kernel.org" <linux-renesas-soc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] drm: renesas: rz-du: mipi_dsi: fix kernel panic when
rebooting for some panels
Hi Hugo,
Thanks for the patch
> -----Original Message-----
> From: dri-devel <dri-devel-bounces@...ts.freedesktop.org> On Behalf Of Hugo Villeneuve
> Sent: 12 January 2026 15:43
> Subject: [PATCH] drm: renesas: rz-du: mipi_dsi: fix kernel panic when rebooting for some panels
>
> From: Hugo Villeneuve <hvilleneuve@...onoff.com>
>
> Since commit 56de5e305d4b ("clk: renesas: r9a07g044: Add MSTOP for RZ/G2L") we may get the following
> kernel panic, for some panels, when rebooting:
>
> systemd-shutdown[1]: Rebooting.
> Call trace:
> ...
> do_serror+0x28/0x68
> el1h_64_error_handler+0x34/0x50
> el1h_64_error+0x6c/0x70
> rzg2l_mipi_dsi_host_transfer+0x114/0x458 (P)
> mipi_dsi_device_transfer+0x44/0x58
> mipi_dsi_dcs_set_display_off_multi+0x9c/0xc4
> ili9881c_unprepare+0x38/0x88
> drm_panel_unprepare+0xbc/0x108
>
> This happens for panels that need to send MIPI-DSI commands in their
> unprepare() callback. Since the MIPI-DSI interface is stopped at that point,
> rzg2l_mipi_dsi_host_transfer() triggers the kernel panic.
>
> Fix by moving rzg2l_mipi_dsi_stop() to new callback function rzg2l_mipi_dsi_atomic_post_disable().
>
> With this change we now have the correct power-down/stop sequence:
>
> systemd-shutdown[1]: Rebooting.
> rzg2l-mipi-dsi 10850000.dsi: rzg2l_mipi_dsi_atomic_disable(): entry
> ili9881c-dsi 10850000.dsi.0: ili9881c_unprepare(): entry
> rzg2l-mipi-dsi 10850000.dsi: rzg2l_mipi_dsi_atomic_post_disable(): entry
> reboot: Restarting system
>
> Suggested-by: Biju Das <biju.das.jz@...renesas.com>
> Signed-off-by: Hugo Villeneuve <hvilleneuve@...onoff.com>
Tested-by: Biju Das <biju.das.jz@...renesas.com>
Tested on the below boards:
RZ/G3E SMARC EVK connected ADV7535 bridge (Tested low power modes as well s2idle, deep sleep)
RZ/V2L SMARC EVK connected ADV7535 bridge
Cheers,
Biju
> ---
> Tested on a custom RZ/G2L board with three different panels/drivers:
> ili9881c -> sending DSI commands in unprepare()
> jd9365da -> not sending DSI commands in unprepare()
> st7703 -> not sending DSI commands in unprepare()
> ---
> drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/drm/renesas/rz-
> du/rzg2l_mipi_dsi.c
> index 3b52dfc0ea1e0..b164e3a62cc2f 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
> @@ -646,6 +646,13 @@ static void rzg2l_mipi_dsi_atomic_disable(struct drm_bridge *bridge,
>
> rzg2l_mipi_dsi_stop_video(dsi);
> rzg2l_mipi_dsi_stop_hs_clock(dsi);
> +}
> +
> +static void rzg2l_mipi_dsi_atomic_post_disable(struct drm_bridge *bridge,
> + struct drm_atomic_state *state) {
> + struct rzg2l_mipi_dsi *dsi = bridge_to_rzg2l_mipi_dsi(bridge);
> +
> rzg2l_mipi_dsi_stop(dsi);
> }
>
> @@ -681,6 +688,7 @@ static const struct drm_bridge_funcs rzg2l_mipi_dsi_bridge_ops = {
> .atomic_pre_enable = rzg2l_mipi_dsi_atomic_pre_enable,
> .atomic_enable = rzg2l_mipi_dsi_atomic_enable,
> .atomic_disable = rzg2l_mipi_dsi_atomic_disable,
> + .atomic_post_disable = rzg2l_mipi_dsi_atomic_post_disable,
> .mode_valid = rzg2l_mipi_dsi_bridge_mode_valid, };
>
>
> base-commit: 0f61b1860cc3f52aef9036d7235ed1f017632193
> --
> 2.47.3
Powered by blists - more mailing lists