From mboxrd@z Thu Jan 1 00:00:00 1970 From: eric@anholt.net (Eric Anholt) Date: Fri, 30 Mar 2018 13:37:36 -0700 Subject: [PATCH v4 1/5] drm/blend: Add a generic alpha property In-Reply-To: <402e596049beb3429faf5981682d902c70325274.1520974361.git-series.maxime.ripard@bootlin.com> References: <402e596049beb3429faf5981682d902c70325274.1520974361.git-series.maxime.ripard@bootlin.com> Message-ID: <87vadd5mgf.fsf@anholt.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Maxime Ripard writes: > Some drivers duplicate the logic to create a property to store a per-plane > alpha. > > This is especially useful if we ever want to support extra protocols for > Wayland like: > https://lists.freedesktop.org/archives/wayland-devel/2017-August/034741.html > > Let's create a helper in order to move that to the core. > diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c > index 5a81e1b4c076..05eda2d57c77 100644 > --- a/drivers/gpu/drm/drm_blend.c > +++ b/drivers/gpu/drm/drm_blend.c > @@ -88,6 +88,12 @@ > * On top of this basic transformation additional properties can be exposed by > * the driver: > * > + * alpha: > + * Alpha is setup with drm_plane_create_alpha_property(). It controls the s/setup/set up/ > + * plane-wide opacity, from transparent (0) to opaque (0xffff). It can be > + * combined with pixel alpha. > + * The alpha value is represented as premultiplied alpha. I don't think this premultiplied comment makes any sense. What are you saying it's premultiplied with? Maybe you mean that the output pixels will have both their color and alpha channels multiplied by this alpha? I'd just drop it. Reviewed-by: Eric Anholt We should probably do this property for vc4 at some point, too. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH v4 1/5] drm/blend: Add a generic alpha property Date: Fri, 30 Mar 2018 13:37:36 -0700 Message-ID: <87vadd5mgf.fsf@anholt.net> References: <402e596049beb3429faf5981682d902c70325274.1520974361.git-series.maxime.ripard@bootlin.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0007460463==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id 2071A6E424 for ; Fri, 30 Mar 2018 20:37:41 +0000 (UTC) In-Reply-To: <402e596049beb3429faf5981682d902c70325274.1520974361.git-series.maxime.ripard@bootlin.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Gustavo Padovan , Daniel Vetter , Maarten Lankhorst , Sean Paul Cc: Maxime Ripard , dri-devel@lists.freedesktop.org, Stefan Schake , Boris Brezillon , Chen-Yu Tsai , Laurent Pinchart , linux-arm-kernel@lists.infradead.org List-Id: dri-devel@lists.freedesktop.org --===============0007460463== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Maxime Ripard writes: > Some drivers duplicate the logic to create a property to store a per-plane > alpha. > > This is especially useful if we ever want to support extra protocols for > Wayland like: > https://lists.freedesktop.org/archives/wayland-devel/2017-August/034741.html > > Let's create a helper in order to move that to the core. > diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c > index 5a81e1b4c076..05eda2d57c77 100644 > --- a/drivers/gpu/drm/drm_blend.c > +++ b/drivers/gpu/drm/drm_blend.c > @@ -88,6 +88,12 @@ > * On top of this basic transformation additional properties can be exposed by > * the driver: > * > + * alpha: > + * Alpha is setup with drm_plane_create_alpha_property(). It controls the s/setup/set up/ > + * plane-wide opacity, from transparent (0) to opaque (0xffff). It can be > + * combined with pixel alpha. > + * The alpha value is represented as premultiplied alpha. I don't think this premultiplied comment makes any sense. What are you saying it's premultiplied with? Maybe you mean that the output pixels will have both their color and alpha channels multiplied by this alpha? I'd just drop it. Reviewed-by: Eric Anholt We should probably do this property for vc4 at some point, too. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlq+oBAACgkQtdYpNtH8 nugVHhAAlx+xL8xW9xguJxtnbAA/UWlUcxGBy8jVRCi4b+KlE2Vr2KrI6mfKb9B3 a4FzMCOHPLqCm4oj9/Er81oP1drtG7DAX1AECb7vIKlHTAMiBIuSb8v8bcGIV/ZS OR5Kb3lGAjpvuiCYLJ34CRj06+BpeY+0cPkIDeU7xtVZOxZg/6DON5+alfm4bCLT X34sZVqaraqKmUv0DkDQAGWftCIA8gsJPRGQOJSddxFbJoHtmrJEVr44YIgMlHdv FADRMabSAmKj5nsAXsDd3AsEion/EhsbQvTBvQoQoMG7FWJB6n0uzhl5j1nw/xzW Zmq+G8KEcIAda2uSyO3NioVD3Dy0aM3oNO6Q8w9i0CvG735f7G+ZJXzzSWwRM6q5 AXlVbGQt2gccOxaoMPPSll4QzljBLpP6OW3WpRnIOuQ3j/TIv5OoargbFHx+nLsi 5pqZJL0oD1p9RldObaEhRNYI7EQQ3MuOU/40yVMwggO2Du1O8/wth94VHhGVbzfK wX3coBokSerJxLA8A394pQE4LEJiG1t7tyGw4ytqypRUpOnye/tDGJ+k/Ao904Fm gUo35Rllvv+1OJJwNphzfAYIxhVGF+QMalhePiF6zjbX7ZKmn323sO68tDCzK1dr PFbKyW52TPLqdyEm8sPd0yM16fbR4hZwOJs42EPsxn53Kf8N2F0= =O1wa -----END PGP SIGNATURE----- --=-=-=-- --===============0007460463== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0007460463==--