Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932179AbeAIK5A (ORCPT + 1 other); 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 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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); } -- git-series 0.9.1