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: 125383 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1081138ljf; Mon, 22 Jan 2018 02:36:24 -0800 (PST) X-Google-Smtp-Source: AH8x225yyJart1NPk/LPXATVuDBDgmG66vsncnYA0b+IapALpkvuRwR1W9BtSXRFpUgF0LMpkxdY X-Received: by 10.99.96.151 with SMTP id u145mr6929139pgb.102.1516617384432; Mon, 22 Jan 2018 02:36:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516617384; cv=none; d=google.com; s=arc-20160816; b=s2Dl3TswxbL83/0fUJc77KRjQi0RwhCAY6rDsSrIOZLd7KxgMGTZPwfc4xG1zdZuxk kL4VONnFUHMwScbqAWgAD1fvPleMtGcpYa7cMHC7PRj3iB6Oxv/Xad0f3rudHAVFG2LD SxveImFdHqJM4Q+fJQTWpHzVZhOadFGN5b4gdB4Eh6df8CmgcXMM4wE8QK17D8I4r2PD +/TDQ3oh7J/5x0SbJVxzkS/EJWF9Vs9P+NLCkkQSyckhhse66J+tH/v2u4cxTUpMiVC6 pixhi9/pBrctZqF8eTzuHVFnVpszbENb+Srky0yE68hj9CReydMPGXwiGwd5sJrvNKxV o+Uw== 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=GqGkxfCcEhsKS7gb4yuFAGDQgXBBZsP480lhdne56NmUjeqrQskTn2MG6oAN+NgWGN Gebmy2plHESUpeRdD/ZklYKqvi3lIB3ipzs7eJvmUR7aUFHvoFElgS2hr9/MywIBrMUy dmPvQIFK8KL5uQAMwn44DQpQaeoPKpnUE2RvQA2jxIml+T/D9z07mv2wGFwY+G7KH2TY O2gtic9caMaJBUw87juggMIOqKtmzx1PKk0IH8RaaApgWaWk5QrI1H1BY88QY2cPp3LC w44OodJ2+FZbHjz8ph2kVWdFolj/fR0htHlHluabCPeey68nfPzidOXET3sDXo16EP6p GegQ== 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 w9-v6si3294687plp.93.2018.01.22.02.36.24; Mon, 22 Jan 2018 02:36:24 -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 S1751393AbeAVKgW (ORCPT + 28 others); Mon, 22 Jan 2018 05:36:22 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:46543 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750919AbeAVKgN (ORCPT ); Mon, 22 Jan 2018 05:36:13 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 022DE20721; Mon, 22 Jan 2018 11:36:12 +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 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 Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, thomas@vitsch.nl 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: 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 Acked-by: Chen-Yu Tsai 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); }