* [PATCH v2] drm/bridge: dw-hdmi-qp: Guard clear_audio_infoframe when PHY is down
@ 2026-04-18 10:19 Frank Zhang
2026-04-19 0:40 ` Dmitry Baryshkov
0 siblings, 1 reply; 2+ messages in thread
From: Frank Zhang @ 2026-04-18 10:19 UTC (permalink / raw)
To: andrzej.hajda, neil.armstrong, rfoss, maarten.lankhorst, mripard,
tzimmermann, airlied, simona
Cc: detlev.casanova, cristian.ciocaltea, Laurent.pinchart, jonas,
jernej.skrabec, dri-devel, linux-kernel, stable
The following panic was observed during system reboot:
Kernel panic - not syncing: Asynchronous SError Interrupt
CPU: 7 UID: 1000 PID: 2637 Comm: pipewire ... 6.19.10-300.fc44.aarch64
Call trace:
...
regmap_update_bits_base+0x5c/0x90
dw_hdmi_qp_bridge_clear_infoframe+0xb0/0x120 [dw_hdmi_qp]
drm_bridge_connector_clear_infoframe+0x28/0x48 [drm_display_helper]
...
dw_hdmi_qp_audio_disable+0x24/0xb8 [dw_hdmi_qp]
drm_bridge_connector_audio_shutdown+0x30/0x60 [drm_display_helper]
drm_connector_hdmi_audio_shutdown+0x24/0x38 [drm_display_helper]
hdmi_codec_shutdown+0x60/0x90 [snd_soc_hdmi_codec]
...
snd_pcm_release_substream.part.0+0x44/0xd8 [snd_pcm]
snd_pcm_release+0x60/0xe8 [snd_pcm]
...
The root cause is pipewire tries to close the HDMI audio device after
atomic_disable(), which sets tmds_char_rate to 0 and disable the PHY.
In this case, dw_hdmi_qp_audio_disable() will call
drm_atomic_helper_connector_hdmi_clear_audio_infoframe() directly,
accessing registers without checking tmds_char_rate.
Move drm_atomic_helper_connector_hdmi_clear_audio_infoframe() inside the
if (hdmi->tmds_char_rate) of dw_hdmi_qp_audio_disable().
Fixes: fd0141d1a8a2 ("drm/bridge: synopsys: Add audio support for dw-hdmi-qp")
Signed-off-by: Frank Zhang <rmxpzlb@gmail.com>
---
Changes in v2:
- Move drm_atomic_helper_connector_hdmi_clear_audio_infoframe() inside
the if (hdmi->tmds_char_rate) of dw_hdmi_qp_audio_disable().
- Link to v1: https://lore.kernel.org/all/20260416093150.13853-1-rmxpzlb@gmail.com/
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
index d649a1cf07f5..7760527484c8 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
@@ -526,10 +526,10 @@ static void dw_hdmi_qp_audio_disable(struct drm_bridge *bridge,
{
struct dw_hdmi_qp *hdmi = dw_hdmi_qp_from_bridge(bridge);
- drm_atomic_helper_connector_hdmi_clear_audio_infoframe(connector);
-
- if (hdmi->tmds_char_rate)
+ if (hdmi->tmds_char_rate) {
+ drm_atomic_helper_connector_hdmi_clear_audio_infoframe(connector);
dw_hdmi_qp_audio_disable_regs(hdmi);
+ }
}
static int dw_hdmi_qp_i2c_read(struct dw_hdmi_qp *hdmi,
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] drm/bridge: dw-hdmi-qp: Guard clear_audio_infoframe when PHY is down
2026-04-18 10:19 [PATCH v2] drm/bridge: dw-hdmi-qp: Guard clear_audio_infoframe when PHY is down Frank Zhang
@ 2026-04-19 0:40 ` Dmitry Baryshkov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Baryshkov @ 2026-04-19 0:40 UTC (permalink / raw)
To: Frank Zhang
Cc: andrzej.hajda, neil.armstrong, rfoss, maarten.lankhorst, mripard,
tzimmermann, airlied, simona, detlev.casanova, cristian.ciocaltea,
Laurent.pinchart, jonas, jernej.skrabec, dri-devel, linux-kernel,
stable
On Sat, Apr 18, 2026 at 06:19:36PM +0800, Frank Zhang wrote:
> The following panic was observed during system reboot:
>
> Kernel panic - not syncing: Asynchronous SError Interrupt
> CPU: 7 UID: 1000 PID: 2637 Comm: pipewire ... 6.19.10-300.fc44.aarch64
> Call trace:
> ...
> regmap_update_bits_base+0x5c/0x90
> dw_hdmi_qp_bridge_clear_infoframe+0xb0/0x120 [dw_hdmi_qp]
> drm_bridge_connector_clear_infoframe+0x28/0x48 [drm_display_helper]
> ...
> dw_hdmi_qp_audio_disable+0x24/0xb8 [dw_hdmi_qp]
> drm_bridge_connector_audio_shutdown+0x30/0x60 [drm_display_helper]
> drm_connector_hdmi_audio_shutdown+0x24/0x38 [drm_display_helper]
> hdmi_codec_shutdown+0x60/0x90 [snd_soc_hdmi_codec]
> ...
> snd_pcm_release_substream.part.0+0x44/0xd8 [snd_pcm]
> snd_pcm_release+0x60/0xe8 [snd_pcm]
> ...
>
> The root cause is pipewire tries to close the HDMI audio device after
> atomic_disable(), which sets tmds_char_rate to 0 and disable the PHY.
>
> In this case, dw_hdmi_qp_audio_disable() will call
> drm_atomic_helper_connector_hdmi_clear_audio_infoframe() directly,
> accessing registers without checking tmds_char_rate.
>
> Move drm_atomic_helper_connector_hdmi_clear_audio_infoframe() inside the
> if (hdmi->tmds_char_rate) of dw_hdmi_qp_audio_disable().
>
> Fixes: fd0141d1a8a2 ("drm/bridge: synopsys: Add audio support for dw-hdmi-qp")
> Signed-off-by: Frank Zhang <rmxpzlb@gmail.com>
>
> ---
> Changes in v2:
> - Move drm_atomic_helper_connector_hdmi_clear_audio_infoframe() inside
> the if (hdmi->tmds_char_rate) of dw_hdmi_qp_audio_disable().
> - Link to v1: https://lore.kernel.org/all/20260416093150.13853-1-rmxpzlb@gmail.com/
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> index d649a1cf07f5..7760527484c8 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> @@ -526,10 +526,10 @@ static void dw_hdmi_qp_audio_disable(struct drm_bridge *bridge,
> {
> struct dw_hdmi_qp *hdmi = dw_hdmi_qp_from_bridge(bridge);
>
> - drm_atomic_helper_connector_hdmi_clear_audio_infoframe(connector);
> -
> - if (hdmi->tmds_char_rate)
> + if (hdmi->tmds_char_rate) {
> + drm_atomic_helper_connector_hdmi_clear_audio_infoframe(connector);
> dw_hdmi_qp_audio_disable_regs(hdmi);
> + }
Will audio and audio infoframe remain disabled after consequetive
atomic_enable() call?
> }
>
> static int dw_hdmi_qp_i2c_read(struct dw_hdmi_qp *hdmi,
> --
> 2.53.0
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-19 0:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-18 10:19 [PATCH v2] drm/bridge: dw-hdmi-qp: Guard clear_audio_infoframe when PHY is down Frank Zhang
2026-04-19 0:40 ` Dmitry Baryshkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox