diff mbox series

[2/2] mtk-vcodec: Support encoder for MT8186

Message ID 1645617086-18841-3-git-send-email-kyrie.wu@mediatek.com (mailing list archive)
State New, archived
Headers show
Series support mt8186 encoder | expand

Commit Message

Kyrie Wu (吴晗) Feb. 23, 2022, 11:51 a.m. UTC
From: kyrie wu <kyrie.wu@mediatek.com>

Adds MT8186's compatible "mediatek,mt8186-vcodec-enc".
Adds MT8186's device private data.

Signed-off-by: kyrie wu <kyrie.wu@mediatek.com>
---
 drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Rex-BC Chen (陳柏辰) Feb. 23, 2022, 12:37 p.m. UTC | #1
Hello Kyrie,

Why not just use compatible of mt8183?
The data of 8186 is the same with 8183.

In this case, I think we just need to add dt-binding of 8186 and no
need for this patch.

BRs,
Rex

On Wed, 2022-02-23 at 19:51 +0800, kyrie.wu wrote:
> From: kyrie wu <kyrie.wu@mediatek.com>
> 
> Adds MT8186's compatible "mediatek,mt8186-vcodec-enc".
> Adds MT8186's device private data.
> 
> Signed-off-by: kyrie wu <kyrie.wu@mediatek.com>
> ---
>  drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> 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 65207f5b6c1c..e1b91ae9a164 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> @@ -437,6 +437,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,mt8186-vcodec-enc", .data =
> &mt8183_pdata},
>  	{},
>  };
>  MODULE_DEVICE_TABLE(of, mtk_vcodec_enc_match);
Kyrie Wu (吴晗) Feb. 24, 2022, 1:12 a.m. UTC | #2
On Wed, 2022-02-23 at 20:37 +0800, Rex-BC Chen wrote:
> Hello Kyrie,
> 
> Why not just use compatible of mt8183?
> The data of 8186 is the same with 8183.
> 
> In this case, I think we just need to add dt-binding of 8186 and no
> need for this patch.
> 
> BRs,
> Rex

Hi Rex-BC,
MT8186 has same private data as MT8183, but has different compatible,
which is used to match device tree. So the new line is added for 8186.

> 
> On Wed, 2022-02-23 at 19:51 +0800, kyrie.wu wrote:
> > From: kyrie wu <kyrie.wu@mediatek.com>
> > 
> > Adds MT8186's compatible "mediatek,mt8186-vcodec-enc".
> > Adds MT8186's device private data.
> > 
> > Signed-off-by: kyrie wu <kyrie.wu@mediatek.com>
> > ---
> >  drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > 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 65207f5b6c1c..e1b91ae9a164 100644
> > --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> > +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> > @@ -437,6 +437,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,mt8186-vcodec-enc", .data =
> > &mt8183_pdata},
> >  	{},
> >  };
> >  MODULE_DEVICE_TABLE(of, mtk_vcodec_enc_match);
> 
>
diff mbox series

Patch

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 65207f5b6c1c..e1b91ae9a164 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
@@ -437,6 +437,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,mt8186-vcodec-enc", .data = &mt8183_pdata},
 	{},
 };
 MODULE_DEVICE_TABLE(of, mtk_vcodec_enc_match);