[PATCH v9 6/9] media: mediatek: vcodec: add decoder compatible to support MT8189

Kyrie Wu
2026-04-24T03:06:01Z

MT8189 is pure single core architecture. Add its compatible to
initialize platform data.

Signed-off-by: Kyrie Wu <kyrie.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
.../mediatek/vcodec/decoder/mtk_vcodec_dec.h | 1 +
.../vcodec/decoder/mtk_vcodec_dec_drv.c | 4 ++++
.../vcodec/decoder/mtk_vcodec_dec_stateless.c | 19 +++++++++++++++++++
3 files changed, 24 insertions(+)

diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec.h b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec.h
index 80cb46f1cded..2bde871c0224 100644
--- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec.h
+++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec.h
@@ -71,6 +71,7 @@ extern const struct mtk_vcodec_dec_pdata mtk_vdec_8173_pdata;
extern const struct mtk_vcodec_dec_pdata mtk_vdec_8183_pdata;
extern const struct mtk_vcodec_dec_pdata mtk_vdec_8186_pdata;
extern const struct mtk_vcodec_dec_pdata mtk_vdec_8188_pdata;
+extern const struct mtk_vcodec_dec_pdata mtk_vdec_8189_pdata;
extern const struct mtk_vcodec_dec_pdata mtk_vdec_8192_pdata;
extern const struct mtk_vcodec_dec_pdata mtk_vdec_8195_pdata;
extern const struct mtk_vcodec_dec_pdata mtk_vdec_8196_pdata;
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 6ebd82ba8d23..dc67c2b84776 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
@@ -555,6 +555,10 @@ static const struct of_device_id mtk_vcodec_match[] = {
.compatible = "mediatek,mt8196-vcodec-dec",
.data = &mtk_vdec_8196_pdata,
},
+ {
+ .compatible = "mediatek,mt8189-vcodec-dec",
+ .data = &mtk_vdec_8189_pdata,
+ },
{},
};

diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c
index 783a988b894a..1c647aef7723 100644
--- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c
+++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c
@@ -1041,3 +1041,22 @@ const struct mtk_vcodec_dec_pdata mtk_vdec_8186_pdata = {
.prob_size = VP9_PROB_BUF_SIZE,
},
};
+
+const struct mtk_vcodec_dec_pdata mtk_vdec_8189_pdata = {
+ MTK_STATELESS_DEC_DATA,
+ .hw_arch = MTK_VDEC_PURE_SINGLE_CORE,
+ .chip_model = 8189,
+ .h264_params = {
+ .level = V4L2_MPEG_VIDEO_H264_LEVEL_5_2,
+ .profile = V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10,
+ },
+ .h265_params = {
+ .level = V4L2_MPEG_VIDEO_HEVC_LEVEL_4,
+ .profile = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE,
+ },
+ .vp9_params = {
+ .level = V4L2_MPEG_VIDEO_VP9_LEVEL_5_2,
+ .profile = V4L2_MPEG_VIDEO_VP9_PROFILE_2,
+ .prob_size = VP9_4K_PROB_BUF_SIZE,
+ },
+};
--
2.45.2