From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
To: "Nícolas F . R . A . Prado" <nfraprado@collabora.com>,
"Sebastian Fricke" <sebastian.fricke@collabora.com>,
"Nicolas Dufresne" <nicolas.dufresne@collabora.com>,
"Hans Verkuil" <hverkuil-cisco@xs4all.nl>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Benjamin Gaignard" <benjamin.gaignard@collabora.com>,
"Nathan Hebert" <nhebert@chromium.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
linux-mediatek@lists.infradead.org
Cc: Hsin-Yi Wang <hsinyi@chromium.org>,
Fritz Koenig <frkoenig@chromium.org>,
Daniel Vetter <daniel@ffwll.ch>,
Steve Cho <stevecho@chromium.org>,
Yunfei Dong <yunfei.dong@mediatek.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
Project_Global_Chrome_Upstream_Group@mediatek.com,
Yunfei Dong <yunfei.dong@mediatek.com>
Subject: Re: [PATCH v3 02/14] media: mediatek: vcodec: add decoder compatible to support mt8196
Date: Thu, 12 Feb 2026 17:48:58 +0100 [thread overview]
Message-ID: <6176231.DvuYhMxLoT@workhorse> (raw)
In-Reply-To: <20260211054149.27249-3-yunfei.dong@mediatek.com>
On Wednesday, 11 February 2026 06:41:29 Central European Standard Time Yunfei Dong wrote:
> MT8196 is lat single core architecture. Support its compatible and
> use `mtk_lat_sig_core_pdata` to initialize platform data.
>
> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.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 3b81fae9f913..d9f722698198 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_MT8186;
> else if (of_device_is_compatible(dev->of_node, "mediatek,mt8188-vcodec-dec"))
> 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;
Why is this entire function written like this, and why does it exist
at all? You can store the chip name in the platform data for a compatible,
thereby avoiding a massive of_device_is_compatible if block because that's
what platform data is for.
The only place where this function is even used is in probe.
Just store it in your mtk_vcodec_match's .data struct and pull it from
dev->vdec_pdata. No need for the function.
> else
> vdec_dev->chip_name = MTK_VDEC_INVAL;
> }
> @@ -560,6 +562,10 @@ static const struct of_device_id mtk_vcodec_match[] = {
> .compatible = "mediatek,mt8188-vcodec-dec",
> .data = &mtk_lat_sig_core_pdata,
> },
> + {
> + .compatible = "mediatek,mt8196-vcodec-dec",
> + .data = &mtk_lat_sig_core_pdata,
> + },
> {},
> };
>
> 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 c9d27534c63e..f06dfc1a3455 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
> @@ -29,6 +29,7 @@ enum mtk_vcodec_dec_chip_name {
> MTK_VDEC_MT8188 = 8188,
> MTK_VDEC_MT8192 = 8192,
> MTK_VDEC_MT8195 = 8195,
> + MTK_VDEC_MT8196 = 8196,
> };
>
> /*
>
next prev parent reply other threads:[~2026-02-12 16:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-11 5:41 [PATCH v3 00/14] media: mediatek: vcodec: support video decoder in mt8196 Yunfei Dong
2026-02-11 5:41 ` [PATCH v3 01/14] dt-bindings: media: mediatek: vcodec: add decoder dt-bindings for mt8196 Yunfei Dong
2026-02-11 6:33 ` Krzysztof Kozlowski
2026-02-11 5:41 ` [PATCH v3 02/14] media: mediatek: vcodec: add decoder compatible to support mt8196 Yunfei Dong
2026-02-12 16:48 ` Nicolas Frattaroli [this message]
2026-02-12 19:31 ` Nicolas Dufresne
2026-02-13 2:13 ` Yunfei Dong (董云飞)
2026-03-19 20:03 ` Nicolas Dufresne
2026-03-23 2:06 ` Yunfei Dong (董云飞)
2026-02-11 5:41 ` [PATCH v3 03/14] media: mediatek: vcodec: add driver to support vcp Yunfei Dong
2026-02-11 5:41 ` [PATCH v3 04/14] media: mediatek: vcodec: add driver to support vcp encoder Yunfei Dong
2026-02-11 5:41 ` [PATCH v3 05/14] media: mediatek: vcodec: get different firmware ipi id Yunfei Dong
2026-02-11 5:41 ` [PATCH v3 06/14] media: mediatek: vcodec: get share memory address Yunfei Dong
2026-02-11 5:41 ` [PATCH v3 07/14] media: mediatek: vcodec: define MT8196 vcodec levels Yunfei Dong
2026-02-11 5:41 ` [PATCH v3 08/14] media: mediatek: vcodec: support vcp architecture Yunfei Dong
2026-02-11 5:41 ` [PATCH v3 09/14] media: mediatek: vcodec: support 36bit iova address Yunfei Dong
2026-02-11 5:41 ` [PATCH v3 10/14] media: mediatek: vcodec: clean xpc status Yunfei Dong
2026-02-11 5:41 ` [PATCH v3 11/14] media: mediatek: vcodec: add debug information Yunfei Dong
2026-02-11 5:41 ` [PATCH v3 12/14] media: mediatek: vcodec: send share memory address to vcp Yunfei Dong
2026-02-11 5:41 ` [PATCH v3 13/14] media: mediatek: decoder: fill av1 buffer size with picinfo Yunfei Dong
2026-02-11 5:41 ` [PATCH v3 14/14] media: mediatek: decoder: support av1 extend vsi Yunfei Dong
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=6176231.DvuYhMxLoT@workhorse \
--to=nicolas.frattaroli@collabora.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=benjamin.gaignard@collabora.com \
--cc=daniel.almeida@collabora.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=frkoenig@chromium.org \
--cc=hsinyi@chromium.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=nfraprado@collabora.com \
--cc=nhebert@chromium.org \
--cc=nicolas.dufresne@collabora.com \
--cc=sebastian.fricke@collabora.com \
--cc=stevecho@chromium.org \
--cc=yunfei.dong@mediatek.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.