diff mbox series

[v4,13/14] drm/mediatek: Sort OVL adaptor components in alphabetical order

Message ID 20230621031938.5884-14-shawn.sung@mediatek.com (mailing list archive)
State New, archived
Headers show
Series Add display driver for MT8188 VDOSYS1 | expand

Commit Message

Shawn Sung (宋孝謙) June 21, 2023, 3:19 a.m. UTC
- Rename OVL_ADAPTOR_TYPE_RDMA to OVL_ADAPTOR_TYPE_MDP_RDMA
  to align the naming rule of mtk_ovl_adaptor_comp_id.
- Sort components' names in alphabetical order
- Sort device table in alphabetical order
- Add sentinel to device table

Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
---
 .../gpu/drm/mediatek/mtk_disp_ovl_adaptor.c   | 61 ++++++++-----------
 1 file changed, 27 insertions(+), 34 deletions(-)

Comments

AngeloGioacchino Del Regno June 21, 2023, 8:16 a.m. UTC | #1
Il 21/06/23 05:19, Hsiao Chien Sung ha scritto:
> - Rename OVL_ADAPTOR_TYPE_RDMA to OVL_ADAPTOR_TYPE_MDP_RDMA
>    to align the naming rule of mtk_ovl_adaptor_comp_id.
> - Sort components' names in alphabetical order
> - Sort device table in alphabetical order
> - Add sentinel to device table
> 
> Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>

I agree, but this commit should come before [12/14] of this series.

Regards,
Angelo

