[PATCH v5 04/19] drm/atomic: Expand atomic_create_state expectations for drm_private_obj

Thomas Zimmermann tzimmermann at suse.de
Tue May 26 02:03:46 PDT 2026



Am 19.05.26 um 11:01 schrieb Maxime Ripard:
> The atomic_create_state callback documentation for planes, CRTCs, and
> connectors explicitly states the expected behaviour: the returned
> state must not be assigned to the object's state pointer, and hardware
> must not be touched.
>
> The drm_private_state_funcs.atomic_create_state documentation is
> missing this clarification. Add it for consistency.
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>
> Signed-off-by: Maxime Ripard <mripard at kernel.org>

Reviewed-by: Thomas Zimmermann <tzimmermann at suse.de>

> ---
>   include/drm/drm_atomic.h | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
> index 1a80a8cdf269..88087910ab1a 100644
> --- a/include/drm/drm_atomic.h
> +++ b/include/drm/drm_atomic.h
> @@ -263,11 +263,14 @@ struct drm_private_state;
>   struct drm_private_state_funcs {
>   	/**
>   	 * @atomic_create_state:
>   	 *
>   	 * Allocates a pristine, initialized, state for the private
> -	 * object and returns it.
> +	 * object and returns it. This callback must have no side
> +	 * effects: in particular, the returned state must not be
> +	 * assigned to the object's state pointer and it must not affect
> +	 * the hardware state.
>   	 *
>   	 * RETURNS:
>   	 *
>   	 * A new, pristine, private state instance or an error pointer
>   	 * on failure.
>

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)





More information about the linux-arm-kernel mailing list