public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: jernej.skrabec@siol.net (Jernej Škrabec)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] drm/sun4i: Implement zpos for DE2
Date: Wed, 27 Jun 2018 22:58:28 +0200	[thread overview]
Message-ID: <8012754.crdjCMeE0H@jernej-laptop> (raw)
In-Reply-To: <20180627182500.eanqagmcfmsgzos2@flea>

Dne sreda, 27. junij 2018 ob 20:25:00 CEST je Maxime Ripard napisal(a):
> Hi!
> 
> On Wed, Jun 27, 2018 at 06:45:14PM +0200, Jernej Skrabec wrote:
> > Initial implementation of DE2 planes only supported fixed zpos.
> > 
> > Expand implementation with configurable zpos property.
> > 
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> 
> Thanks for that work. I guess you should expand a bit on the exact
> setup you're doing here.

OK.

> 
> Are the pipes working the same way on the DE2 than on DE1, ie does the
> pipe blending applies before the alpha blending, and therefore you
> need to make sure that there's not two planes with alpha going to the
> same pipe?

I'm not familiar with DE1 and I'm not sure what the problem is.

However, there is an issue in DE2 when alpha blending multiple planes if 
bottom-most plane doesn't cover all screen. In this case alpha blending 
produce weird result on screen. Fortunately, there is elegant solution. Black 
opaque fill color is enabled for pipe 0 (always at the bottom), which covers 
any "undefined region" and that makes alpha blending happy again.

Alternatively, blending modes between planes could be tweaked or disabled, but 
I found aforementioned solution is much simpler and you set it only once.

> 
> Also, you seem to use the pipe and channels indifferently now, why is
> that?

Why do you think so?

Channel always represents HW unit, for example, on H3, mixer0, channel 0 
always represents VI plane, channel 1, represents first UI, plane, channel 2, 
second UI plane, etc.

Pipe 0 always represent channel at the bottom, pipe 1 channel on top pipe 0, 
etc. Initial, fixed zpos implementation really had 1:1 mapping, but now it can 
be different.

Register SUN8I_MIXER_BLEND_ROUTE holds pipe <-> channel mappings.
Bits 3:0 represents pipe 0 and holds channel number. Bits 7:4 represents pipe 
1, etc.

Additionaly,  there can be holes, for example, pipe 3 and pipe 0 are enabled 
and pipe 1 and 2 are disabled.

I hope I answered your questions.

Best regards,
Jernej

  reply	other threads:[~2018-06-27 20:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-27 16:45 [PATCH] drm/sun4i: Implement zpos for DE2 Jernej Skrabec
2018-06-27 18:25 ` Maxime Ripard
2018-06-27 20:58   ` Jernej Škrabec [this message]
2018-06-27 22:05     ` [linux-sunxi] " Jernej Škrabec
2018-06-29  7:17     ` Maxime Ripard
2018-06-29 18:59       ` Jernej Škrabec
2018-07-05  8:04         ` Maxime Ripard
2018-07-03 15:43 ` Paul Kocialkowski

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=8012754.crdjCMeE0H@jernej-laptop \
    --to=jernej.skrabec@siol.net \
    --cc=linux-arm-kernel@lists.infradead.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