[PATCH v5 2/4] drm/bridge: synopsys: Add DW HDMI QP TX Controller support library

Markus Elfring Markus.Elfring at web.de
Sun Sep 8 09:11:23 UTC 2024


…
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> @@ -0,0 +1,708 @@
…
> +static int dw_hdmi_qp_i2c_xfer(struct i2c_adapter *adap,
> +			       struct i2c_msg *msgs, int num)
> +{
…
> +	mutex_lock(&i2c->lock);
…
> +	dw_hdmi_qp_mod(hdmi, 0, I2CM_OP_DONE_MASK_N | I2CM_NACK_RCVD_MASK_N,
> +		       MAINUNIT_1_INT_MASK_N);
> +
> +	mutex_unlock(&i2c->lock);
> +
> +	return ret;
> +}
…

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

Regards,
Markus


More information about the dri-devel mailing list