[PATCH v2 2/4] drm/imx: use drm_atomic_set_fence_for_plane() to set the fence

Philipp Zabel p.zabel at pengutronix.de
Mon Nov 7 14:47:05 UTC 2016


Am Montag, den 07.11.2016, 19:03 +0900 schrieb Gustavo Padovan:
> From: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
> 
> drm_atomic_set_fence_for_plane() is smart and won't overwrite
> plane_state->fence if the user already set an explicit fence there.
> 
> Cc: Philipp Zabel <p.zabel at pengutronix.de>
> Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

Acked-by: Philipp Zabel <p.zabel at pengutronix.de>

> ---
>  drivers/gpu/drm/imx/imx-drm-core.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c
> index 98df09c..07fe955 100644
> --- a/drivers/gpu/drm/imx/imx-drm-core.c
> +++ b/drivers/gpu/drm/imx/imx-drm-core.c
> @@ -158,6 +158,7 @@ static int imx_drm_atomic_commit(struct drm_device *dev,
>  	struct drm_plane_state *plane_state;
>  	struct drm_plane *plane;
>  	struct dma_buf *dma_buf;
> +	struct dma_fence *fence;
>  	int i;
>  
>  	/*
> @@ -170,8 +171,9 @@ static int imx_drm_atomic_commit(struct drm_device *dev,
>  							 0)->base.dma_buf;
>  			if (!dma_buf)
>  				continue;
> -			plane_state->fence =
> -				reservation_object_get_excl_rcu(dma_buf->resv);
> +			fence = reservation_object_get_excl_rcu(dma_buf->resv);
> +
> +			drm_atomic_set_fence_for_plane(plane_state, fence);
>  		}
>  	}

regards
Philipp



More information about the dri-devel mailing list