Re: [PATCH 06/38] drm/omap: Use for_each_plane_in_state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

Thank you for the patch.

On Thursday 02 Jun 2016 00:06:29 Daniel Vetter wrote:
> We want to hide drm_atomic_stat internals a bit better.
> 
> Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> Cc: Tomi Valkeinen <tomi.valkeinen@xxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>

Acked-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/omapdrm/omap_drv.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c
> b/drivers/gpu/drm/omapdrm/omap_drv.c index d86f5479345b..4798ba43ff5b
> 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> @@ -142,8 +142,9 @@ static int omap_atomic_commit(struct drm_device *dev,
>  {
>  	struct omap_drm_private *priv = dev->dev_private;
>  	struct omap_atomic_state_commit *commit;
> -	unsigned int i;
> -	int ret;
> +	struct drm_crtc *crtc;
> +	struct drm_crtc_state *crtc_state;
> +	int i, ret;
> 
>  	ret = drm_atomic_helper_prepare_planes(dev, state);
>  	if (ret)
> @@ -163,10 +164,8 @@ static int omap_atomic_commit(struct drm_device *dev,
>  	/* Wait until all affected CRTCs have completed previous commits and
>  	 * mark them as pending.
>  	 */
> -	for (i = 0; i < dev->mode_config.num_crtc; ++i) {
> -		if (state->crtcs[i])
> -			commit->crtcs |= 1 << drm_crtc_index(state->crtcs[i]);
> -	}
> +	for_each_crtc_in_state(state, crtc, crtc_state, i)
> +		commit->crtcs |= 1 << drm_crtc_index(crtc);
> 
>  	wait_event(priv->commit.wait, !omap_atomic_is_pending(priv, commit));

-- 
Regards,

Laurent Pinchart

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux