<pre>
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

</pre><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice ********************
The information contained in this e-mail message (including any 
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be 
conveyed only to the designated recipient(s). Any use, dissemination, 
distribution, printing, retaining or copying of this e-mail (including its 
attachments) by unintended recipient(s) is strictly prohibited and may 
be unlawful. If you are not an intended recipient of this e-mail, or believe 
that you have received this e-mail in error, please notify the sender 
immediately (by replying to this e-mail), delete any and all copies of 
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!
</pre><!--}-->