[Intel-gfx] [PATCH 13/19] drm/imx: Use new atomic iterator macros

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Mon Oct 17 12:37:12 UTC 2016


Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 drivers/gpu/drm/imx/imx-drm-core.c | 10 +++++-----
 1 file 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 98df09c2b388..d484af773460 100644
--- a/drivers/gpu/drm/imx/imx-drm-core.c
+++ b/drivers/gpu/drm/imx/imx-drm-core.c
@@ -155,7 +155,7 @@ static int imx_drm_atomic_commit(struct drm_device *dev,
 				 struct drm_atomic_state *state,
 				 bool nonblock)
 {
-	struct drm_plane_state *plane_state;
+	struct drm_plane_state *old_plane_state, *new_plane_state;
 	struct drm_plane *plane;
 	struct dma_buf *dma_buf;
 	int i;
@@ -164,13 +164,13 @@ static int imx_drm_atomic_commit(struct drm_device *dev,
 	 * If the plane fb has an dma-buf attached, fish out the exclusive
 	 * fence for the atomic helper to wait on.
 	 */
-	for_each_plane_in_state(state, plane, plane_state, i) {
-		if ((plane->state->fb != plane_state->fb) && plane_state->fb) {
-			dma_buf = drm_fb_cma_get_gem_obj(plane_state->fb,
+	for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) {
+		if ((old_plane_state->fb != new_plane_state->fb) && new_plane_state->fb) {
+			dma_buf = drm_fb_cma_get_gem_obj(new_plane_state->fb,
 							 0)->base.dma_buf;
 			if (!dma_buf)
 				continue;
-			plane_state->fence =
+			new_plane_state->fence =
 				reservation_object_get_excl_rcu(dma_buf->resv);
 		}
 	}
-- 
2.7.4



More information about the Intel-gfx mailing list