[PATCH 3/6] drm/vc4: Don't check plane state more than once

Eric Anholt eric at anholt.net
Thu Nov 15 20:41:36 UTC 2018


Boris Brezillon <boris.brezillon at bootlin.com> writes:

> We are about to use vc4_plane_mode_set() in the async check path, but
> async check can decide that async update is not possible and force the
> driver to fallback to a sync update.
>
> All the checks that have been done on the plane state during async check
> stay valid, and checking it again is not necessary. Add a ->checked
> field to vc4_plane_state, and use it to track the status of the state
> (checked or not).
>
> Signed-off-by: Boris Brezillon <boris.brezillon at bootlin.com>
> ---
>  drivers/gpu/drm/vc4/vc4_drv.h   |  5 +++++
>  drivers/gpu/drm/vc4/vc4_plane.c | 10 ++++++++++
>  2 files changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
> index 9ed05fb61eb6..d1000c4805c2 100644
> --- a/drivers/gpu/drm/vc4/vc4_drv.h
> +++ b/drivers/gpu/drm/vc4/vc4_drv.h
> @@ -370,6 +370,11 @@ struct vc4_plane_state {
>  	 * to enable background color fill.
>  	 */
>  	bool needs_bg_fill;
> +
> +	/* Mark the state as checked. Useful to avoid checking it twice when
> +	 * async update is not possible.
> +	 */
> +	bool checked;
>  };

Since this doesn't cover the whole atomic_check process, which won't
have been called from async update, maybe rename to dlist_initialized or
something?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20181115/81959ea7/attachment.sig>


More information about the dri-devel mailing list