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: 123870 Delivered-To: patch@linaro.org Received: by 10.80.140.226 with SMTP id r31csp305536edr; Tue, 9 Jan 2018 02:57:04 -0800 (PST) X-Google-Smtp-Source: ACJfBotLs+teYhU2LtS77e6xue6bfYHfZnLScs5reqH8ynwZnymLeo1Qu8rzfTX4l//wFOSuJIUU X-Received: by 10.84.160.236 with SMTP id v41mr15196970plg.40.1515495424365; Tue, 09 Jan 2018 02:57:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515495424; cv=none; d=google.com; s=arc-20160816; b=L1M7eJU7A3W5rt00tVHdJy3gky7kGCRmPKX/uN6RHbVyWxVmlpzlX+zFJpTtM8gbMl 9HV6KUTt4inKi6YVtf5CpCptFMsNNzdb1Xch67M31fRJnoudpy5YAKV/VquIBMCk9Z4P YVQl3BcJliBzYtD4J+4zO0k7YZZ2C8wLtTteydUNkSFaB4x9/aDtSUIHKANboXBgGAkV 1MsfE7L1IbMODPciltjfWTB0X1zyyeaS7qYrQQlnA6W43rHq7sk9bg7fnTirGAXsT+Uu D5CFmr56LL/mVKCo2s1rfCROPU1zCsSRBp7++KH8cE2Fzdsi9uAuuiYiYTr5tq4nZbHc JMEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=gQUdQ+gr8TwzHoRwuT45m3zqHz/4QX+3rAa77ofAboY=; b=VPdoQIn9UtjtSnP4+Z889erd8PATeoxP6WLmts0la4cQsYYysGoc9GE8kbHtG3n0/y NmcN1uTKg40xOGoIDRN92rq+WE2ZezZmrfqXPV8RtQBUcs5+3p/pcm0s/mTByY6DWPZ3 cbqfRg06Fwojf16UyizjYokiCsdo0mfMcqbt8ZUhrE4HaEHRo+sa71IFBwyF0FGa9oUE RU60eLqvOn0Zic57YOwxFNPtlGWpmXCW67nzwR+t1fLrOvszszvlXnGBSkwVamc4MSRC +hlL0w5JVRIYHbIv+Qk05K6ML7R4tHBMFandYPg/UkLZ4V604GKUheByve1qyk+0QRVy MEcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q13si1206480pgp.262.2018.01.09.02.57.04; Tue, 09 Jan 2018 02:57:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932179AbeAIK5A (ORCPT + 28 others); Tue, 9 Jan 2018 05:57:00 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:50872 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754162AbeAIK4y (ORCPT ); Tue, 9 Jan 2018 05:56:54 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 1BC38203B4; Tue, 9 Jan 2018 11:56:52 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 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 Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , thomas@vitsch.nl 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: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- git-series 0.9.1 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); }