Re: [PATCH v5 4/7] drm/bridge: dw-hdmi: Add API dw_hdmi_set_sample_iec958() for iec958 format

From: Luca Ceresoli
Date: Mon Sep 01 2025 - 12:57:52 EST


Hello Shengjiu,

On Thu, 21 Aug 2025 15:31:28 +0800
Shengjiu Wang <shengjiu.wang@xxxxxxx> wrote:

> Add API dw_hdmi_set_sample_iec958() for IEC958 format because audio device
> driver needs IEC958 information to configure this specific setting.
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@xxxxxxx>
> Acked-by: Liu Ying <victor.liu@xxxxxxx>

[...]

> +void dw_hdmi_set_sample_iec958(struct dw_hdmi *hdmi, unsigned int iec958)
> +{
> + mutex_lock(&hdmi->audio_mutex);
> + hdmi->sample_iec958 = iec958;
> + mutex_unlock(&hdmi->audio_mutex);
> +}

Apologies for jumping in the discussion as late as in v5, but I noticed
this patch and I was wondering whether this mutex_lock/unlock() is
really needed, as you're copying an int.

Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com