From patchwork Tue Jan 9 10:56:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10151773 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 77337603ED for ; Tue, 9 Jan 2018 11:15:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD27326222 for ; Tue, 9 Jan 2018 11:15:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0E172656B; Tue, 9 Jan 2018 11:15:43 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED 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 5EF8126222 for ; Tue, 9 Jan 2018 11:15:43 +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=ExPnquD916LSkbynU/v4XJQpB4fMm7o+EwttnkURqwQ=; b=hVAxCeABEZgUsbJDUiXvuA2qZv idM5i5PjGdixhfHA/1Tt0VzmoEzOIXI3FBvn+nOsf0a9AGit+8zXHcYQnLqJ6DkKU3X65FYK7DY/D UyUItoyzxBtNkwl7SRKQvDtGyz50vIsNzHVN+shT0Iw3/ZdJZMdNMZD5iGQL0GiMYneR7Dcv69ZtV FdFGWjWItZI27LpXijKCKZrs6nqNOGTL1Ao7yxz2WoSsQioOgn7ZSvIEeXTEqgOWf14yqxsbfMlQF k1Pu7WnS9ds9zndQam/I6eOTUjvi8ZAUKCPhESIoYiHo3KtAjxrhOBAr7DpV2W6cXpts1d29WU4zX Odwm/5Dg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYrsV-0003gG-Fm; Tue, 09 Jan 2018 11:15:35 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYrpa-0000qt-Lq for linux-arm-kernel@bombadil.infradead.org; Tue, 09 Jan 2018 11:12:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gQUdQ+gr8TwzHoRwuT45m3zqHz/4QX+3rAa77ofAboY=; b=s0VdeLHC2ExaYo7pStnjbmUKx mWd2X9UKi0rjb8GqJENg/DABCf0vjWZ4KDi0tHPMJXXRNAY9Z5pkuaNuPRTD5HkK4mZBflKZa3p3j diZddfRKbRiuBg6oXUVONBksSYfnrYP4zavWkJmECKxzXZ8wY/PEdhipCSpTk9RggFMcbBXM3LFSF d1QQzT8EMl7NxTaTQTcH33lPfmmObL+Mb0n/2eQUHCxX5/FGorwjzdGdRNaTI1okY9CIV1wzSs2VL 9GoONWg2hi72exQZIoOu+p4PGaHA/3KWeRguu+TgEHtYLcunkMiGLDS9rcBewjAa0xgavgtN1bq1L i+U7q58CQ==; Received: from mail.free-electrons.com ([62.4.15.54]) by casper.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYraZ-0000pC-Gl for linux-arm-kernel@lists.infradead.org; Tue, 09 Jan 2018 10:57:05 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 1BC38203B4; Tue, 9 Jan 2018 11:56:52 +0100 (CET) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id ECA8B20377; Tue, 9 Jan 2018 11:56:41 +0100 (CET) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , Daniel Vetter , Jani Nikula , Sean Paul Subject: [PATCH 12/19] drm/sun4i: backend: Move the coord function in the shared part Date: Tue, 9 Jan 2018 11:56:31 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180109_105703_557902_B5434331 X-CRM114-Status: GOOD ( 11.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, thomas@vitsch.nl MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The function supposed to update a plane's coordinates is called in both branches of our function. Let's move it out the if statement. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_layer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c index f03da16eb92a..c448cb6b9fa9 100644 --- a/drivers/gpu/drm/sun4i/sun4i_layer.c +++ b/drivers/gpu/drm/sun4i/sun4i_layer.c @@ -106,14 +106,13 @@ static void sun4i_backend_layer_atomic_update(struct drm_plane *plane, DRM_FORMAT_ARGB8888); sun4i_backend_update_layer_frontend(backend, layer->id, DRM_FORMAT_ARGB8888); - sun4i_backend_update_layer_coord(backend, layer->id, plane); sun4i_frontend_enable(frontend); } else { - sun4i_backend_update_layer_coord(backend, layer->id, plane); sun4i_backend_update_layer_formats(backend, layer->id, plane); sun4i_backend_update_layer_buffer(backend, layer->id, plane); } + sun4i_backend_update_layer_coord(backend, layer->id, plane); sun4i_backend_layer_enable(backend, layer->id, true); }