> ---
>   .../gpu/drm/mediatek/mtk_disp_ovl_adaptor.c   | 61 ++++++++-----------
>   1 file changed, 27 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
> index 69ae531294ff..4120d08e4969 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
> @@ -26,13 +26,14 @@
>   #define MTK_OVL_ADAPTOR_LAYER_NUM 4
>   
>   enum mtk_ovl_adaptor_comp_type {
> -	OVL_ADAPTOR_TYPE_RDMA = 0,
> -	OVL_ADAPTOR_TYPE_MERGE,
>   	OVL_ADAPTOR_TYPE_ETHDR,
> +	OVL_ADAPTOR_TYPE_MDP_RDMA,
> +	OVL_ADAPTOR_TYPE_MERGE,
>   	OVL_ADAPTOR_TYPE_NUM,
>   };
>   
>   enum mtk_ovl_adaptor_comp_id {
> +	OVL_ADAPTOR_ETHDR0,
>   	OVL_ADAPTOR_MDP_RDMA0,
>   	OVL_ADAPTOR_MDP_RDMA1,
>   	OVL_ADAPTOR_MDP_RDMA2,
> @@ -45,7 +46,6 @@ enum mtk_ovl_adaptor_comp_id {
>   	OVL_ADAPTOR_MERGE1,
>   	OVL_ADAPTOR_MERGE2,
>   	OVL_ADAPTOR_MERGE3,
> -	OVL_ADAPTOR_ETHDR0,
>   	OVL_ADAPTOR_ID_MAX
>   };
>   
> @@ -62,21 +62,21 @@ struct mtk_disp_ovl_adaptor {
>   };
>   
>   static const char * const private_comp_stem[OVL_ADAPTOR_TYPE_NUM] = {
> -	[OVL_ADAPTOR_TYPE_RDMA]		= "vdo1-rdma",
> -	[OVL_ADAPTOR_TYPE_MERGE]	= "merge",
>   	[OVL_ADAPTOR_TYPE_ETHDR]	= "ethdr",
> +	[OVL_ADAPTOR_TYPE_MDP_RDMA]	= "vdo1-rdma",
> +	[OVL_ADAPTOR_TYPE_MERGE]	= "merge",
>   };
>   
>   static const struct ovl_adaptor_comp_match comp_matches[OVL_ADAPTOR_ID_MAX] = {
>   	[OVL_ADAPTOR_ETHDR0] = { OVL_ADAPTOR_TYPE_ETHDR, DDP_COMPONENT_ETHDR_MIXER, 0 },
> -	[OVL_ADAPTOR_MDP_RDMA0] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA0, 0 },
> -	[OVL_ADAPTOR_MDP_RDMA1] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA1, 1 },
> -	[OVL_ADAPTOR_MDP_RDMA2] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA2, 2 },
> -	[OVL_ADAPTOR_MDP_RDMA3] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA3, 3 },
> -	[OVL_ADAPTOR_MDP_RDMA4] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA4, 4 },
> -	[OVL_ADAPTOR_MDP_RDMA5] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA5, 5 },
> -	[OVL_ADAPTOR_MDP_RDMA6] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA6, 6 },
> -	[OVL_ADAPTOR_MDP_RDMA7] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA7, 7 },
> +	[OVL_ADAPTOR_MDP_RDMA0] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA0, 0 },
> +	[OVL_ADAPTOR_MDP_RDMA1] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA1, 1 },
> +	[OVL_ADAPTOR_MDP_RDMA2] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA2, 2 },
> +	[OVL_ADAPTOR_MDP_RDMA3] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA3, 3 },
> +	[OVL_ADAPTOR_MDP_RDMA4] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA4, 4 },
> +	[OVL_ADAPTOR_MDP_RDMA5] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA5, 5 },
> +	[OVL_ADAPTOR_MDP_RDMA6] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA6, 6 },
> +	[OVL_ADAPTOR_MDP_RDMA7] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA7, 7 },
>   	[OVL_ADAPTOR_MERGE0] = { OVL_ADAPTOR_TYPE_MERGE, DDP_COMPONENT_MERGE1, 1 },
>   	[OVL_ADAPTOR_MERGE1] = { OVL_ADAPTOR_TYPE_MERGE, DDP_COMPONENT_MERGE2, 2 },
>   	[OVL_ADAPTOR_MERGE2] = { OVL_ADAPTOR_TYPE_MERGE, DDP_COMPONENT_MERGE3, 3 },
> @@ -94,10 +94,7 @@ static int mtk_ovl_adaptor_enable(struct device *dev, enum mtk_ovl_adaptor_comp_
>   	case OVL_ADAPTOR_TYPE_ETHDR:
>   		ret = mtk_ethdr_clk_enable(dev);
>   		break;
> -	case OVL_ADAPTOR_TYPE_MERGE:
> -		ret = mtk_merge_clk_enable(dev);
> -		break;
> -	case OVL_ADAPTOR_TYPE_RDMA:
> +	case OVL_ADAPTOR_TYPE_MDP_RDMA:
>   		// only LARB users need to do this
>   		ret = pm_runtime_get_sync(dev);
>   		if (ret < 0) {
> @@ -108,6 +105,9 @@ static int mtk_ovl_adaptor_enable(struct device *dev, enum mtk_ovl_adaptor_comp_
>   		if (ret)
>   			pm_runtime_put(dev);
>   		break;
> +	case OVL_ADAPTOR_TYPE_MERGE:
> +		ret = mtk_merge_clk_enable(dev);
> +		break;
>   	default:
>   		dev_err(dev, "Unknown type: %d\n", type);
>   	}
> @@ -128,13 +128,13 @@ static void mtk_ovl_adaptor_disable(struct device *dev, enum mtk_ovl_adaptor_com
>   	case OVL_ADAPTOR_TYPE_ETHDR:
>   		mtk_ethdr_clk_disable(dev);
>   		break;
> -	case OVL_ADAPTOR_TYPE_MERGE:
> -		mtk_merge_clk_disable(dev);
> -		break;
> -	case OVL_ADAPTOR_TYPE_RDMA:
> +	case OVL_ADAPTOR_TYPE_MDP_RDMA:
>   		mtk_mdp_rdma_clk_disable(dev);
>   		pm_runtime_put(dev);
>   		break;
> +	case OVL_ADAPTOR_TYPE_MERGE:
> +		mtk_merge_clk_disable(dev);
> +		break;
>   	default:
>   		dev_err(dev, "Unknown type: %d\n", type);
>   	}
> @@ -353,6 +353,7 @@ void mtk_ovl_adaptor_remove_comp(struct device *dev, struct mtk_mutex *mutex)
>   
>   void mtk_ovl_adaptor_connect(struct device *dev, struct device *mmsys_dev, unsigned int next)
>   {
> +	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_ETHDR_MIXER, next);
>   	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_MDP_RDMA0, DDP_COMPONENT_MERGE1);
>   	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_MDP_RDMA1, DDP_COMPONENT_MERGE1);
>   	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_MDP_RDMA2, DDP_COMPONENT_MERGE2);
> @@ -360,11 +361,11 @@ void mtk_ovl_adaptor_connect(struct device *dev, struct device *mmsys_dev, unsig
>   	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_MERGE2, DDP_COMPONENT_ETHDR_MIXER);
>   	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_MERGE3, DDP_COMPONENT_ETHDR_MIXER);
>   	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_MERGE4, DDP_COMPONENT_ETHDR_MIXER);
> -	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_ETHDR_MIXER, next);
>   }
>   
>   void mtk_ovl_adaptor_disconnect(struct device *dev, struct device *mmsys_dev, unsigned int next)
>   {
> +	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_ETHDR_MIXER, next);
>   	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_MDP_RDMA0, DDP_COMPONENT_MERGE1);
>   	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_MDP_RDMA1, DDP_COMPONENT_MERGE1);
>   	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_MDP_RDMA2, DDP_COMPONENT_MERGE2);
> @@ -372,7 +373,6 @@ void mtk_ovl_adaptor_disconnect(struct device *dev, struct device *mmsys_dev, un
>   	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_MERGE2, DDP_COMPONENT_ETHDR_MIXER);
>   	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_MERGE3, DDP_COMPONENT_ETHDR_MIXER);
>   	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_MERGE4, DDP_COMPONENT_ETHDR_MIXER);
> -	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_ETHDR_MIXER, next);
>   }
>   
>   static int ovl_adaptor_comp_get_id(struct device *dev, struct device_node *node,
> @@ -391,17 +391,10 @@ static int ovl_adaptor_comp_get_id(struct device *dev, struct device_node *node,
>   }
>   
>   static const struct of_device_id mtk_ovl_adaptor_comp_dt_ids[] = {
> -	{
> -		.compatible = "mediatek,mt8195-vdo1-rdma",
> -		.data = (void *)OVL_ADAPTOR_TYPE_RDMA,
> -	}, {
> -		.compatible = "mediatek,mt8195-disp-merge",
> -		.data = (void *)OVL_ADAPTOR_TYPE_MERGE,
> -	}, {
> -		.compatible = "mediatek,mt8195-disp-ethdr",
> -		.data = (void *)OVL_ADAPTOR_TYPE_ETHDR,
> -	},
> -	{},
> +	{ .compatible = "mediatek,mt8195-disp-ethdr", .data = (void *)OVL_ADAPTOR_TYPE_ETHDR },
> +	{ .compatible = "mediatek,mt8195-disp-merge", .data = (void *)OVL_ADAPTOR_TYPE_MERGE },
> +	{ .compatible = "mediatek,mt8195-vdo1-rdma", .data = (void *)OVL_ADAPTOR_TYPE_MDP_RDMA },
> +	{ /* sentinel */ }
>   };
>   
>   static int compare_of(struct device *dev, void *data)
Shawn Sung (宋孝謙) June 21, 2023, 9:16 a.m. UTC | #2
On Wed, 2023-06-21 at 10:16 +0200, AngeloGioacchino Del Regno wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  Il 21/06/23 05:19, Hsiao Chien Sung ha scritto:
> > - Rename OVL_ADAPTOR_TYPE_RDMA to OVL_ADAPTOR_TYPE_MDP_RDMA
> >    to align the naming rule of mtk_ovl_adaptor_comp_id.
> > - Sort components' names in alphabetical order
> > - Sort device table in alphabetical order
> > - Add sentinel to device table
> > 
> > Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
> 
> I agree, but this commit should come before [12/14] of this series.

Got it. Since [12/14] removed many lines that use component ID/type
(for example, in mtk_ovl_adaptor_clk_enable() or
mtk_ovl_adaptor_add_comp()), if this commit has to move before that,
should I still modify them and delete them in [12/14]? Thanks.

> 
> Regards,
> Angelo
> 

Best regards,
Hsiao Chien Sung
AngeloGioacchino Del Regno June 21, 2023, 10 a.m. UTC | #3
Il 21/06/23 11:16, Shawn Sung (宋孝謙) ha scritto:
> On Wed, 2023-06-21 at 10:16 +0200, AngeloGioacchino Del Regno wrote:
>>   	
>> External email : Please do not click links or open attachments until
>> you have verified the sender or the content.
>>   Il 21/06/23 05:19, Hsiao Chien Sung ha scritto:
>>> - Rename OVL_ADAPTOR_TYPE_RDMA to OVL_ADAPTOR_TYPE_MDP_RDMA
>>>     to align the naming rule of mtk_ovl_adaptor_comp_id.
>>> - Sort components' names in alphabetical order
>>> - Sort device table in alphabetical order
>>> - Add sentinel to device table
>>>
>>> Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
>>
>> I agree, but this commit should come before [12/14] of this series.
> 
> Got it. Since [12/14] removed many lines that use component ID/type
> (for example, in mtk_ovl_adaptor_clk_enable() or
> mtk_ovl_adaptor_add_comp()), if this commit has to move before that,
> should I still modify them and delete them in [12/14]? Thanks.
> 

Every commit has to work on its own, so you first perform the renaming in
one commit, then you modify and delete.


>>
>> Regards,
>> Angelo
>>
> 
> Best regards,
> Hsiao Chien Sung
diff mbox series

Patch

diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
index 69ae531294ff..4120d08e4969 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
@@ -26,13 +26,14 @@ 
 #define MTK_OVL_ADAPTOR_LAYER_NUM 4
 
 enum mtk_ovl_adaptor_comp_type {
-	OVL_ADAPTOR_TYPE_RDMA = 0,
-	OVL_ADAPTOR_TYPE_MERGE,
 	OVL_ADAPTOR_TYPE_ETHDR,
+	OVL_ADAPTOR_TYPE_MDP_RDMA,
+	OVL_ADAPTOR_TYPE_MERGE,
 	OVL_ADAPTOR_TYPE_NUM,
 };
 
 enum mtk_ovl_adaptor_comp_id {
+	OVL_ADAPTOR_ETHDR0,
 	OVL_ADAPTOR_MDP_RDMA0,
 	OVL_ADAPTOR_MDP_RDMA1,
 	OVL_ADAPTOR_MDP_RDMA2,
@@ -45,7 +46,6 @@  enum mtk_ovl_adaptor_comp_id {
 	OVL_ADAPTOR_MERGE1,
 	OVL_ADAPTOR_MERGE2,
 	OVL_ADAPTOR_MERGE3,
-	OVL_ADAPTOR_ETHDR0,
 	OVL_ADAPTOR_ID_MAX
 };
 
@@ -62,21 +62,21 @@  struct mtk_disp_ovl_adaptor {
 };
 
 static const char * const private_comp_stem[OVL_ADAPTOR_TYPE_NUM] = {
-	[OVL_ADAPTOR_TYPE_RDMA]		= "vdo1-rdma",
-	[OVL_ADAPTOR_TYPE_MERGE]	= "merge",
 	[OVL_ADAPTOR_TYPE_ETHDR]	= "ethdr",
+	[OVL_ADAPTOR_TYPE_MDP_RDMA]	= "vdo1-rdma",
+	[OVL_ADAPTOR_TYPE_MERGE]	= "merge",
 };
 
 static const struct ovl_adaptor_comp_match comp_matches[OVL_ADAPTOR_ID_MAX] = {
 	[OVL_ADAPTOR_ETHDR0] = { OVL_ADAPTOR_TYPE_ETHDR, DDP_COMPONENT_ETHDR_MIXER, 0 },
-	[OVL_ADAPTOR_MDP_RDMA0] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA0, 0 },
-	[OVL_ADAPTOR_MDP_RDMA1] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA1, 1 },
-	[OVL_ADAPTOR_MDP_RDMA2] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA2, 2 },
-	[OVL_ADAPTOR_MDP_RDMA3] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA3, 3 },
-	[OVL_ADAPTOR_MDP_RDMA4] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA4, 4 },
-	[OVL_ADAPTOR_MDP_RDMA5] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA5, 5 },
-	[OVL_ADAPTOR_MDP_RDMA6] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA6, 6 },
-	[OVL_ADAPTOR_MDP_RDMA7] = { OVL_ADAPTOR_TYPE_RDMA, DDP_COMPONENT_MDP_RDMA7, 7 },
+	[OVL_ADAPTOR_MDP_RDMA0] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA0, 0 },
+	[OVL_ADAPTOR_MDP_RDMA1] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA1, 1 },
+	[OVL_ADAPTOR_MDP_RDMA2] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA2, 2 },
+	[OVL_ADAPTOR_MDP_RDMA3] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA3, 3 },
+	[OVL_ADAPTOR_MDP_RDMA4] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA4, 4 },
+	[OVL_ADAPTOR_MDP_RDMA5] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA5, 5 },
+	[OVL_ADAPTOR_MDP_RDMA6] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA6, 6 },
+	[OVL_ADAPTOR_MDP_RDMA7] = { OVL_ADAPTOR_TYPE_MDP_RDMA, DDP_COMPONENT_MDP_RDMA7, 7 },
 	[OVL_ADAPTOR_MERGE0] = { OVL_ADAPTOR_TYPE_MERGE, DDP_COMPONENT_MERGE1, 1 },
 	[OVL_ADAPTOR_MERGE1] = { OVL_ADAPTOR_TYPE_MERGE, DDP_COMPONENT_MERGE2, 2 },
 	[OVL_ADAPTOR_MERGE2] = { OVL_ADAPTOR_TYPE_MERGE, DDP_COMPONENT_MERGE3, 3 },
