[PATCH v5 2/8] media: mediatek: vcodec: add decoder compatible to support MT8189
Nicolas Dufresne
nicolas.dufresne at collabora.com
Thu Nov 6 06:21:58 PST 2025
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 at mediatek.com>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.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
> {},
> };
>
> 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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20251106/8b1ebd5f/attachment.sig>
More information about the linux-arm-kernel
mailing list