drm/imx: Use atomic iterator macros
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 12 Jul 2017 08:13:40 +0000 (10:13 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 13 Jul 2017 07:54:48 +0000 (09:54 +0200)
for_each_obj_in_state is about to be removed, so use the new atomic
iterator macros.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Link: http://patchwork.freedesktop.org/patch/msgid/20170712081344.25495-13-maarten.lankhorst@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/drm/imx/imx-drm-core.c
drivers/gpu/drm/imx/ipuv3-plane.c

index 95e2181963d9aa097fef3c0063a6fc94cb024bcf..f5c621219113b6514683b0ad353ca11fd8a507e9 100644 (file)
@@ -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);
 
        }
index 49546222c6d398540a50025076c952f8444b7c66..ff53c8dec633b483667f4f55981749f812a336ae 100644 (file)
@@ -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);