@@ -94,10 +94,7 @@  static int mtk_ovl_adaptor_enable(struct device *dev, enum mtk_ovl_adaptor_comp_
 	case OVL_ADAPTOR_TYPE_ETHDR:
 		ret = mtk_ethdr_clk_enable(dev);
 		break;
-	case OVL_ADAPTOR_TYPE_MERGE:
-		ret = mtk_merge_clk_enable(dev);
-		break;
-	case OVL_ADAPTOR_TYPE_RDMA:
+	case OVL_ADAPTOR_TYPE_MDP_RDMA:
 		// only LARB users need to do this
 		ret = pm_runtime_get_sync(dev);
 		if (ret < 0) {
@@ -108,6 +105,9 @@  static int mtk_ovl_adaptor_enable(struct device *dev, enum mtk_ovl_adaptor_comp_
 		if (ret)
 			pm_runtime_put(dev);
 		break;
+	case OVL_ADAPTOR_TYPE_MERGE:
+		ret = mtk_merge_clk_enable(dev);
+		break;
 	default:
 		dev_err(dev, "Unknown type: %d\n", type);
 	}
@@ -128,13 +128,13 @@  static void mtk_ovl_adaptor_disable(struct device *dev, enum mtk_ovl_adaptor_com
 	case OVL_ADAPTOR_TYPE_ETHDR:
 		mtk_ethdr_clk_disable(dev);
 		break;
-	case OVL_ADAPTOR_TYPE_MERGE:
-		mtk_merge_clk_disable(dev);
-		break;
-	case OVL_ADAPTOR_TYPE_RDMA:
+	case OVL_ADAPTOR_TYPE_MDP_RDMA:
 		mtk_mdp_rdma_clk_disable(dev);
 		pm_runtime_put(dev);
 		break;
+	case OVL_ADAPTOR_TYPE_MERGE:
+		mtk_merge_clk_disable(dev);
+		break;
 	default:
 		dev_err(dev, "Unknown type: %d\n", type);
 	}
@@ -353,6 +353,7 @@  void mtk_ovl_adaptor_remove_comp(struct device *dev, struct mtk_mutex *mutex)
 
 void mtk_ovl_adaptor_connect(struct device *dev, struct device *mmsys_dev, unsigned int next)
 {
+	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_ETHDR_MIXER, next);
 	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_MDP_RDMA0, DDP_COMPONENT_MERGE1);
 	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_MDP_RDMA1, DDP_COMPONENT_MERGE1);
 	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_MDP_RDMA2, DDP_COMPONENT_MERGE2);
