[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bb7877319b395e764653f14297c130f114799c7e.camel@mediatek.com>
Date: Mon, 18 Jul 2022 19:34:16 +0800
From: Irui Wang <irui.wang@...iatek.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
"Hans Verkuil" <hverkuil-cisco@...all.nl>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Tzung-Bi Shih <tzungbi@...omium.org>,
Tiffany Lin <tiffany.lin@...iatek.com>,
Andrew-CT Chen <andrew-ct.chen@...iatek.com>
CC: Yong Wu <yong.wu@...iatek.com>,
Maoguang Meng <maoguang.meng@...iatek.com>,
Longfei Wang <longfei.wang@...iatek.com>,
Yunfei Dong <yunfei.dong@...iatek.com>,
<linux-media@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<srv_heupstream@...iatek.com>,
<linux-mediatek@...ts.infradead.org>,
<Project_Global_Chrome_Upstream_Group@...iatek.com>
Subject: Re: [PATCH 3/5] media: mediatek: vcodec: Add mt8188 encoder driver
Dear Angelo,
On Mon, 2022-07-18 at 11:53 +0200, AngeloGioacchino Del Regno wrote:
> Il 16/07/22 11:38, Irui Wang ha scritto:
> > Add mt8188's compatible "mediatek,mt8188-vcodec-enc".
> > Add mt8188's device private data "mt8188_pdata".
> > Remove platform_get_resource API to get IRQ resoure.
> >
> > Signed-off-by: Irui Wang <irui.wang@...iatek.com>
> > ---
> > .../mediatek/vcodec/mtk_vcodec_enc_drv.c | 21 ++++++++++++
> > -------
> > 1 file changed, 13 insertions(+), 8 deletions(-)
> >
> > diff --git
> > a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c
> > b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c
> > index 95e8c29ccc65..6b0688b4872d 100644
> > --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c
> > +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c
> > @@ -228,7 +228,6 @@ static int mtk_vcodec_probe(struct
> > platform_device *pdev)
> > {
> > struct mtk_vcodec_dev *dev;
> > struct video_device *vfd_enc;
> > - struct resource *res;
> > phandle rproc_phandle;
> > enum mtk_vcodec_fw_type fw_type;
> > int ret;
> > @@ -272,13 +271,6 @@ static int mtk_vcodec_probe(struct
> > platform_device *pdev)
> > goto err_res;
> > }
> >
> > - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>
> This needs to be a separated commit with a Fixes tag!
Separate to another patch, thanks.
>
> > - if (res == NULL) {
> > - dev_err(&pdev->dev, "failed to get irq resource");
> > - ret = -ENOENT;
> > - goto err_res;
> > - }
> > -
> > dev->enc_irq = platform_get_irq(pdev, 0);
> > irq_set_status_flags(dev->enc_irq, IRQ_NOAUTOEN);
> > ret = devm_request_irq(&pdev->dev, dev->enc_irq,
> > @@ -428,6 +420,18 @@ static const struct mtk_vcodec_enc_pdata
> > mt8195_pdata = {
> > .core_id = VENC_SYS,
> > };
> >
> > +static const struct mtk_vcodec_enc_pdata mt8188_pdata = {
> > + .uses_ext = true,
> > + .capture_formats = mtk_video_formats_capture_h264,
> > + .num_capture_formats =
> > ARRAY_SIZE(mtk_video_formats_capture_h264),
> > + .output_formats = mtk_video_formats_output,
> > + .num_output_formats = ARRAY_SIZE(mtk_video_formats_output),
> > + .min_bitrate = 64,
> > + .max_bitrate = 50000000,
> > + .core_id = VENC_SYS,
> > + .is_34bit = true,
> > +};
> > +
> > static const struct of_device_id mtk_vcodec_enc_match[] = {
> > {.compatible = "mediatek,mt8173-vcodec-enc",
> > .data = &mt8173_avc_pdata},
> > @@ -436,6 +440,7 @@ static const struct of_device_id
> > mtk_vcodec_enc_match[] = {
> > {.compatible = "mediatek,mt8183-vcodec-enc", .data =
> > &mt8183_pdata},
> > {.compatible = "mediatek,mt8192-vcodec-enc", .data =
> > &mt8192_pdata},
> > {.compatible = "mediatek,mt8195-vcodec-enc", .data =
> > &mt8195_pdata},
> > + {.compatible = "mediatek,mt8188-vcodec-enc", .data =
> > &mt8188_pdata},
>
> Please keep this list alphabetically sorted.
Fix in next version.
Thanks
Best Regards.
>
> > {},
> > };
> > MODULE_DEVICE_TABLE(of, mtk_vcodec_enc_match);
>
>
Powered by blists - more mailing lists