All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: document pre-multiplied assumptions
@ 2021-09-29  9:54 Simon Ser
  2021-09-29 12:55 ` Ville Syrjälä
  2021-09-29 13:07 ` Pekka Paalanen
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Ser @ 2021-09-29  9:54 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, Pekka Paalanen

When a plane is missing the "alpha blend mode" property, KMS drivers
will use the pre-multiplied mode.

Signed-off-by: Simon Ser <contact@emersion.fr>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Pekka Paalanen <ppaalanen@gmail.com>
---
 drivers/gpu/drm/drm_blend.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c
index ec37cbfabb50..eebb32ba84d7 100644
--- a/drivers/gpu/drm/drm_blend.c
+++ b/drivers/gpu/drm/drm_blend.c
@@ -185,6 +185,9 @@
  *		 plane does not expose the "alpha" property, then this is
  *		 assumed to be 1.0
  *
+ *	When a plane is missing this property, the plane uses the
+ *	"Pre-multiplied" equation.
+ *
  * Note that all the property extensions described here apply either to the
  * plane or the CRTC (e.g. for the background color, which currently is not
  * exposed and assumed to be black).
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm: document pre-multiplied assumptions
  2021-09-29  9:54 [PATCH] drm: document pre-multiplied assumptions Simon Ser
@ 2021-09-29 12:55 ` Ville Syrjälä
  2021-09-29 13:07 ` Pekka Paalanen
  1 sibling, 0 replies; 4+ messages in thread
From: Ville Syrjälä @ 2021-09-29 12:55 UTC (permalink / raw)
  To: Simon Ser; +Cc: dri-devel, Daniel Vetter, Pekka Paalanen

On Wed, Sep 29, 2021 at 09:54:14AM +0000, Simon Ser wrote:
> When a plane is missing the "alpha blend mode" property, KMS drivers
> will use the pre-multiplied mode.
> 
> Signed-off-by: Simon Ser <contact@emersion.fr>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Pekka Paalanen <ppaalanen@gmail.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Another option would be to sprinkle immutable props to all drivers
that claim to do alpha blending and don't currently expose the
property.

> ---
>  drivers/gpu/drm/drm_blend.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c
> index ec37cbfabb50..eebb32ba84d7 100644
> --- a/drivers/gpu/drm/drm_blend.c
> +++ b/drivers/gpu/drm/drm_blend.c
> @@ -185,6 +185,9 @@
>   *		 plane does not expose the "alpha" property, then this is
>   *		 assumed to be 1.0
>   *
> + *	When a plane is missing this property, the plane uses the
> + *	"Pre-multiplied" equation.
> + *
>   * Note that all the property extensions described here apply either to the
>   * plane or the CRTC (e.g. for the background color, which currently is not
>   * exposed and assumed to be black).
> -- 
> 2.33.0
> 

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm: document pre-multiplied assumptions
  2021-09-29  9:54 [PATCH] drm: document pre-multiplied assumptions Simon Ser
  2021-09-29 12:55 ` Ville Syrjälä
@ 2021-09-29 13:07 ` Pekka Paalanen
  2021-09-30 14:43   ` Daniel Vetter
  1 sibling, 1 reply; 4+ messages in thread
From: Pekka Paalanen @ 2021-09-29 13:07 UTC (permalink / raw)
  To: Simon Ser; +Cc: dri-devel, Daniel Vetter

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

On Wed, 29 Sep 2021 09:54:14 +0000
Simon Ser <contact@emersion.fr> wrote:

> When a plane is missing the "alpha blend mode" property, KMS drivers
> will use the pre-multiplied mode.
> 
> Signed-off-by: Simon Ser <contact@emersion.fr>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Pekka Paalanen <ppaalanen@gmail.com>
> ---
>  drivers/gpu/drm/drm_blend.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c
> index ec37cbfabb50..eebb32ba84d7 100644
> --- a/drivers/gpu/drm/drm_blend.c
> +++ b/drivers/gpu/drm/drm_blend.c
> @@ -185,6 +185,9 @@
>   *		 plane does not expose the "alpha" property, then this is
>   *		 assumed to be 1.0
>   *
> + *	When a plane is missing this property, the plane uses the
> + *	"Pre-multiplied" equation.
> + *
>   * Note that all the property extensions described here apply either to the
>   * plane or the CRTC (e.g. for the background color, which currently is not
>   * exposed and assumed to be black).

Hi Simon,

thank you! :-D

I have no idea if that's correct though, but also nothing against it,
and it does help with what I ranted about in
https://lists.freedesktop.org/archives/wayland-devel/2021-September/041993.html
so is it appropriate to offer my

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>

?


Thanks,
pq

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm: document pre-multiplied assumptions
  2021-09-29 13:07 ` Pekka Paalanen
@ 2021-09-30 14:43   ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2021-09-30 14:43 UTC (permalink / raw)
  To: Pekka Paalanen; +Cc: Simon Ser, dri-devel, Daniel Vetter

On Wed, Sep 29, 2021 at 04:07:01PM +0300, Pekka Paalanen wrote:
> On Wed, 29 Sep 2021 09:54:14 +0000
> Simon Ser <contact@emersion.fr> wrote:
> 
> > When a plane is missing the "alpha blend mode" property, KMS drivers
> > will use the pre-multiplied mode.
> > 
> > Signed-off-by: Simon Ser <contact@emersion.fr>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: Pekka Paalanen <ppaalanen@gmail.com>
> > ---
> >  drivers/gpu/drm/drm_blend.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c
> > index ec37cbfabb50..eebb32ba84d7 100644
> > --- a/drivers/gpu/drm/drm_blend.c
> > +++ b/drivers/gpu/drm/drm_blend.c
> > @@ -185,6 +185,9 @@
> >   *		 plane does not expose the "alpha" property, then this is
> >   *		 assumed to be 1.0
> >   *
> > + *	When a plane is missing this property, the plane uses the
> > + *	"Pre-multiplied" equation.
> > + *
> >   * Note that all the property extensions described here apply either to the
> >   * plane or the CRTC (e.g. for the background color, which currently is not
> >   * exposed and assumed to be black).
> 
> Hi Simon,
> 
> thank you! :-D
> 
> I have no idea if that's correct though, but also nothing against it,
> and it does help with what I ranted about in
> https://lists.freedesktop.org/archives/wayland-devel/2021-September/041993.html
> so is it appropriate to offer my
> 
> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>

I think if it's not correct we can add an immutable prop like Ville
suggested for that driver.
-Daniel

> 
> ?
> 
> 
> Thanks,
> pq



-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-30 14:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29  9:54 [PATCH] drm: document pre-multiplied assumptions Simon Ser
2021-09-29 12:55 ` Ville Syrjälä
2021-09-29 13:07 ` Pekka Paalanen
2021-09-30 14:43   ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.