Commit e741f2b1 authored by Maarten Lankhorst's avatar Maarten Lankhorst

drm/rockchip: Use for_each_oldnew_plane_in_state in vop_crtc_atomic_flush

for_each_obj_in_state is about to be removed, so use the new atomic
iterator macros.
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Mark Yao <mark.yao@rock-chips.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Link: http://patchwork.freedesktop.org/patch/msgid/20170712081344.25495-10-maarten.lankhorst@linux.intel.comReviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: default avatarMark Yao <mark.yao@rock-chips.com>
parent d57da16f
......@@ -1029,7 +1029,7 @@ static void vop_crtc_atomic_flush(struct drm_crtc *crtc,
struct drm_crtc_state *old_crtc_state)
{
struct drm_atomic_state *old_state = old_crtc_state->state;
struct drm_plane_state *old_plane_state;
struct drm_plane_state *old_plane_state, *new_plane_state;
struct vop *vop = to_vop(crtc);
struct drm_plane *plane;
int i;
......@@ -1060,11 +1060,12 @@ static void vop_crtc_atomic_flush(struct drm_crtc *crtc,
}
spin_unlock_irq(&crtc->dev->event_lock);
for_each_plane_in_state(old_state, plane, old_plane_state, i) {
for_each_oldnew_plane_in_state(old_state, plane, old_plane_state,
new_plane_state, i) {
if (!old_plane_state->fb)
continue;
if (old_plane_state->fb == plane->state->fb)
if (old_plane_state->fb == new_plane_state->fb)
continue;
drm_framebuffer_reference(old_plane_state->fb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment