Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp209481imm; Wed, 18 Jul 2018 00:22:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc89qukq4bripdC3GaZ5jYdOUdF69rzhxXLtgYk74yvx0YKa8eIZY8qhFdSW9nfaQlWqcSg X-Received: by 2002:a17:902:28a6:: with SMTP id f35-v6mr4837282plb.110.1531898574852; Wed, 18 Jul 2018 00:22:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531898574; cv=none; d=google.com; s=arc-20160816; b=xlmiZyF2K6bDaoYAC5KHQYI4ha/JZuok4CbrLHkgjZY2w8+cMCyynUYyTZ2wlb7Tiv CJ9H9+cqIlKmGqalZ+tUFY/kz43NK/IFbvWfHJtl/Lh42KmCb7A8o5l7eMGxML5RgyVl FhkgQhNWpjd24wsIBuL7yzXt2o5laJGMkBjV5f5Yo86pByEvbnD+lg6C4OI56VMpmAW9 C6PdfRcGvEU361qiWgd+G+IVBiXs6eHQCUq+nWaar8sXxagjWMUXINA4nfgyPYXIPXpq srlFpUI+yXWTBHR6aqRisTXchlCEERouXKkHWxNyQyJkZ7TjSX3OAyJTzsII3hbD4M85 hIZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:references :in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=sfPbStsSOKSGdhwjY9xeAP7SIcIzqfShHOkouQjIKuc=; b=LgCbu/KyIuLA+dZl6MHAa3ZZzcim6bSlQdN3EF4n5CNKjPWpHPdmgo6a1Ke8v9mraM KLnuIyL3iKSULlI+4CPyjy/OGj60Jf68jwDvhieKj6MrJSztbKHYI7Tcettrk7VRAbLx FfrchvPK56jib1pmV0N4ODwKJ65Kf0GAzwv9KLB78VL/feLlEdwGKVhLf06IzzUJ5VZk wX82BTHdpCdBl+Vuxx1gqKBV6Z/ZhLIT7hMbBVjaqgcZrq6gcCrhBqjL4r+tJ9vjX9Iz MEuL+y/f+N2gK3YWKQOelaCS1m8U1pSD8SM24nPhcbvpHW0ooOs7hMnvG8Epx4BULG8H KCqg== 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 a10-v6si2748163pln.349.2018.07.18.00.22.39; Wed, 18 Jul 2018 00:22:54 -0700 (PDT) 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 S1728103AbeGRH6W (ORCPT + 99 others); Wed, 18 Jul 2018 03:58:22 -0400 Received: from mail.bootlin.com ([62.4.15.54]:38266 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbeGRH6W (ORCPT ); Wed, 18 Jul 2018 03:58:22 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 9C5C920741; Wed, 18 Jul 2018 09:21:54 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.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 aptenodytes (AAubervilliers-681-1-27-161.w90-88.abo.wanadoo.fr [90.88.147.161]) by mail.bootlin.com (Postfix) with ESMTPSA id 01185208FF; Wed, 18 Jul 2018 09:21:17 +0200 (CEST) Message-ID: Subject: Re: [linux-sunxi] [PATCH 2/2] drm/sun4i: sun4i: Introduce a quirk for lowest plane alpha support From: Paul Kocialkowski To: Julian Calaby Cc: dri-devel , "Mailing List, Arm" , "linux-kernel@vger.kernel.org" , Maxime Ripard , David Airlie , Chen-Yu Tsai , thomas.petazzoni@bootlin.com, linux-sunxi Date: Wed, 18 Jul 2018 09:21:17 +0200 In-Reply-To: References: <20180717085230.17472-1-paul.kocialkowski@bootlin.com> <20180717085230.17472-2-paul.kocialkowski@bootlin.com> Organization: Bootlin Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-jKeEluu2eYf8U2KMKTrE" X-Mailer: Evolution 3.28.4 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-jKeEluu2eYf8U2KMKTrE Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Tue, 2018-07-17 at 22:41 +1000, Julian Calaby wrote: > Hi Paul, >=20 > On Tue, Jul 17, 2018 at 6:53 PM Paul Kocialkowski > wrote: > >=20 > > Not all sunxi platforms with the first version of the Display Engine > > support an alpha component on the plane with the lowest z position > > (as in: lowest z-pos), that gets blended with the background color. > >=20 > > In particular, the A13 is known to have this limitation. However, it wa= s > > recently discovered that the A20 and A33 are capable of having alpha on > > their lowest plane. > >=20 > > Thus, this introduces a specific quirk to indicate such support, > > per-platform. Since this was not tested on sun4i and sun6i platforms, a > > conservative approach is kept and this feature is not supported. > >=20 > > Signed-off-by: Paul Kocialkowski > > --- > > drivers/gpu/drm/sun4i/sun4i_backend.c | 10 ++++++++-- > > 1 file changed, 8 insertions(+), 2 deletions(-) > >=20 > > diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/su= n4i/sun4i_backend.c > > index a3cc398d4d80..cdc4a8a91ea2 100644 > > --- a/drivers/gpu/drm/sun4i/sun4i_backend.c > > +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c > > @@ -584,8 +587,9 @@ static int sun4i_backend_atomic_check(struct sunxi_= engine *engine, > > } > >=20 > > /* We can't have an alpha plane at the lowest position */ > > - if (plane_states[0]->fb->format->has_alpha || > > - (plane_states[0]->alpha !=3D DRM_BLEND_ALPHA_OPAQUE)) > > + if ((plane_states[0]->fb->format->has_alpha || > > + (plane_states[0]->alpha !=3D DRM_BLEND_ALPHA_OPAQUE)) && > > + !backend->quirks->supports_lowest_plane_alpha) >=20 > From a readability perspective, it'd be fractionally nicer if the > quirk check was before the alpha checks. Agreed, I will do that in v2. Thanks! --=20 Paul Kocialkowski, Bootlin (formerly Free Electrons) Embedded Linux and kernel engineering https://bootlin.com --=-jKeEluu2eYf8U2KMKTrE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAltO6m0ACgkQ3cLmz3+f v9GSSgf/SsA1FXEXN0DNZ59qY3tI2bsZNB8COFdbGAi2c5JichteR1bgfLjRwMG5 EhDTEb9VxXxaq0v72BK2cKYSZ4VBKEiRO1T2hmK0a/UG4lpJRIdpZFEWyyUH5HNL dDtKr5XNecDesXYaYjH6XrVLhiq7g9G1KqYx6ZVTd06K8tLB47Nixo+5WEZ2gdmd 4s2RtCtAtl6dDGf24gvyLzMSS+w2YLuoMSXn7qi4ajAx45Q5Zov1wmNV/MCovZoR W1zmRlXHy89+TFxNLRV9/T3kHgr4d85lXZ/G2bl4f0v9dY34qAk8E/xKb9hDzUNB arc4JJSsZZqxDsBe/lKU6VwwbTWitA== =CvsW -----END PGP SIGNATURE----- --=-jKeEluu2eYf8U2KMKTrE--