Re: [PATCH v3 3/3] drm: xlnx: zynqmp_dpsub: Add DP audio support

From: Markus Elfring
Date: Tue Sep 10 2024 - 11:31:59 EST



> +++ b/drivers/gpu/drm/xlnx/zynqmp_dp_audio.c
> @@ -0,0 +1,461 @@

> +static int dp_dai_hw_free(struct snd_pcm_substream *substream,
> + struct snd_soc_dai *socdai)
> +{

> + struct zynqmp_dpsub_audio *audio = dpsub->audio;
> +
> + mutex_lock(&audio->enable_lock);

> + audio->enabled_streams--;
> +
> + mutex_unlock(&audio->enable_lock);
> +
> + return 0;
> +}


Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&audio->enable_lock);”?
https://elixir.bootlin.com/linux/v6.11-rc7/source/include/linux/mutex.h#L196

Regards,
Markus