Re: [Intel-gfx] [PATCH 12/16] drm/imx: Use atomic iterator macros

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

 



On Wed, Jul 12, 2017 at 10:13:40AM +0200, Maarten Lankhorst wrote:
> for_each_obj_in_state is about to be removed, so use the new atomic
> iterator macros.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> Cc: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>

Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>

> ---
>  drivers/gpu/drm/imx/imx-drm-core.c | 8 ++++----
>  drivers/gpu/drm/imx/ipuv3-plane.c  | 2 +-
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c
> index 95e2181963d9..f5c621219113 100644
> --- a/drivers/gpu/drm/imx/imx-drm-core.c
> +++ b/drivers/gpu/drm/imx/imx-drm-core.c
> @@ -115,7 +115,7 @@ static void imx_drm_atomic_commit_tail(struct drm_atomic_state *state)
>  {
>  	struct drm_device *dev = state->dev;
>  	struct drm_plane *plane;
> -	struct drm_plane_state *old_plane_state;
> +	struct drm_plane_state *old_plane_state, *new_plane_state;
>  	bool plane_disabling = false;
>  	int i;
>  
> @@ -127,15 +127,15 @@ static void imx_drm_atomic_commit_tail(struct drm_atomic_state *state)
>  
>  	drm_atomic_helper_commit_modeset_enables(dev, state);
>  
> -	for_each_plane_in_state(state, plane, old_plane_state, i) {
> -		if (drm_atomic_plane_disabling(old_plane_state, plane->state))
> +	for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) {
> +		if (drm_atomic_plane_disabling(old_plane_state, new_plane_state))
>  			plane_disabling = true;
>  	}
>  
>  	if (plane_disabling) {
>  		drm_atomic_helper_wait_for_vblanks(dev, state);
>  
> -		for_each_plane_in_state(state, plane, old_plane_state, i)
> +		for_each_old_plane_in_state(state, plane, old_plane_state, i)
>  			ipu_plane_disable_deferred(plane);
>  
>  	}
> diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c
> index 49546222c6d3..ff53c8dec633 100644
> --- a/drivers/gpu/drm/imx/ipuv3-plane.c
> +++ b/drivers/gpu/drm/imx/ipuv3-plane.c
> @@ -675,7 +675,7 @@ int ipu_planes_assign_pre(struct drm_device *dev,
>  	int available_pres = ipu_prg_max_active_channels();
>  	int i;
>  
> -	for_each_plane_in_state(state, plane, plane_state, i) {
> +	for_each_new_plane_in_state(state, plane, plane_state, i) {
>  		struct ipu_plane_state *ipu_state =
>  				to_ipu_plane_state(plane_state);
>  		struct ipu_plane *ipu_plane = to_ipu_plane(plane);
> -- 
> 2.11.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
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