All of lore.kernel.org
 help / color / mirror / Atom feed
From: Detlev Casanova <detlev.casanova@collabora.com>
To: Frank Zhang <rmxpzlb@gmail.com>,
	andrzej.hajda@intel.com, neil.armstrong@linaro.org,
	rfoss@kernel.org, maarten.lankhorst@linux.intel.com,
	mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
	simona@ffwll.ch,
	Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Cc: Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se,
	jernej.skrabec@gmail.com, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/bridge: dw-hdmi-qp: Guard clear_audio_infoframe when PHY is down
Date: Fri, 17 Apr 2026 12:46:12 -0400	[thread overview]
Message-ID: <422b01a9-7b8f-4910-b153-5ffa6a1d3b4a@collabora.com> (raw)
In-Reply-To: <20260416093150.13853-1-rmxpzlb@gmail.com>

Hi Frank,

Please add me to CC if you send a v2.

On 4/16/26 05:31, 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
> clear_audio_infoframe(), accessing registers without checking
> tmds_char_rate.
>
> Add a tmds_char_rate check in dw_hdmi_qp_bridge_clear_audio_infoframe()
> to skip the register write when the PHY is inactive.
>
> Signed-off-by: Frank Zhang <rmxpzlb@gmail.com>
Add a "Fixes:" tag so this gets backported were needed.
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> index d649a1cf07f5..f963dff81dc6 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> @@ -886,11 +886,12 @@ static int dw_hdmi_qp_bridge_clear_audio_infoframe(struct drm_bridge *bridge)
>   {
>   	struct dw_hdmi_qp *hdmi = bridge->driver_private;
>   
> -	dw_hdmi_qp_mod(hdmi, 0,
> -		       PKTSCHED_ACR_TX_EN |
> -		       PKTSCHED_AUDS_TX_EN |
> -		       PKTSCHED_AUDI_TX_EN,
> -		       PKTSCHED_PKT_EN);
> +	if (hdmi->tmds_char_rate)
I'd rather move the call to 
drm_atomic_helper_connector_hdmi_clear_audio_infoframe() inside the if 
(hdmi->tmds_char_rate) of dw_hdmi_qp_audio_disable().
There is no need to check for tmds_char_rate in every 
dw_hdmi_qp_bridge_clear_audio_infoframe() call.
> +		dw_hdmi_qp_mod(hdmi, 0,
> +			       PKTSCHED_ACR_TX_EN |
> +			       PKTSCHED_AUDS_TX_EN |
> +			       PKTSCHED_AUDI_TX_EN,
> +			       PKTSCHED_PKT_EN);
>   
>   	return 0;
>   }

Regards,
Detlev.

  reply	other threads:[~2026-04-17 16:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16  9:31 [PATCH] drm/bridge: dw-hdmi-qp: Guard clear_audio_infoframe when PHY is down Frank Zhang
2026-04-17 16:46 ` Detlev Casanova [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-09-08  6:27 Frank Zhang
2026-09-08  6:41 ` sashiko-bot

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=422b01a9-7b8f-4910-b153-5ffa6a1d3b4a@collabora.com \
    --to=detlev.casanova@collabora.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=cristian.ciocaltea@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=rmxpzlb@gmail.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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 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.