[PATCH 1/3] drm/ast: Fix comment on modeset lock

Jocelyn Falempe jfalempe at redhat.com
Tue Mar 25 09:01:06 UTC 2025


On 24/03/2025 10:44, Thomas Zimmermann wrote:
> The ast driver protects the commit tail against concurrent reads
> of the display modes by acquiring a lock. The comment is misleading
> as the lock is not released in atomic_flush, but at the end of the
> commit-tail helper. Rewrite the comment.

Thanks, it looks good to me.

Reviewed-by: Jocelyn Falempe <jfalempe at redhat.com>
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> Fixes: 1fe182154984 ("drm/ast: Acquire I/O-register lock in atomic_commit_tail function")
> Cc: Thomas Zimmermann <tzimmermann at suse.de>
> Cc: Jocelyn Falempe <jfalempe at redhat.com>
> Cc: Dave Airlie <airlied at redhat.com>
> Cc: dri-devel at lists.freedesktop.org
> Cc: <stable at vger.kernel.org> # v6.2+
> ---
>   drivers/gpu/drm/ast/ast_mode.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
> index 4cac5c7f4547..20fbea11b710 100644
> --- a/drivers/gpu/drm/ast/ast_mode.c
> +++ b/drivers/gpu/drm/ast/ast_mode.c
> @@ -939,9 +939,9 @@ static void ast_mode_config_helper_atomic_commit_tail(struct drm_atomic_state *s
>   
>   	/*
>   	 * Concurrent operations could possibly trigger a call to
> -	 * drm_connector_helper_funcs.get_modes by trying to read the
> -	 * display modes. Protect access to I/O registers by acquiring
> -	 * the I/O-register lock. Released in atomic_flush().
> +	 * drm_connector_helper_funcs.get_modes by reading the display
> +	 * modes. Protect access to registers by acquiring the modeset
> +	 * lock.
>   	 */
>   	mutex_lock(&ast->modeset_lock);
>   	drm_atomic_helper_commit_tail(state);



More information about the dri-devel mailing list