From patchwork Mon Jan 22 10:35:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 125394 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1081467ljf; Mon, 22 Jan 2018 02:37:14 -0800 (PST) X-Google-Smtp-Source: AH8x227pJV28qKeJRNfT47Oy/Hph8fwN2xa00AOB9iFkupZJIxhsdB9vhi+K2Sq431nghCxUciKx X-Received: by 10.101.97.139 with SMTP id c11mr4469828pgv.219.1516617434224; Mon, 22 Jan 2018 02:37:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516617434; cv=none; d=google.com; s=arc-20160816; b=jhPaQRd/TPSact6tuGHZSzn3bix0GasolWIg/vlYraScrfFA5UXwZrc7CdaV9qGG0B haDN7ulAf4EUULydX9X0qn0pfKDeGn+NSlQFXuXfV1qCnc9RQAoSsXp0vxKyRUJU5qFP O8V8tno6XYD+cfsEqPlmw3qRvptav8DoyuXAguVFs+l7qs65p9cIthpH9ZDfhqsx7pl1 AAhqCw7ZCsB362e2cDW7LcvVNqhIb3sABNwl+IYng7ma5LDQZdfMMUAy83uOiQG8HqNK e9npc/3Ma1tx1AHEm2F+GHd2jq0ZgeZjLyl+Pyib8YJMxUZAcArnH9MaZMsL8ZS76q4I uZLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:references:in-reply-to:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=iqeNhvnVY6GNsKmfbYf6VMqsO/IKDeGMDsiRl3IXNY4=; b=YSctH3Vybt3nfzMVFqsLjnUmN+x7hblTGNaNFPYirmS/YwPHmqzTjLfsz9HMJ+y9y0 6sqVYFnUdiRx+nXMeyt72T7+uqKhh+P5oQ3Fc+VicmnBFR+UnsQX1vmqV6ikeBzKvzj1 Gm+UrlGtZX/O4XMqp5O5jQuK4kh1j+kxzwfvEGCTRSsUYzl619lLfyIDvayKJuuRWQs7 G8Ce0giHGy88Q9BcQtjfMrAdFk0CtzQNwfjV34nIX7Zc5VktMiOyS+D2Oi9ne2G9HJlz oZxK34p1ODzWiSOBQEfuKEOX3IdjJtlH1W8Cm2AgPlifB8xXSEkxIEykEMl7xTUscNg/ 85DA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id i1si3438751pgf.539.2018.01.22.02.37.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jan 2018 02:37:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CA8DC6E1A4; Mon, 22 Jan 2018 10:36:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 42F8A6E188 for ; Mon, 22 Jan 2018 10:36:12 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 9B6D12066A; Mon, 22 Jan 2018 11:36:11 +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 BFAB520721; Mon, 22 Jan 2018 11:35:54 +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 19/19] drm/sun4i: backend: Remove ARGB spoofing Date: Mon, 22 Jan 2018 11:35:48 +0100 Message-Id: <7d2835035a00dc8a58e4715fd0a4376b199f6cb7.1516617243.git-series.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, thomas@vitsch.nl X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" We've had some code for quite some time to prevent the alpha bug from happening on the lowest primary plane. Since we now check for this in our atomic_check, we can simply remove it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_backend.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c index f5beeec06fd5..b414dc87e217 100644 --- a/drivers/gpu/drm/sun4i/sun4i_backend.c +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c @@ -92,13 +92,8 @@ void sun4i_backend_layer_enable(struct sun4i_backend *backend, SUN4I_BACKEND_MODCTL_LAY_EN(layer), val); } -static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane, - u32 format, u32 *mode) +static int sun4i_backend_drm_format_to_layer(u32 format, u32 *mode) { - if (plane && (plane->type == DRM_PLANE_TYPE_PRIMARY) && - (format == DRM_FORMAT_ARGB8888)) - format = DRM_FORMAT_XRGB8888; - switch (format) { case DRM_FORMAT_ARGB8888: *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB8888; @@ -200,8 +195,7 @@ int sun4i_backend_update_layer_formats(struct sun4i_backend *backend, SUN4I_BACKEND_ATTCTL_REG0_LAY_GLBALPHA_EN, val); - ret = sun4i_backend_drm_format_to_layer(plane, fb->format->format, - &val); + ret = sun4i_backend_drm_format_to_layer(fb->format->format, &val); if (ret) { DRM_DEBUG_DRIVER("Invalid format\n"); return ret; @@ -220,7 +214,7 @@ int sun4i_backend_update_layer_frontend(struct sun4i_backend *backend, u32 val; int ret; - ret = sun4i_backend_drm_format_to_layer(NULL, fmt, &val); + ret = sun4i_backend_drm_format_to_layer(fmt, &val); if (ret) { DRM_DEBUG_DRIVER("Invalid format\n"); return ret;