[PATCH 08/19] drm/vc4: Use new atomic iterator macros.

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


Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 drivers/gpu/drm/vc4/vc4_kms.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
index f31f72af8551..76cc9b374215 100644
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -111,7 +111,7 @@ static int vc4_atomic_commit(struct drm_device *dev,
 	uint64_t wait_seqno = 0;
 	struct vc4_commit *c;
 	struct drm_plane *plane;
-	struct drm_plane_state *new_state;
+	struct drm_plane_state *old_state, *new_state;
 
 	c = commit_init(state);
 	if (!c)
@@ -139,8 +139,8 @@ static int vc4_atomic_commit(struct drm_device *dev,
 		return ret;
 	}
 
-	for_each_plane_in_state(state, plane, new_state, i) {
-		if ((plane->state->fb != new_state->fb) && new_state->fb) {
+	for_each_oldnew_plane_in_state(state, plane, old_state, new_state, i) {
+		if (old_state->fb != new_state->fb && new_state->fb) {
 			struct drm_gem_cma_object *cma_bo =
 				drm_fb_cma_get_gem_obj(new_state->fb, 0);
 			struct vc4_bo *bo = to_vc4_bo(&cma_bo->base);
-- 
2.7.4



More information about the dri-devel mailing list