[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <890702604a2abe7a07d9ef4d43b743d3db3510a9.camel@mediatek.com>
Date: Thu, 25 Dec 2025 07:26:31 +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>, "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>,
Yilong Zhou (周易龙) <Yilong.Zhou@...iatek.com>
Subject: Re: [PATCH v6 02/10] media: mediatek: decoder: Add a new platform
data member
On Thu, 2025-12-11 at 15:11 -0500, Nicolas Dufresne wrote:
> Hi,
>
> Le mardi 02 décembre 2025 à 15:40 +0800, Kyrie Wu a écrit :
> > Add a new platform data member to indicate each decoder IC
> > to avoid the chip name definition keep growing.
> >
> > Signed-off-by: Kyrie Wu <kyrie.wu@...iatek.com>
> > ---
> > .../mediatek/vcodec/decoder/mtk_vcodec_dec.h | 5 +
> > .../vcodec/decoder/mtk_vcodec_dec_drv.c | 35 +----
> > .../vcodec/decoder/mtk_vcodec_dec_drv.h | 15 +-
> > .../vcodec/decoder/mtk_vcodec_dec_hw.c | 2 +-
> > .../vcodec/decoder/mtk_vcodec_dec_stateful.c | 1 +
> > .../vcodec/decoder/mtk_vcodec_dec_stateless.c | 137
> > +++++++++++++++---
> > 6 files changed, 131 insertions(+), 64 deletions(-)
> >
> > 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 1af075fc0194..80cb46f1cded 100644
> > ---
> > a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec.h
> > +++
> > b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec.h
> > @@ -69,6 +69,11 @@ extern const struct v4l2_m2m_ops
> > mtk_vdec_m2m_ops;
> > 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_vdec_8186_pdata;
> > +extern const struct mtk_vcodec_dec_pdata mtk_vdec_8188_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;
> > extern const struct mtk_vcodec_dec_pdata mtk_lat_sig_core_pdata;
> > extern const struct mtk_vcodec_dec_pdata
> > mtk_vdec_single_core_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 6fb05bb00641..d7a269045fd6 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
> > @@ -331,24 +331,7 @@ static const struct v4l2_file_operations
> > mtk_vcodec_fops = {
> >
> > static void mtk_vcodec_dec_get_chip_name(struct mtk_vcodec_dec_dev
> > *vdec_dev)
> > {
> > - struct device *dev = &vdec_dev->plat_dev->dev;
> > -
> > - if (of_device_is_compatible(dev->of_node, "mediatek,mt8173-
> > vcodec-dec"))
> > - vdec_dev->chip_name = MTK_VDEC_MT8173;
> > - else if (of_device_is_compatible(dev->of_node,
> > "mediatek,mt8183-vcodec-dec"))
> > - vdec_dev->chip_name = MTK_VDEC_MT8183;
> > - else if (of_device_is_compatible(dev->of_node,
> > "mediatek,mt8192-vcodec-dec"))
> > - vdec_dev->chip_name = MTK_VDEC_MT8192;
> > - else if (of_device_is_compatible(dev->of_node,
> > "mediatek,mt8195-vcodec-dec"))
> > - vdec_dev->chip_name = MTK_VDEC_MT8195;
> > - else if (of_device_is_compatible(dev->of_node,
> > "mediatek,mt8186-vcodec-dec"))
> > - 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;
> > - else
> > - vdec_dev->chip_name = MTK_VDEC_INVAL;
> > + vdec_dev->chip_name = vdec_dev->vdec_pdata->chip_name;
> > }
> >
> > static int mtk_vcodec_probe(struct platform_device *pdev)
> > @@ -367,10 +350,6 @@ static int mtk_vcodec_probe(struct
> > platform_device *pdev)
> > dev->plat_dev = pdev;
> >
> > mtk_vcodec_dec_get_chip_name(dev);
> > - if (dev->chip_name == MTK_VDEC_INVAL) {
> > - dev_err(&pdev->dev, "Failed to get decoder chip name");
> > - return -EINVAL;
> > - }
> >
> > dev->vdec_pdata = of_device_get_match_data(&pdev->dev);
> > if (!of_property_read_u32(pdev->dev.of_node, "mediatek,vpu",
> > @@ -387,7 +366,7 @@ static int mtk_vcodec_probe(struct
> > platform_device *pdev)
> > return -ENODEV;
> > }
> > dma_set_max_seg_size(&pdev->dev, UINT_MAX);
> > - if (dev->chip_name == MTK_VDEC_MT8196) {
> > + if (dev->chip_name == 8196) {
> > ret = dma_set_mask_and_coherent(&pdev->dev,
> > DMA_BIT_MASK(36));
> > if (ret) {
> > dev_err(&pdev->dev, "Failed to enable 36-bit
> > DMA: %d\n", ret);
> > @@ -556,23 +535,23 @@ static const struct of_device_id
> > mtk_vcodec_match[] = {
> > },
> > {
> > .compatible = "mediatek,mt8192-vcodec-dec",
> > - .data = &mtk_lat_sig_core_pdata,
> > + .data = &mtk_vdec_8192_pdata,
> > },
> > {
> > .compatible = "mediatek,mt8186-vcodec-dec",
> > - .data = &mtk_vdec_single_core_pdata,
> > + .data = &mtk_vdec_8186_pdata,
> > },
> > {
> > .compatible = "mediatek,mt8195-vcodec-dec",
> > - .data = &mtk_lat_sig_core_pdata,
> > + .data = &mtk_vdec_8195_pdata,
> > },
> > {
> > .compatible = "mediatek,mt8188-vcodec-dec",
> > - .data = &mtk_lat_sig_core_pdata,
> > + .data = &mtk_vdec_8188_pdata,
> > },
> > {
> > .compatible = "mediatek,mt8196-vcodec-dec",
> > - .data = &mtk_lat_sig_core_pdata,
> > + .data = &mtk_vdec_8196_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 429b32952194..2dbde8d00e6f 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
> > @@ -19,17 +19,6 @@
> > #define IS_VDEC_INNER_RACING(capability) ((capability) &
> > MTK_VCODEC_INNER_RACING)
> > #define IS_VDEC_SUPPORT_EXT(capability) ((capability) &
> > MTK_VDEC_IS_SUPPORT_EXT)
> >
> > -enum mtk_vcodec_dec_chip_name {
> > - MTK_VDEC_INVAL = 0,
> > - MTK_VDEC_MT8173 = 8173,
> > - MTK_VDEC_MT8183 = 8183,
> > - MTK_VDEC_MT8186 = 8186,
> > - MTK_VDEC_MT8188 = 8188,
> > - MTK_VDEC_MT8192 = 8192,
> > - MTK_VDEC_MT8195 = 8195,
> > - MTK_VDEC_MT8196 = 8196,
> > -};
> > -
> > /*
> > * enum mtk_vdec_format_types - Structure used to get supported
> > * format types according to decoder capability
> > @@ -106,6 +95,7 @@ struct vdec_pic_info {
> > *
> > * @is_subdev_supported: whether support parent-node
> > architecture(subdev)
> > * @uses_stateless_api: whether the decoder uses the stateless API
> > with requests
> > + * @chip_name: platforms configuration values
> > */
> > struct mtk_vcodec_dec_pdata {
> > void (*init_vdec_params)(struct mtk_vcodec_dec_ctx *ctx);
> > @@ -127,6 +117,7 @@ struct mtk_vcodec_dec_pdata {
> >
> > bool is_subdev_supported;
> > bool uses_stateless_api;
> > + unsigned int chip_name;
> > };
> >
> > /**
> > @@ -307,7 +298,7 @@ struct mtk_vcodec_dec_dev {
> > struct mutex dec_racing_info_mutex;
> > struct mtk_vcodec_dbgfs dbgfs;
> >
> > - enum mtk_vcodec_dec_chip_name chip_name;
> > + unsigned int chip_name;
> > };
> >
> > static inline struct mtk_vcodec_dec_ctx *fh_to_dec_ctx(struct
> > v4l2_fh *fh)
> > diff --git
> > a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_hw.
> > c
> > b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_hw.
> > c
> > index e4e527fe54dc..a926dc14d39d 100644
> > ---
> > a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_hw.
> > c
> > +++
> > b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_hw.
> > c
> > @@ -76,7 +76,7 @@ static void mtk_vdec_hw_clean_xpc(struct
> > mtk_vdec_hw_dev *dev)
> > {
> > u32 val, mask, addr = VDEC_XPC_CLEAN_ADDR;
> >
> > - if (dev->main_dev->chip_name != MTK_VDEC_MT8196)
> > + if (dev->main_dev->chip_name != 8196)
> > return;
> >
> > val = dev->hw_idx == MTK_VDEC_LAT0 ? VDEC_XPC_LAT_VAL :
> > VDEC_XPC_CORE_VAL;
> > diff --git
> > a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_sta
> > teful.c
> > b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_sta
> > teful.c
> > index aa9bdee7a96c..8ddb61670dc6 100644
> > ---
> > a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_sta
> > teful.c
> > +++
> > b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_sta
> > teful.c
> > @@ -618,4 +618,5 @@ const struct mtk_vcodec_dec_pdata
> > mtk_vdec_8173_pdata = {
> > .flush_decoder = mtk_vdec_flush_decoder,
> > .is_subdev_supported = false,
> > .hw_arch = MTK_VDEC_PURE_SINGLE_CORE,
> > + .chip_name = 8173,
> > };
> > diff --git
> > a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_sta
> > teless.c
> > b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_sta
> > teless.c
> > index c1cef78471a9..d249a8774948 100644
> > ---
> > a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_sta
> > teless.c
> > +++
> > b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_sta
> > teless.c
> > @@ -550,16 +550,16 @@ static void
> > mtk_vcodec_dec_fill_h264_level(struct v4l2_ctrl_config *cfg,
> > struct mtk_vcodec_dec_ctx
> > *ctx)
> > {
> > switch (ctx->dev->chip_name) {
> > - case MTK_VDEC_MT8192:
> > - case MTK_VDEC_MT8188:
> > + case 8192:
> > + case 8188:
> > cfg->max = V4L2_MPEG_VIDEO_H264_LEVEL_5_2;
> > break;
> > - case MTK_VDEC_MT8195:
> > - case MTK_VDEC_MT8196:
> > + case 8195:
> > + case 8196:
> > cfg->max = V4L2_MPEG_VIDEO_H264_LEVEL_6_0;
> > break;
> > - case MTK_VDEC_MT8183:
> > - case MTK_VDEC_MT8186:
> > + case 8183:
> > + case 8186:
> > cfg->max = V4L2_MPEG_VIDEO_H264_LEVEL_4_2;
> > break;
> > default:
> > @@ -572,9 +572,9 @@ static void
> > mtk_vcodec_dec_fill_h264_profile(struct v4l2_ctrl_config *cfg,
> > struct mtk_vcodec_dec_ctx
> > *ctx)
> > {
> > switch (ctx->dev->chip_name) {
> > - case MTK_VDEC_MT8188:
> > - case MTK_VDEC_MT8195:
> > - case MTK_VDEC_MT8196:
> > + case 8188:
> > + case 8195:
> > + case 8196:
> > cfg->max = V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10;
> > break;
> > default:
> > @@ -587,11 +587,11 @@ static void
> > mtk_vcodec_dec_fill_h265_level(struct v4l2_ctrl_config *cfg,
> > struct mtk_vcodec_dec_ctx
> > *ctx)
> > {
> > switch (ctx->dev->chip_name) {
> > - case MTK_VDEC_MT8188:
> > + case 8188:
> > cfg->max = V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1;
> > break;
> > - case MTK_VDEC_MT8195:
> > - case MTK_VDEC_MT8196:
> > + case 8195:
> > + case 8196:
> > cfg->max = V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2;
> > break;
> > default:
> > @@ -604,9 +604,9 @@ static void
> > mtk_vcodec_dec_fill_h265_profile(struct v4l2_ctrl_config *cfg,
> > struct mtk_vcodec_dec_ctx
> > *ctx)
> > {
> > switch (ctx->dev->chip_name) {
> > - case MTK_VDEC_MT8188:
> > - case MTK_VDEC_MT8195:
> > - case MTK_VDEC_MT8196:
> > + case 8188:
> > + case 8195:
> > + case 8196:
> > cfg->max = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10;
> > break;
> > default:
> > @@ -619,15 +619,15 @@ static void
> > mtk_vcodec_dec_fill_vp9_level(struct v4l2_ctrl_config *cfg,
> > struct mtk_vcodec_dec_ctx
> > *ctx)
> > {
> > switch (ctx->dev->chip_name) {
> > - case MTK_VDEC_MT8192:
> > - case MTK_VDEC_MT8188:
> > + case 8192:
> > + case 8188:
> > cfg->max = V4L2_MPEG_VIDEO_VP9_LEVEL_5_1;
> > break;
> > - case MTK_VDEC_MT8195:
> > - case MTK_VDEC_MT8196:
> > + case 8195:
> > + case 8196:
> > cfg->max = V4L2_MPEG_VIDEO_VP9_LEVEL_5_2;
> > break;
> > - case MTK_VDEC_MT8186:
> > + case 8186:
> > cfg->max = V4L2_MPEG_VIDEO_VP9_LEVEL_4_1;
> > break;
> > default:
> > @@ -640,9 +640,9 @@ static void
> > mtk_vcodec_dec_fill_vp9_profile(struct v4l2_ctrl_config *cfg,
> > struct mtk_vcodec_dec_ctx
> > *ctx)
> > {
> > switch (ctx->dev->chip_name) {
> > - case MTK_VDEC_MT8188:
> > - case MTK_VDEC_MT8195:
> > - case MTK_VDEC_MT8196:
> > + case 8188:
> > + case 8195:
> > + case 8196:
> > cfg->max = V4L2_MPEG_VIDEO_VP9_PROFILE_2;
> > break;
> > default:
> > @@ -886,6 +886,7 @@ const struct mtk_vcodec_dec_pdata
> > mtk_vdec_8183_pdata = {
> > .get_cap_buffer = vdec_get_cap_buffer,
> > .is_subdev_supported = false,
> > .hw_arch = MTK_VDEC_PURE_SINGLE_CORE,
> > + .chip_name = 8183,
> > };
> >
> > /* This platform data is used for one lat and one core
> > architecture. */
> > @@ -906,6 +907,78 @@ const struct mtk_vcodec_dec_pdata
> > mtk_lat_sig_core_pdata = {
> > .hw_arch = MTK_VDEC_LAT_SINGLE_CORE,
> > };
> >
> > +const struct mtk_vcodec_dec_pdata mtk_vdec_8188_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,
> > + .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_LAT_SINGLE_CORE,
> > + .chip_name = 8188,
> > +};
> > +
> > +const struct mtk_vcodec_dec_pdata mtk_vdec_8192_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,
> > + .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_LAT_SINGLE_CORE,
> > + .chip_name = 8192,
> > +};
>
> I really like the change overall, but this adds a lot of code
> duplication.
> Perhaps you could do something like:
>
> +#define MTK_STATELESS_DEC_DATA \
> + .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,
> + .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
>
> +const struct mtk_vcodec_dec_pdata mtk_vdec_8192_pdata = {
> + MTK_STATELESS_DEC_DATA,
> + .hw_arch = MTK_VDEC_LAT_SINGLE_CORE,
> + .chip_name = 8192,
> +};
>
> The other method also used in various drivers is to embed a pointer
> to another
> structure. The benefit of this second method is that it reduce the
> driver binary
> size. With one solution to the copy paste issue implemented, the
> patch looks
> good.
>
> regards,
> Nicolas
Dear Nicolas,
Thanks for your suggestions. I will refine this patch.
Regards,
Kyrie.
>
> > +
> > +const struct mtk_vcodec_dec_pdata mtk_vdec_8195_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,
> > + .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_LAT_SINGLE_CORE,
> > + .chip_name = 8195,
> > +};
> > +
> > +const struct mtk_vcodec_dec_pdata mtk_vdec_8196_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,
> > + .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_LAT_SINGLE_CORE,
> > + .chip_name = 8196,
> > +};
> > +
> > 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,
> > @@ -922,3 +995,21 @@ const struct mtk_vcodec_dec_pdata
> > mtk_vdec_single_core_pdata = {
> > .is_subdev_supported = true,
> > .hw_arch = MTK_VDEC_PURE_SINGLE_CORE,
> > };
> > +
> > +const struct mtk_vcodec_dec_pdata mtk_vdec_8186_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,
> > + .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,
> > + .chip_name = 8186,
> > +};
Powered by blists - more mailing lists