From: "Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>
To: "alpernebiyasak@gmail.com" <alpernebiyasak@gmail.com>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>,
"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>
Cc: "linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Singo Chang (張興國)" <Singo.Chang@mediatek.com>,
"Shawn Sung (宋孝謙)" <Shawn.Sung@mediatek.com>,
"Nancy Lin (林欣螢)" <Nancy.Lin@mediatek.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2] drm/mediatek: ovl: Add fmt_support_man for MT8192 and MT8195
Date: Tue, 17 Sep 2024 16:44:14 +0000 [thread overview]
Message-ID: <8b5ca1f048565e8826c826716c4e8c515ca0de81.camel@mediatek.com> (raw)
In-Reply-To: <01020191fa9480c6-b4e6cdff-4134-4713-b255-1c65e0a97f87-000000@eu-west-1.amazonses.com>
> > +
> > +#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
>
> >
next prev parent reply other threads:[~2024-09-17 16:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-15 16:12 Jason-JH.Lin
2024-09-16 11:25 ` AngeloGioacchino Del Regno
2024-09-17 16:44 ` Jason-JH Lin (林睿祥) [this message]
2024-09-16 16:25 ` Alper Nebi Yasak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8b5ca1f048565e8826c826716c4e8c515ca0de81.camel@mediatek.com \
--to=jason-jh.lin@mediatek.com \
--cc=Nancy.Lin@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=Shawn.Sung@mediatek.com \
--cc=Singo.Chang@mediatek.com \
--cc=alpernebiyasak@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®