diff mbox series

[v1,4/4] drm/mediatek: add mediatek-drm of vdosys0 support for mt8188

Message ID 20220822033213.15769-5-nathan.lu@mediatek.com (mailing list archive)
State New, archived
Headers show
Series Add first version mt8188 vdosys0 driver | expand

Commit Message

nathan.lu Aug. 22, 2022, 3:32 a.m. UTC
From: Nathan Lu <nathan.lu@mediatek.com>

add driver data of mt8188 vdosys0 to mediatek-drm and the sub driver.

Signed-off-by: amy zhang <Amy.Zhang@mediatek.com>
Signed-off-by: Nathan Lu <nathan.lu@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_drm_drv.c | 30 ++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

Comments

CK Hu (胡俊光) Aug. 22, 2022, 5:50 a.m. UTC | #1
Hi, Nathan:

On Mon, 2022-08-22 at 11:32 +0800, nathan.lu wrote:
> From: Nathan Lu <nathan.lu@mediatek.com>
> 
> add driver data of mt8188 vdosys0 to mediatek-drm and the sub driver.
> 
> Signed-off-by: amy zhang <Amy.Zhang@mediatek.com>
> Signed-off-by: Nathan Lu <nathan.lu@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_drm_drv.c | 30
> ++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> index d72263c8a621..260514006093 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> @@ -178,6 +178,18 @@ static const unsigned int mt8186_mtk_ddp_ext[] =
> {
>  	DDP_COMPONENT_DPI0,
>  };
>  
> +static const unsigned int mt8188_mtk_ddp_main[] = {
> +	DDP_COMPONENT_OVL0,
> +	DDP_COMPONENT_RDMA0,
> +	DDP_COMPONENT_COLOR0,
> +	DDP_COMPONENT_CCORR,
> +	DDP_COMPONENT_AAL0,
> +	DDP_COMPONENT_GAMMA,
> +	DDP_COMPONENT_POSTMASK0,
> +	DDP_COMPONENT_DITHER0,
> +	DDP_COMPONENT_DP_INTF0,
> +};
> +
>  static const unsigned int mt8192_mtk_ddp_main[] = {
>  	DDP_COMPONENT_OVL0,
>  	DDP_COMPONENT_OVL_2L0,
> @@ -323,6 +335,20 @@ static const struct mtk_mmsys_match_data
> mt8186_mmsys_match_data = {
>  	},
>  };
>  
> +static const struct mtk_mmsys_driver_data mt8188_vdosys0_driver_data
> = {
> +	.io_start = 0x1c01d000,

For only one mmsys, it's not necessary to set io_start.

Regards,
CK

> +	.main_path = mt8188_mtk_ddp_main,
> +	.main_len = ARRAY_SIZE(mt8188_mtk_ddp_main),
> +	.mmsys_dev_num = 1,
> +};
> +
> +static const struct mtk_mmsys_match_data mt8188_mmsys_match_data = {
> +	.num_drv_data = 1,
> +	.drv_data = {
> +		&mt8188_vdosys0_driver_data,
> +	},
> +};
> +
>  static const struct mtk_mmsys_driver_data mt8192_mmsys_driver_data =
> {
>  	.main_path = mt8192_mtk_ddp_main,
>  	.main_len = ARRAY_SIZE(mt8192_mtk_ddp_main),
> @@ -376,6 +402,8 @@ static const struct of_device_id mtk_drm_of_ids[]
> = {
>  	  .data = &mt8183_mmsys_match_data},
>  	{ .compatible = "mediatek,mt8186-mmsys",
>  	  .data = &mt8186_mmsys_match_data},
> +	{ .compatible = "mediatek,mt8188-mmsys",
> +	  .data = &mt8188_mmsys_match_data},
>  	{ .compatible = "mediatek,mt8192-mmsys",
>  	  .data = &mt8192_mmsys_match_data},
>  	{ .compatible = "mediatek,mt8195-mmsys",
> @@ -734,6 +762,8 @@ static const struct of_device_id
> mtk_ddp_comp_dt_ids[] = {
>  	  .data = (void *)MTK_DISP_MUTEX },
>  	{ .compatible = "mediatek,mt8186-disp-mutex",
>  	  .data = (void *)MTK_DISP_MUTEX },
> +	{ .compatible = "mediatek,mt8188-disp-mutex",
> +	  .data = (void *)MTK_DISP_MUTEX },
>  	{ .compatible = "mediatek,mt8192-disp-mutex",
>  	  .data = (void *)MTK_DISP_MUTEX },
>  	{ .compatible = "mediatek,mt8195-disp-mutex",
nathan.lu Sept. 6, 2022, 2:39 a.m. UTC | #2
Hi CK,

Thanks for your review, and appreciate for all comments and sugestions.
I'll remove io_start variable at next version.
It will be upstream with vdosys1 patch later.

On Mon, 2022-08-22 at 13:50 +0800, CK Hu wrote:
> Hi, Nathan:
> 
> On Mon, 2022-08-22 at 11:32 +0800, nathan.lu wrote:
> > From: Nathan Lu <nathan.lu@mediatek.com>
> > 
> > add driver data of mt8188 vdosys0 to mediatek-drm and the sub
> > driver.
> > 
> > Signed-off-by: amy zhang <Amy.Zhang@mediatek.com>
> > Signed-off-by: Nathan Lu <nathan.lu@mediatek.com>
> > ---
> >  drivers/gpu/drm/mediatek/mtk_drm_drv.c | 30
> > ++++++++++++++++++++++++++
> >  1 file changed, 30 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > index d72263c8a621..260514006093 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > @@ -178,6 +178,18 @@ static const unsigned int mt8186_mtk_ddp_ext[]
> > =
> > {
> >  	DDP_COMPONENT_DPI0,
> >  };
> >  
> > +static const unsigned int mt8188_mtk_ddp_main[] = {
> > +	DDP_COMPONENT_OVL0,
> > +	DDP_COMPONENT_RDMA0,
> > +	DDP_COMPONENT_COLOR0,
> > +	DDP_COMPONENT_CCORR,
> > +	DDP_COMPONENT_AAL0,
> > +	DDP_COMPONENT_GAMMA,
> > +	DDP_COMPONENT_POSTMASK0,
> > +	DDP_COMPONENT_DITHER0,
> > +	DDP_COMPONENT_DP_INTF0,
> > +};
> > +
> >  static const unsigned int mt8192_mtk_ddp_main[] = {
> >  	DDP_COMPONENT_OVL0,
> >  	DDP_COMPONENT_OVL_2L0,
> > @@ -323,6 +335,20 @@ static const struct mtk_mmsys_match_data
> > mt8186_mmsys_match_data = {
> >  	},
> >  };
> >  
> > +static const struct mtk_mmsys_driver_data
> > mt8188_vdosys0_driver_data
> > = {
> > +	.io_start = 0x1c01d000,
> 
> For only one mmsys, it's not necessary to set io_start.
> 
> Regards,
> CK
> 
> > +	.main_path = mt8188_mtk_ddp_main,
> > +	.main_len = ARRAY_SIZE(mt8188_mtk_ddp_main),
> > +	.mmsys_dev_num = 1,
> > +};
> > +
> > +static const struct mtk_mmsys_match_data mt8188_mmsys_match_data =
> > {
> > +	.num_drv_data = 1,
> > +	.drv_data = {
> > +		&mt8188_vdosys0_driver_data,
> > +	},
> > +};
> > +
> >  static const struct mtk_mmsys_driver_data mt8192_mmsys_driver_data
> > =
> > {
> >  	.main_path = mt8192_mtk_ddp_main,
> >  	.main_len = ARRAY_SIZE(mt8192_mtk_ddp_main),
> > @@ -376,6 +402,8 @@ static const struct of_device_id
> > mtk_drm_of_ids[]
> > = {
> >  	  .data = &mt8183_mmsys_match_data},
> >  	{ .compatible = "mediatek,mt8186-mmsys",
> >  	  .data = &mt8186_mmsys_match_data},
> > +	{ .compatible = "mediatek,mt8188-mmsys",
> > +	  .data = &mt8188_mmsys_match_data},
> >  	{ .compatible = "mediatek,mt8192-mmsys",
> >  	  .data = &mt8192_mmsys_match_data},
> >  	{ .compatible = "mediatek,mt8195-mmsys",
> > @@ -734,6 +762,8 @@ static const struct of_device_id
> > mtk_ddp_comp_dt_ids[] = {
> >  	  .data = (void *)MTK_DISP_MUTEX },
> >  	{ .compatible = "mediatek,mt8186-disp-mutex",
> >  	  .data = (void *)MTK_DISP_MUTEX },
> > +	{ .compatible = "mediatek,mt8188-disp-mutex",
> > +	  .data = (void *)MTK_DISP_MUTEX },
> >  	{ .compatible = "mediatek,mt8192-disp-mutex",
> >  	  .data = (void *)MTK_DISP_MUTEX },
> >  	{ .compatible = "mediatek,mt8195-disp-mutex",
> 
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index d72263c8a621..260514006093 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@ -178,6 +178,18 @@  static const unsigned int mt8186_mtk_ddp_ext[] = {
 	DDP_COMPONENT_DPI0,
 };
 
+static const unsigned int mt8188_mtk_ddp_main[] = {
+	DDP_COMPONENT_OVL0,
+	DDP_COMPONENT_RDMA0,
+	DDP_COMPONENT_COLOR0,
+	DDP_COMPONENT_CCORR,
+	DDP_COMPONENT_AAL0,
+	DDP_COMPONENT_GAMMA,
+	DDP_COMPONENT_POSTMASK0,
+	DDP_COMPONENT_DITHER0,
+	DDP_COMPONENT_DP_INTF0,
+};
+
 static const unsigned int mt8192_mtk_ddp_main[] = {
 	DDP_COMPONENT_OVL0,
 	DDP_COMPONENT_OVL_2L0,
@@ -323,6 +335,20 @@  static const struct mtk_mmsys_match_data mt8186_mmsys_match_data = {
 	},
 };
 
+static const struct mtk_mmsys_driver_data mt8188_vdosys0_driver_data = {
+	.io_start = 0x1c01d000,
+	.main_path = mt8188_mtk_ddp_main,
+	.main_len = ARRAY_SIZE(mt8188_mtk_ddp_main),
+	.mmsys_dev_num = 1,
+};
+
+static const struct mtk_mmsys_match_data mt8188_mmsys_match_data = {
+	.num_drv_data = 1,
+	.drv_data = {
+		&mt8188_vdosys0_driver_data,
+	},
+};
+
 static const struct mtk_mmsys_driver_data mt8192_mmsys_driver_data = {
 	.main_path = mt8192_mtk_ddp_main,
 	.main_len = ARRAY_SIZE(mt8192_mtk_ddp_main),
@@ -376,6 +402,8 @@  static const struct of_device_id mtk_drm_of_ids[] = {
 	  .data = &mt8183_mmsys_match_data},
 	{ .compatible = "mediatek,mt8186-mmsys",
 	  .data = &mt8186_mmsys_match_data},
+	{ .compatible = "mediatek,mt8188-mmsys",
+	  .data = &mt8188_mmsys_match_data},
 	{ .compatible = "mediatek,mt8192-mmsys",
 	  .data = &mt8192_mmsys_match_data},
 	{ .compatible = "mediatek,mt8195-mmsys",
@@ -734,6 +762,8 @@  static const struct of_device_id mtk_ddp_comp_dt_ids[] = {
 	  .data = (void *)MTK_DISP_MUTEX },
 	{ .compatible = "mediatek,mt8186-disp-mutex",
 	  .data = (void *)MTK_DISP_MUTEX },
+	{ .compatible = "mediatek,mt8188-disp-mutex",
+	  .data = (void *)MTK_DISP_MUTEX },
 	{ .compatible = "mediatek,mt8192-disp-mutex",
 	  .data = (void *)MTK_DISP_MUTEX },
 	{ .compatible = "mediatek,mt8195-disp-mutex",