[PATCH] drm: document pre-multiplied assumptions
Ville Syrjälä
ville.syrjala at linux.intel.com
Wed Sep 29 12:55:27 UTC 2021
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 at emersion.fr>
> Cc: Daniel Vetter <daniel at ffwll.ch>
> Cc: Pekka Paalanen <ppaalanen at gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala at 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
More information about the dri-devel
mailing list