From patchwork Mon Jan 22 10:35:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10178191 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 8988760224 for ; Mon, 22 Jan 2018 10:38:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AEE626E79 for ; Mon, 22 Jan 2018 10:38:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F04B27F85; Mon, 22 Jan 2018 10:38:55 +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 F28EA26E79 for ; Mon, 22 Jan 2018 10:38:54 +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=AJQtAQ0t4k8T54Tr3HBuIeBHR6 Z0FFRuvbemOZM/XZlpawbV1A1MtKiCaXg2Qb6g+ODhLeuE6zulNkarz1i8yjRPSRr1GHaNJugXriC X3lgjideM2NGfm5CPyNDK/a7yIfQze6VXUPRqnrY2h5sJs/DP7/izYRd1zvc52CQuXU2sVTvxequL Bu5hzBm94Z6vjnc28SVfACtyi9TZKXnFGw65FKkxzjkYcnvgVipsweoSEiLUAi8Uj62naLSZ3T6oN uHxIHvpZJvZXfy/RxQef3Rk9K6QqN5nXDMQ0U8k7r+dzXb//WL1YRG3oNFcngkm46oLT+wysumDEb tMQfEmOA==; 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 1edZV6-0002Da-23; Mon, 22 Jan 2018 10:38:52 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1edZSi-0007T3-MY for linux-arm-kernel@lists.infradead.org; Mon, 22 Jan 2018 10:36:30 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 022DE20721; Mon, 22 Jan 2018 11:36:12 +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 2E5C020722; Mon, 22 Jan 2018 11:35:55 +0100 (CET) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , daniel.vetter@intel.com, jani.nikula@linux.intel.com, seanpaul@chromium.org Subject: [PATCH v2 12/19] drm/sun4i: backend: Move the coord function in the shared part Date: Mon, 22 Jan 2018 11:35:41 +0100 Message-Id: <2cd57bcf13652109da7bd5bbe12fa1d29429f02f.1516617243.git-series.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: 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, 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 Acked-by: Chen-Yu Tsai --- 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); }