<html><body><p>
<pre>
> > +
> > +#define OVL_CON_CLRFMT_PARGB8888(ovl) ({ \
> > +struct mtk_disp_ovl *_ovl = (ovl); \
> > +(_ovl->data->fmt_support_man ? \
> > +((3 << 12) | OVL_CON_CLRFMT_MAN) : OVL_CON_CLRFMT_ARGB8888); \
> > +})
>
> Isn't it just simpler to pass an "extended input format selection"
> flag to
> these macros, instead of the entire mtk_disp_ovl structure?
>
> Something like...
>
> #define OVL_CON_CLRFMT_PARGB8888(fmt_support_man)
>
> ...or alternatively, it's probably simply more straightforward to
> assign
> function pointers to struct mtk_disp_ovl_data:
>
> `.fmt_convert = ovl_fmt_convert_mt8173` for MT8173-style controllers
> and
> `.fmt_convert = ovl_fmt_convert_mt8195` for MT8195-style controllers,
>
> so that you can simply call `con = ovl->data->fmt_convert(ovl, fmt,
> blend_mode)`
> in mtk_ovl_layer_config().
>
> The thing is - those macros seem to be unnecessarily complicated, and
> it's at
> least impacting on readability... :-)

OK, I'll add
`.fmt_convert = mtk_ovl_fmt_convert_with_blend` to the driver data for
MT8192 and MT8195
and add
`.fmt_convert = mtk_ovl_fmt_convert` to the driver data for other SoCs.

Regards,
Jason-JH.Lin

>
> Cheers,
> Angelo
>
> >

</pre>
</p></body></html><!--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><!--}-->