[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1592550754.23952.4.camel@mtksdaap41>
Date: Fri, 19 Jun 2020 15:12:34 +0800
From: Tiffany Lin <tiffany.lin@...iatek.com>
To: Alexandre Courbot <acourbot@...omium.org>
CC: Andrew-CT Chen <andrew-ct.chen@...iatek.com>,
Rui Wang <gtk_ruiwang@...iatek.com>,
Yunfei Dong <yunfei.dong@...iatek.com>,
"Pi-Hsun Shih" <pihsun@...omium.org>,
Maoguang Meng <maoguang.meng@...iatek.com>,
<linux-media@...r.kernel.org>,
<linux-mediatek@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 08/10] media: mtk-vcodec: add support for MT8183 encoder
On Wed, 2020-05-20 at 17:27 +0900, Alexandre Courbot wrote:
> From: Yunfei Dong <yunfei.dong@...iatek.com>
>
> Now that all the supporting blocks are present, enable encoder for
> MT8183.
>
Acked-by: Tiffany Lin <tiffany.lin@...iatek.com>
> Signed-off-by: Yunfei Dong <yunfei.dong@...iatek.com>
> [acourbot: refactor, cleanup and split]
> Co-developed-by: Alexandre Courbot <acourbot@...omium.org>
> Signed-off-by: Alexandre Courbot <acourbot@...omium.org>
> ---
> .../platform/mtk-vcodec/mtk_vcodec_drv.h | 1 +
> .../platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 22 +++++++++++++++++++
> 2 files changed, 23 insertions(+)
>
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h
> index 59b4b750666b..a271611750ad 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h
> @@ -302,6 +302,7 @@ struct mtk_vcodec_ctx {
>
> enum mtk_chip {
> MTK_MT8173,
> + MTK_MT8183,
> };
>
> /**
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> index c8a4b85a81c4..b8fe408dd6c7 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> @@ -62,6 +62,14 @@ static const struct mtk_video_fmt mtk_video_formats_capture_mt8173[] = {
> },
> };
>
> +static const struct mtk_video_fmt mtk_video_formats_capture_mt8183[] = {
> + {
> + .fourcc = V4L2_PIX_FMT_H264,
> + .type = MTK_FMT_ENC,
> + .num_planes = 1,
> + },
> +};
> +
> /* Wake up context wait_queue */
> static void wake_up_ctx(struct mtk_vcodec_ctx *ctx, unsigned int reason)
> {
> @@ -424,8 +432,22 @@ static const struct mtk_vcodec_enc_pdata mt8173_pdata = {
> .max_bitrate = 4000000,
> };
>
> +static const struct mtk_vcodec_enc_pdata mt8183_pdata = {
> + .chip = MTK_MT8183,
> + .has_lt_irq = false,
> + .uses_ext = true,
> + .capture_formats = mtk_video_formats_capture_mt8183,
> + .num_capture_formats = ARRAY_SIZE(mtk_video_formats_capture_mt8183),
> + /* MT8183 supports the same output formats as MT8173 */
> + .output_formats = mtk_video_formats_output_mt8173,
> + .num_output_formats = ARRAY_SIZE(mtk_video_formats_output_mt8173),
> + .min_bitrate = 64,
> + .max_bitrate = 40000000,
> +};
> +
> static const struct of_device_id mtk_vcodec_enc_match[] = {
> {.compatible = "mediatek,mt8173-vcodec-enc", .data = &mt8173_pdata},
> + {.compatible = "mediatek,mt8183-vcodec-enc", .data = &mt8183_pdata},
> {},
> };
> MODULE_DEVICE_TABLE(of, mtk_vcodec_enc_match);
Powered by blists - more mailing lists