@@ -360,11 +361,11 @@  void mtk_ovl_adaptor_connect(struct device *dev, struct device *mmsys_dev, unsig
 	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_MERGE2, DDP_COMPONENT_ETHDR_MIXER);
 	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_MERGE3, DDP_COMPONENT_ETHDR_MIXER);
 	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_MERGE4, DDP_COMPONENT_ETHDR_MIXER);
-	mtk_mmsys_ddp_connect(mmsys_dev, DDP_COMPONENT_ETHDR_MIXER, next);
 }
 
 void mtk_ovl_adaptor_disconnect(struct device *dev, struct device *mmsys_dev, unsigned int next)
 {
+	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_ETHDR_MIXER, next);
 	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_MDP_RDMA0, DDP_COMPONENT_MERGE1);
 	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_MDP_RDMA1, DDP_COMPONENT_MERGE1);
 	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_MDP_RDMA2, DDP_COMPONENT_MERGE2);
@@ -372,7 +373,6 @@  void mtk_ovl_adaptor_disconnect(struct device *dev, struct device *mmsys_dev, un
 	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_MERGE2, DDP_COMPONENT_ETHDR_MIXER);
 	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_MERGE3, DDP_COMPONENT_ETHDR_MIXER);
 	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_MERGE4, DDP_COMPONENT_ETHDR_MIXER);
