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] [day] [month] [year] [list]
Message-ID: <8b5ca1f048565e8826c826716c4e8c515ca0de81.camel@mediatek.com>
Date: Tue, 17 Sep 2024 16:44:14 +0000
From: Jason-JH Lin (林睿祥) <Jason-JH.Lin@...iatek.com>
To: "alpernebiyasak@...il.com" <alpernebiyasak@...il.com>,
	"angelogioacchino.delregno@...labora.com"
	<angelogioacchino.delregno@...labora.com>, "chunkuang.hu@...nel.org"
	<chunkuang.hu@...nel.org>
CC: "linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Singo Chang (張興國) <Singo.Chang@...iatek.com>,
	Shawn Sung (宋孝謙) <Shawn.Sung@...iatek.com>,
	Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@...iatek.com>,
	"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2] drm/mediatek: ovl: Add fmt_support_man for MT8192 and
 MT8195

> > +
> > +#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
> 
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