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: <1e982a7b2673ac1ee9a7c64b0373e515a4f779d3.camel@mediatek.com>
Date:   Wed, 29 Nov 2023 09:45:05 +0000
From:   Shawn Sung (宋孝謙) 
        <Shawn.Sung@...iatek.com>
To:     CK Hu (胡俊光) <ck.hu@...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>,
        "krzysztof.kozlowski+dt@...aro.org" 
        <krzysztof.kozlowski+dt@...aro.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "wenst@...omium.org" <wenst@...omium.org>,
        Jason-JH Lin (林睿祥) 
        <Jason-JH.Lin@...iatek.com>,
        Singo Chang (張興國) 
        <Singo.Chang@...iatek.com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "sean@...rly.run" <sean@...rly.run>
Subject: Re: [PATCH v3 07/11] drm/mediatek: Support alpha blending in VDOSYS0

On Thu, 2023-11-23 at 09:22 +0000, CK Hu (胡俊光) wrote:
> Hi, Hsiao-chien:
> 

----
snip
----

> > @@ -420,14 +496,92 @@ void mtk_ovl_layer_config(struct device *dev,
> > unsigned int idx,
> >  
> >  	overlay_pitch.pitch = pitch;
> >  
> > -	if (!pending->enable) {
> > +	if (!pending->enable || !pending->width || !pending->height) {
> >  		mtk_ovl_layer_off(dev, idx, cmdq_pkt);
> >  		return;
> >  	}
> >  
> > -	con = ovl_fmt_convert(ovl, fmt);
> > -	if (state->base.fb && state->base.fb->format->has_alpha)
> > -		con |= OVL_CON_AEN | OVL_CON_ALPHA;
> > +	con = ovl_fmt_convert(ovl, fmt, blend_mode);
> > +	if (state->base.fb) {
> > +		con |= OVL_CON_AEN;
> 
> It seems all SoC ovl hardware support alpha blending, why in mmsys
> just
> some support?

Because alpha blending was not implemented before, and we only verified
this patch on MT8195 and MT8188. Will review this part again. Thanks.

> > +		con |= state->base.alpha & 0xff;
> > +	}
> > +
> > +	if (blend_mode == DRM_MODE_BLEND_PIXEL_NONE ||
> > +	    (state->base.fb && !state->base.fb->format->has_alpha))
> > +		ignore_pixel_alpha = OVL_CONST_BLEND;
> > +
> > +	/* need to do Y2R and R2R to reduce 10bit data to 8bit for CRC
> > calculation */
> 
> Reducing 10 bit to 8 bit would lose color detail. Just for CRC to
> lose
> this detail? Why not just use 10 bit to calculate CRC?
> 

This is a hardware limitation, OVL will only retrieve 8 bits per
channel for CRC calculation. Although we do limit this function to
8195/8188 only, the color detail will still lose on these platforms if
we must support CRC.

Regards,
Shawn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