[PATCH v9 2/6] drm/log: Introduce a new boot logger to draw the kmsg on the screen

Markus Elfring Markus.Elfring at web.de
Wed Dec 18 12:25:17 UTC 2024


…
> +++ b/drivers/gpu/drm/clients/drm_log.c
> @@ -0,0 +1,370 @@
…
> +static int drm_log_count_modeset(struct drm_client_dev *client)
> +{
> +	struct drm_mode_set *mode_set;
> +	int count = 0;
> +
> +	mutex_lock(&client->modeset_mutex);
> +	drm_client_for_each_modeset(mode_set, client)
> +		count++;
> +	mutex_unlock(&client->modeset_mutex);
> +	return count;
> +}
…

Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&client->modeset_mutex);”?
https://elixir.bootlin.com/linux/v6.13-rc3/source/include/linux/mutex.h#L201

Regards,
Markus


More information about the dri-devel mailing list