Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Paalanen <ppaalanen@gmail.com>
To: Simon Ser <contact@emersion.fr>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH] tests/kms_plane_alpha_blend: skip coverage tests on missing enum
Date: Wed, 10 Nov 2021 10:25:09 +0200	[thread overview]
Message-ID: <20211110102509.15fc49d2@eldfell> (raw)
In-Reply-To: <j9ATssWsNa_3rHgW5tZwsfuBva61xhhN3WdTP5hdEhzJQb6CU0MAm534ns0P7Gvi-099Q37QPyNlDUtihQmGsjEhB-UHty1d4IWpSGJCpoo=@emersion.fr>

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

On Tue, 09 Nov 2021 22:16:25 +0000
Simon Ser <contact@emersion.fr> wrote:

> On Tuesday, November 9th, 2021 at 19:14, Harry Wentland <harry.wentland@amd.com> wrote:
> 
> > On 2021-11-04 12:27, Simon Ser wrote:  
> > > Some KMS drivers support the KMS "pixel blend mode" plane property,
> > > but don't support the "Coverage" mode. This enum entry is missing
> > > to indicate lack of support as seen in this drm_info exerpt:
> > >
> > >     "pixel blend mode": enum {None, Pre-multiplied} = Pre-multiplied
> > >
> > > Skip the coverage tests in this case.  
> >
> > Is "coverage" interesting for compositors? We have the ability to do
> > pre-multiplied or coverage in HW but it's not hooked up currently.  
> 
> I _think_ it'll be useful with the WIP color management Wayland protocol,
> because clients will be able to submit straight (non-premult) buffers?
> 
> CC Pekka
> 
> (In any case, it's good to have the skip since it's not AMD-specific.)

Thanks for the cc, Simon!

Yes, Coverage is the only usable blending mode in KMS when you have
an alpha channel and you don't want to mess up the colors.
Unfortunately, one would also need plane-DEGAMMA to not mess up colors
in blending, since blending with physical coverage semantics[1] only
works with linear color values.

This is regardless of color management or not, it's just one necessary
step towards better color. If one wanted to use pre-multiplied blending
mode, the pre-multiplication would need to happen after plane-DEGAMMA
(and plane-CTM if you use that). Then it's not really
pre-multiplication, it's just the Coverage mode.

And yes, Wayland with color management extensions will encourage
applications to use straight alpha instead of pre-multiplied, because
plane-DEGAMMA on pre-multiplied values makes no sense. A compositor
will need to undo pre-multiplication before it can do anything.

[1] http://ssp.impulsetrain.com/translucency.html


Thanks,
pq

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2021-11-10  8:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 16:27 [igt-dev] [PATCH] tests/kms_plane_alpha_blend: skip coverage tests on missing enum Simon Ser
2021-11-04 18:44 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-11-04 21:55 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-11-09 15:53 ` [igt-dev] [PATCH] " Rodrigo Siqueira Jordao
2021-11-09 18:14 ` Harry Wentland
2021-11-09 22:16   ` Simon Ser
2021-11-10  8:25     ` Pekka Paalanen [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=20211110102509.15fc49d2@eldfell \
    --to=ppaalanen@gmail.com \
    --cc=contact@emersion.fr \
    --cc=igt-dev@lists.freedesktop.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