Re: [PATCH 07/26] drm/exynos: Use for_each_crtc_in_state

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

 




2016년 05월 30일 03:35에 Daniel Vetter 이(가) 쓴 글:
> We want to hide drm_atomic_state internals better.

Acked-by: Inki Dae <inki.dae@xxxxxxxxxxx>

Thanks,
Inki Dae

> 
> Cc: Inki Dae <inki.dae@xxxxxxxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_drv.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> index 2dd820e23b0c..cabc5fd0246d 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> @@ -267,6 +267,8 @@ int exynos_atomic_commit(struct drm_device *dev, struct drm_atomic_state *state,
>  {
>  	struct exynos_drm_private *priv = dev->dev_private;
>  	struct exynos_atomic_commit *commit;
> +	struct drm_crtc *crtc;
> +	struct drm_crtc_state *crtc_state;
>  	int i, ret;
>  
>  	commit = kzalloc(sizeof(*commit), GFP_KERNEL);
> @@ -288,10 +290,8 @@ int exynos_atomic_commit(struct drm_device *dev, struct drm_atomic_state *state,
>  	/* 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->wait, !commit_is_pending(priv, commit->crtcs));
>  
> 
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux