]> git.baikalelectronics.ru Git - kernel.git/commitdiff
media: mediatek: vcodec: Support MT8186
authorYunfei Dong <yunfei.dong@mediatek.com>
Thu, 12 May 2022 03:46:19 +0000 (05:46 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 12:54:04 +0000 (14:54 +0200)
Adds MT8186's compatible "mediatek,mt8186-vcodec-dec".
Adds MT8186's device private data mtk_vdec_single_core_pdata.

Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.h
drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c
drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c

index 66cd6d2242c32c611870b26a747a99f2d318b083..4572f92826f23b689615b2d805a59a44f8cf43a1 100644 (file)
@@ -69,6 +69,7 @@ extern const struct media_device_ops mtk_vcodec_media_ops;
 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_lat_sig_core_pdata;
+extern const struct mtk_vcodec_dec_pdata mtk_vdec_single_core_pdata;
 
 
 /*
index 42cfa674bf8a26c7d491192a6271d13ff0e3ac2d..995e6e2fb1ab24d907c4b5eec0bea1793e59749b 100644 (file)
@@ -461,6 +461,10 @@ static const struct of_device_id mtk_vcodec_match[] = {
                .compatible = "mediatek,mt8192-vcodec-dec",
                .data = &mtk_lat_sig_core_pdata,
        },
+       {
+               .compatible = "mediatek,mt8186-vcodec-dec",
+               .data = &mtk_vdec_single_core_pdata,
+       },
        {},
 };
 
index f1a77f0a8a812ff1e4e6f57939c23c661519a9f4..16d55785d84ba3aa2d1039100da8c25d0b182f8b 100644 (file)
@@ -491,3 +491,22 @@ const struct mtk_vcodec_dec_pdata mtk_lat_sig_core_pdata = {
        .is_subdev_supported = true,
        .hw_arch = MTK_VDEC_LAT_SINGLE_CORE,
 };
+
+const struct mtk_vcodec_dec_pdata mtk_vdec_single_core_pdata = {
+       .init_vdec_params = mtk_init_vdec_params,
+       .ctrls_setup = mtk_vcodec_dec_ctrls_setup,
+       .vdec_vb2_ops = &mtk_vdec_request_vb2_ops,
+       .vdec_formats = mtk_video_formats,
+       .num_formats = &num_formats,
+       .default_out_fmt = &default_out_format,
+       .default_cap_fmt = &default_cap_format,
+       .vdec_framesizes = mtk_vdec_framesizes,
+       .num_framesizes = &num_framesizes,
+       .uses_stateless_api = true,
+       .worker = mtk_vdec_worker,
+       .flush_decoder = mtk_vdec_flush_decoder,
+       .cap_to_disp = mtk_vdec_stateless_cap_to_disp,
+       .get_cap_buffer = vdec_get_cap_buffer,
+       .is_subdev_supported = true,
+       .hw_arch = MTK_VDEC_PURE_SINGLE_CORE,
+};