linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Julian Calaby <julian.calaby@gmail.com>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
	"Mailing List, Arm" <linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	David Airlie <airlied@linux.ie>, Chen-Yu Tsai <wens@csie.org>,
	thomas.petazzoni@bootlin.com,
	linux-sunxi <linux-sunxi@googlegroups.com>
Subject: Re: [linux-sunxi] [PATCH 2/2] drm/sun4i: sun4i: Introduce a quirk for lowest plane alpha support
Date: Wed, 18 Jul 2018 09:21:17 +0200	[thread overview]
Message-ID: <cdd9c0632d495aedb6cc709033c983ce19f59e48.camel@bootlin.com> (raw)
In-Reply-To: <CAGRGNgX27bbJz2qe3FOb4eP5WKgDYFUNxoz7SkUbN_QDF25pAg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2043 bytes --]

Hi,

On Tue, 2018-07-17 at 22:41 +1000, Julian Calaby wrote:
> Hi Paul,
> 
> On Tue, Jul 17, 2018 at 6:53 PM Paul Kocialkowski
> <paul.kocialkowski@bootlin.com> wrote:
> > 
> > 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.
> > 
> > In particular, the A13 is known to have this limitation. However, it was
> > recently discovered that the A20 and A33 are capable of having alpha on
> > their lowest plane.
> > 
> > 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.
> > 
> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> > ---
> >  drivers/gpu/drm/sun4i/sun4i_backend.c | 10 ++++++++--
> >  1 file changed, 8 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/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,
> >         }
> > 
> >         /* We can't have an alpha plane at the lowest position */
> > -       if (plane_states[0]->fb->format->has_alpha ||
> > -           (plane_states[0]->alpha != DRM_BLEND_ALPHA_OPAQUE))
> > +       if ((plane_states[0]->fb->format->has_alpha ||
> > +           (plane_states[0]->alpha != DRM_BLEND_ALPHA_OPAQUE)) &&
> > +           !backend->quirks->supports_lowest_plane_alpha)
> 
> 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!

-- 
Paul Kocialkowski, Bootlin (formerly Free Electrons)
Embedded Linux and kernel engineering
https://bootlin.com

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2018-07-18  7:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-17  8:52 [PATCH 1/2] drm/sun4i: sun4i: Register quirks with the backend structure Paul Kocialkowski
2018-07-17  8:52 ` [PATCH 2/2] drm/sun4i: sun4i: Introduce a quirk for lowest plane alpha support Paul Kocialkowski
2018-07-17 12:25   ` Maxime Ripard
2018-07-18  8:19     ` Paul Kocialkowski
2018-07-17 12:41   ` [linux-sunxi] " Julian Calaby
2018-07-18  7:21     ` Paul Kocialkowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cdd9c0632d495aedb6cc709033c983ce19f59e48.camel@bootlin.com \
    --to=paul.kocialkowski@bootlin.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=julian.calaby@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).