devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno  <angelogioacchino.delregno@collabora.com>
To: Irui Wang <irui.wang@mediatek.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Tzung-Bi Shih <tzungbi@chromium.org>,
	Tiffany Lin <tiffany.lin@mediatek.com>,
	Andrew-CT Chen <andrew-ct.chen@mediatek.com>
Cc: Yong Wu <yong.wu@mediatek.com>,
	Maoguang Meng <maoguang.meng@mediatek.com>,
	Longfei Wang <longfei.wang@mediatek.com>,
	Yunfei Dong <yunfei.dong@mediatek.com>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	srv_heupstream@mediatek.com, linux-mediatek@lists.infradead.org,
	Project_Global_Chrome_Upstream_Group@mediatek.com
Subject: Re: [PATCH 3/5] media: mediatek: vcodec: Add mt8188 encoder driver
Date: Mon, 18 Jul 2022 11:53:19 +0200	[thread overview]
Message-ID: <98b0edfa-9669-3adb-894d-5d6fce9e2f8f@collabora.com> (raw)
In-Reply-To: <20220716093808.29894-4-irui.wang@mediatek.com>

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@mediatek.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!

> -	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.

>   	{},
>   };
>   MODULE_DEVICE_TABLE(of, mtk_vcodec_enc_match);


  reply	other threads:[~2022-07-18  9:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-16  9:38 [PATCH 0/5] support mt8188 h264 encoder Irui Wang
2022-07-16  9:38 ` [PATCH 1/5] media: mediatek: vcodec: Add encoder driver support for 34-bit iova Irui Wang
2022-07-16 21:27   ` kernel test robot
2022-07-18  9:51   ` AngeloGioacchino Del Regno
2022-07-18 11:31     ` Irui Wang
2022-07-16  9:38 ` [PATCH 2/5] dt-bindings: media: mediatek: vcodec: Add encoder dt-bindings for mt8188 Irui Wang
2022-07-18  9:51   ` AngeloGioacchino Del Regno
2022-07-18 11:32     ` Irui Wang
2022-07-16  9:38 ` [PATCH 3/5] media: mediatek: vcodec: Add mt8188 encoder driver Irui Wang
2022-07-18  9:53   ` AngeloGioacchino Del Regno [this message]
2022-07-18 11:34     ` Irui Wang
2022-07-16  9:38 ` [PATCH 4/5] media: mediatek: vcodec: Fix bitstream crop information error Irui Wang
2022-07-16  9:38 ` [PATCH 5/5] media: mediatek: vcodec: Fix encoder multi-instance deadlock Irui Wang
2022-07-18  9:54   ` AngeloGioacchino Del Regno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98b0edfa-9669-3adb-894d-5d6fce9e2f8f@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=irui.wang@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=longfei.wang@mediatek.com \
    --cc=maoguang.meng@mediatek.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=tiffany.lin@mediatek.com \
    --cc=tzungbi@chromium.org \
    --cc=yong.wu@mediatek.com \
    --cc=yunfei.dong@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).