From patchwork Wed Jul 12 08:13:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 9836161 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 546F6602BD for ; Wed, 12 Jul 2017 08:14:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 472D3285B9 for ; Wed, 12 Jul 2017 08:14:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3BBAE285DD; Wed, 12 Jul 2017 08:14:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E9917285B9 for ; Wed, 12 Jul 2017 08:14:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=dc5nnuyqFcx+9PKUOC63NyhRXxElId7NdcZCe5yADOA=; b=gAB1EMvEhZtyILaoAer449lIui O45kaLvW3o3TGkKw3+TGFdFsAWf0CDQ03JdumkIg+hBfSwHwILAoiHdJGBf2nM8t688EeU1R4t0+9 NRDcraAK1Lyhjglv/Qp1TF6H3qNeR6uvBr7eD75qdkuzQydI4q/bmpvDEy2UzJrSwcfK4BNa3lEuX D3BQCZJVQf1DmoIDXdQxAvcQt+zWwqcXxX1T7QkbN0KtuE5zLwvBnu22uog4fQiem/LPvnqkYgJsr UjUb9MDOBxWDGaeWqLek7inEjbDw7CysnoXpjFciiXj6IZhaemlL8PsE2Z0uDRgy4OEdJ/pxyTjkF +FMF0j+g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dVCnA-0002UH-3z; Wed, 12 Jul 2017 08:14:40 +0000 Received: from mblankhorst.nl ([2a02:2308::216:3eff:fe92:dfa3]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dVCmp-0002CE-Hk; Wed, 12 Jul 2017 08:14:21 +0000 From: Maarten Lankhorst To: dri-devel@lists.freedesktop.org Subject: [PATCH 09/16] drm/rockchip: Use for_each_oldnew_plane_in_state in vop_crtc_atomic_flush Date: Wed, 12 Jul 2017 10:13:37 +0200 Message-Id: <20170712081344.25495-10-maarten.lankhorst@linux.intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170712081344.25495-1-maarten.lankhorst@linux.intel.com> References: <20170712081344.25495-1-maarten.lankhorst@linux.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170712_011419_779507_580390A1 X-CRM114-Status: UNSURE ( 7.71 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , intel-gfx@lists.freedesktop.org, Maarten Lankhorst , linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Mark Yao MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP for_each_obj_in_state is about to be removed, so use the new atomic iterator macros. Signed-off-by: Maarten Lankhorst Cc: Mark Yao Cc: Heiko Stuebner Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Reviewed-by: Daniel Vetter Acked-by: Mark Yao --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index ee876a9631f0..f90088b1a247 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -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);