lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a8b238c575564af364c07e31556d5b1f7f9d162f.camel@mediatek.com>
Date:   Mon, 18 Sep 2023 09:25:27 +0000
From:   CK Hu (胡俊光) <ck.hu@...iatek.com>
To:     Shawn Sung (宋孝謙) 
        <Shawn.Sung@...iatek.com>,
        "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
        "angelogioacchino.delregno@...labora.com" 
        <angelogioacchino.delregno@...labora.com>,
        "chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        "wenst@...omium.org" <wenst@...omium.org>,
        "daniel@...ll.ch" <daniel@...ll.ch>,
        "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "airlied@...il.com" <airlied@...il.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2 06/11] drm/mediatek: Support alpha blending in display
 driver

Hi, Hsiao-chien:

On Mon, 2023-09-18 at 16:42 +0800, Hsiao Chien Sung wrote:
> Support alpha blending by adding correct blend mode and
> alpha property in plane initialization.
> 
> Reviewed-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@...labora.com>
> Signed-off-by: Hsiao Chien Sung <shawn.sung@...iatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_drm_plane.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> index db2f70ae060d..f87cf56fb846 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> @@ -301,6 +301,9 @@ int mtk_plane_init(struct drm_device *dev, struct
> drm_plane *plane,
>  		   size_t num_formats)
>  {
>  	int err;
> +	u32 blend_mode = BIT(DRM_MODE_BLEND_PIXEL_NONE) |
> +			 BIT(DRM_MODE_BLEND_PREMULTI)   |
> +			 BIT(DRM_MODE_BLEND_COVERAGE);
>  
>  	if (!formats || !num_formats) {
>  		DRM_ERROR("no formats for plane\n");
> @@ -323,6 +326,14 @@ int mtk_plane_init(struct drm_device *dev,
> struct drm_plane *plane,
>  			DRM_INFO("Create rotation property failed\n");
>  	}
>  
> +	err = drm_plane_create_alpha_property(plane);
> +	if (err)
> +		DRM_ERROR("failed to create property: alpha\n");
> +
> +	err = drm_plane_create_blend_mode_property(plane, blend_mode);
> +	if (err)
> +		DRM_ERROR("failed to create property: blend_mode\n");

Do not always enable alpha function. Enable it depend on hardware
capability.

Regards,
CK

> +
>  	drm_plane_helper_add(plane, &mtk_plane_helper_funcs);
>  
>  	return 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