From patchwork Tue Jan 9 10:56:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 123882 Delivered-To: patch@linaro.org Received: by 10.80.140.226 with SMTP id r31csp306253edr; Tue, 9 Jan 2018 02:58:00 -0800 (PST) X-Google-Smtp-Source: ACJfBotsAwvCgKOyCcnEPxmJ7Uh98DN9jseb0BmMspmKifg0uUE0EXDAzeJ9E43knWuJ5NUWaReR X-Received: by 10.84.235.198 with SMTP id m6mr15512124plt.175.1515495480271; Tue, 09 Jan 2018 02:58:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515495480; cv=none; d=google.com; s=arc-20160816; b=YoA0zFQvNFM1o0Aqemb0I2Qe9UVYpdWb1l5N4e57ZW9JoFmijTqzmO911PLzOrbMuk CblBeo1WYPw0Y9bCZ27XsOZ6jEpzv8PnAIyx54n3TfwJb/33BW8Ar18kvow7EIj4fsMl EYhbRNjDXgmcYNfD8J5dJ67ADtjT5kDlcyGldLqZxSoyf5UROHuFJpFocjVPzWgnFzg8 eUBwwdaOWEsFlmLFYmUy/wEvQQkPj7x8ze/P3O2IRJ6SegqFi8jpfOy9AhpcFMAv9tbd gQew9OfcH2fpojHViPH/hxdfddNlLZQO+8kPmH2g/aEtzxsddvY7fhHmFNNyfdoeU4JY qaRg== 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=fWDxrUOjohLxVQ7pf8UVce3kUIZHRWJ39oaVolaK+ok=; b=07Fpf/+bIZTEXOM/7SnHVf2fr/rfJ34PYUlRfeEI75UJ7yWeu8sPvUQUtee1UDoNRx GwydNMNY4pljVVwLQIIaIk/w5Y80WcxCipnlaZ9agV48nbAHOtqeDUgqbuYNlkcUzII3 rEYUgbVA5gE5O0H7KAU0u138ESdQk9DCWKDbhNlI2hJBMWr3WoUucmMAz1MEK6PN2eWk Vk5VOPSdZiTENHz8+Qz+btGiwpW/zE4Z2M1T1dwPtAbIxrRUDR3eiNwgU/zemz16aB4n /O2cOI3VZ5CX4xItd+h+J/bwu0wvxL/bewHkUOliUPpREvnlSh50VBUoL3tI/puMtblB P74w== 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 p9si8879618pgs.509.2018.01.09.02.58.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jan 2018 02:58:00 -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 021AE6E0B2; Tue, 9 Jan 2018 10:57:12 +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 6CE316E0C0 for ; Tue, 9 Jan 2018 10:57:11 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id E92B52095A; Tue, 9 Jan 2018 11:57:09 +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 E3A1220986; Tue, 9 Jan 2018 11:56:47 +0100 (CET) From: Maxime Ripard To: Chen-Yu Tsai , Maxime Ripard , Daniel Vetter , Jani Nikula , Sean Paul Subject: [PATCH 19/19] drm/sun4i: backend: Remove ARGB spoofing Date: Tue, 9 Jan 2018 11:56:38 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , 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 ec47098bfdb2..15a7bce27412 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;