[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e2558247735964e2c50a8535017805353b4b8a58.camel@mediatek.com>
Date: Tue, 18 Nov 2025 07:22:09 +0000
From: Kyrie Wu (吴晗) <Kyrie.Wu@...iatek.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
George Sun (孙林) <George.Sun@...iatek.com>,
Tiffany Lin (林慧珊) <tiffany.lin@...iatek.com>,
"nhebert@...omium.org" <nhebert@...omium.org>, "linux-media@...r.kernel.org"
<linux-media@...r.kernel.org>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>, "mchehab@...nel.org" <mchehab@...nel.org>,
"nicolas.dufresne@...labora.com" <nicolas.dufresne@...labora.com>,
"hverkuil@...all.nl" <hverkuil@...all.nl>,
Kyrie Wu (吴晗) <Kyrie.Wu@...iatek.com>,
Yunfei Dong (董云飞) <Yunfei.Dong@...iatek.com>,
"conor+dt@...nel.org" <conor+dt@...nel.org>,
Irui Wang (王瑞) <Irui.Wang@...iatek.com>,
"robh@...nel.org" <robh@...nel.org>, "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Yilong Zhou (周易龙) <Yilong.Zhou@...iatek.com>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>, "krzk+dt@...nel.org"
<krzk+dt@...nel.org>, "arnd@...db.de" <arnd@...db.de>,
Andrew-CT Chen (陳智迪)
<Andrew-CT.Chen@...iatek.com>, AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
CC: "andrzejtp2010@...il.com" <andrzejtp2010@...il.com>,
"neil.armstrong@...aro.org" <neil.armstrong@...aro.org>
Subject: Re: [PATCH v5 2/8] media: mediatek: vcodec: add decoder compatible to
support MT8189
On Thu, 2025-11-06 at 09:21 -0500, Nicolas Dufresne wrote:
> Hi,
>
> Le jeudi 06 novembre 2025 à 14:13 +0800, Kyrie Wu a écrit :
> > MT8189 is pure single core architecture. Support its compatible and
> > use `mtk_vdec_single_core_pdata` to initialize platform data.
> >
> > Signed-off-by: Kyrie Wu <kyrie.wu@...iatek.com>
> > Reviewed-by: AngeloGioacchino Del Regno <
> > angelogioacchino.delregno@...labora.com>
> > ---
> > .../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c | 6
> > ++++++
> > .../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h | 1 +
> > 2 files changed, 7 insertions(+)
> >
> > diff --git
> > a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv
> > .c
> > b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv
> > .c
> > index 6fb05bb00641..fca60e81e3c7 100644
> > ---
> > a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv
> > .c
> > +++
> > b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv
> > .c
> > @@ -347,6 +347,8 @@ static void mtk_vcodec_dec_get_chip_name(struct
> > mtk_vcodec_dec_dev *vdec_dev)
> > vdec_dev->chip_name = MTK_VDEC_MT8188;
> > else if (of_device_is_compatible(dev->of_node,
> > "mediatek,mt8196-vcodec-dec"))
> > vdec_dev->chip_name = MTK_VDEC_MT8196;
> > + else if (of_device_is_compatible(dev->of_node,
> > "mediatek,mt8189-vcodec-dec"))
> > + vdec_dev->chip_name = MTK_VDEC_MT8189;
> > else
> > vdec_dev->chip_name = MTK_VDEC_INVAL;
> > }
> > @@ -574,6 +576,10 @@ static const struct of_device_id
> > mtk_vcodec_match[] = {
> > .compatible = "mediatek,mt8196-vcodec-dec",
> > .data = &mtk_lat_sig_core_pdata,
> > },
> > + {
> > + .compatible = "mediatek,mt8189-vcodec-dec",
> > + .data = &mtk_vdec_single_core_pdata,
> > + },
>
> Maybe its just me, but its annoying that you match the compatible
> twice. It is
> of course more work to add yet another indirection for the chip_name,
> but
> considering you do 2 soc / year (and sometimes more) this will keep
> growing.
>
> Opinions ? I'd don't want to block this forever, but I'd like to see
> some
> cleanup of this driver happening in the long term.
>
> Nicolas
Dear Nicolas,
I will add this setting to compitable pdata in the next version.
Thanks.
Regards,
Kyrie
>
> > {},
> > };
> >
> > diff --git
> > a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv
> > .h
> > b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv
> > .h
> > index 429b32952194..9421fd4fda1d 100644
> > ---
> > a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv
> > .h
> > +++
> > b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv
> > .h
> > @@ -25,6 +25,7 @@ enum mtk_vcodec_dec_chip_name {
> > MTK_VDEC_MT8183 = 8183,
> > MTK_VDEC_MT8186 = 8186,
> > MTK_VDEC_MT8188 = 8188,
> > + MTK_VDEC_MT8189 = 8189,
> > MTK_VDEC_MT8192 = 8192,
> > MTK_VDEC_MT8195 = 8195,
> > MTK_VDEC_MT8196 = 8196,
Powered by blists - more mailing lists