-	mtk_mmsys_ddp_disconnect(mmsys_dev, DDP_COMPONENT_ETHDR_MIXER, next);
 }
 
 static int ovl_adaptor_comp_get_id(struct device *dev, struct device_node *node,
@@ -391,17 +391,10 @@  static int ovl_adaptor_comp_get_id(struct device *dev, struct device_node *node,
 }
 
 static const struct of_device_id mtk_ovl_adaptor_comp_dt_ids[] = {
-	{
-		.compatible = "mediatek,mt8195-vdo1-rdma",
-		.data = (void *)OVL_ADAPTOR_TYPE_RDMA,
-	}, {
-		.compatible = "mediatek,mt8195-disp-merge",
-		.data = (void *)OVL_ADAPTOR_TYPE_MERGE,
-	}, {
-		.compatible = "mediatek,mt8195-disp-ethdr",
-		.data = (void *)OVL_ADAPTOR_TYPE_ETHDR,
-	},
-	{},
+	{ .compatible = "mediatek,mt8195-disp-ethdr", .data = (void *)OVL_ADAPTOR_TYPE_ETHDR },
+	{ .compatible = "mediatek,mt8195-disp-merge", .data = (void *)OVL_ADAPTOR_TYPE_MERGE },
+	{ .compatible = "mediatek,mt8195-vdo1-rdma", .data = (void *)OVL_ADAPTOR_TYPE_MDP_RDMA },
+	{ /* sentinel */ }
 };
 
 static int compare_of(struct device *dev, void *data)