All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add mt8186 mutex support for mdp3
@ 2022-07-05 12:26 ` Allen-KH Cheng
  0 siblings, 0 replies; 30+ messages in thread
From: Allen-KH Cheng @ 2022-07-05 12:26 UTC (permalink / raw)
  To: Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
	Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Allen-KH Cheng

This series are based on matthias.bgg/linux.git, for-next and provide
mt8186 mutex support for Media Data Path 3 (MDP3).

Allen-KH Cheng (2):
  dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
  soc: mediatek: mutex: add mt8186 mutex mod settings for mdp3

 .../bindings/soc/mediatek/mediatek,mutex.yaml |  1 +
 drivers/soc/mediatek/mtk-mutex.c              | 23 +++++++++++++++++++
 include/linux/soc/mediatek/mtk-mutex.h        |  2 ++
 3 files changed, 26 insertions(+)

-- 
2.18.0


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH 0/2] Add mt8186 mutex support for mdp3
@ 2022-07-05 12:26 ` Allen-KH Cheng
  0 siblings, 0 replies; 30+ messages in thread
From: Allen-KH Cheng @ 2022-07-05 12:26 UTC (permalink / raw)
  To: Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
	Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Allen-KH Cheng

This series are based on matthias.bgg/linux.git, for-next and provide
mt8186 mutex support for Media Data Path 3 (MDP3).

Allen-KH Cheng (2):
  dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
  soc: mediatek: mutex: add mt8186 mutex mod settings for mdp3

 .../bindings/soc/mediatek/mediatek,mutex.yaml |  1 +
 drivers/soc/mediatek/mtk-mutex.c              | 23 +++++++++++++++++++
 include/linux/soc/mediatek/mtk-mutex.h        |  2 ++
 3 files changed, 26 insertions(+)

-- 
2.18.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
  2022-07-05 12:26 ` Allen-KH Cheng
@ 2022-07-05 12:26   ` Allen-KH Cheng
  -1 siblings, 0 replies; 30+ messages in thread
From: Allen-KH Cheng @ 2022-07-05 12:26 UTC (permalink / raw)
  To: Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
	Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Allen-KH Cheng,
	Xiandong Wang

Add mdp3 mutex compatible for mt8186 SoC.

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
---
 .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml         | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
index 627dcc3e8b32..234fa5dc07c2 100644
--- a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
+++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
@@ -30,6 +30,7 @@ properties:
       - mediatek,mt8173-disp-mutex
       - mediatek,mt8183-disp-mutex
       - mediatek,mt8186-disp-mutex
+      - mediatek,mt8186-mdp3-mutex
       - mediatek,mt8192-disp-mutex
       - mediatek,mt8195-disp-mutex
 
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
@ 2022-07-05 12:26   ` Allen-KH Cheng
  0 siblings, 0 replies; 30+ messages in thread
From: Allen-KH Cheng @ 2022-07-05 12:26 UTC (permalink / raw)
  To: Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
	Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Allen-KH Cheng,
	Xiandong Wang

Add mdp3 mutex compatible for mt8186 SoC.

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
---
 .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml         | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
index 627dcc3e8b32..234fa5dc07c2 100644
--- a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
+++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
@@ -30,6 +30,7 @@ properties:
       - mediatek,mt8173-disp-mutex
       - mediatek,mt8183-disp-mutex
       - mediatek,mt8186-disp-mutex
+      - mediatek,mt8186-mdp3-mutex
       - mediatek,mt8192-disp-mutex
       - mediatek,mt8195-disp-mutex
 
-- 
2.18.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 2/2] soc: mediatek: mutex: add mt8186 mutex mod settings for mdp3
  2022-07-05 12:26 ` Allen-KH Cheng
@ 2022-07-05 12:26   ` Allen-KH Cheng
  -1 siblings, 0 replies; 30+ messages in thread
From: Allen-KH Cheng @ 2022-07-05 12:26 UTC (permalink / raw)
  To: Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
	Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Allen-KH Cheng,
	Xiandong Wang

This patch adds mt8186 mutex mod settings for mdp3.

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
---
 drivers/soc/mediatek/mtk-mutex.c       | 23 +++++++++++++++++++++++
 include/linux/soc/mediatek/mtk-mutex.h |  2 ++
 2 files changed, 25 insertions(+)

diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c
index 2fd8318c3bdc..51fd0186d9b5 100644
--- a/drivers/soc/mediatek/mtk-mutex.c
+++ b/drivers/soc/mediatek/mtk-mutex.c
@@ -91,6 +91,15 @@
 #define MT8183_MUTEX_MOD_MDP_AAL0		23
 #define MT8183_MUTEX_MOD_MDP_CCORR0		24
 
+#define MT8186_MUTEX_MOD_MDP_RDMA0		0
+#define MT8186_MUTEX_MOD_MDP_AAL0		2
+#define MT8186_MUTEX_MOD_MDP_HDR0		4
+#define MT8186_MUTEX_MOD_MDP_RSZ0		5
+#define MT8186_MUTEX_MOD_MDP_RSZ1		6
+#define MT8186_MUTEX_MOD_MDP_WROT0		7
+#define MT8186_MUTEX_MOD_MDP_TDSHP0		9
+#define MT8186_MUTEX_MOD_MDP_COLOR0		14
+
 #define MT8173_MUTEX_MOD_DISP_OVL0		11
 #define MT8173_MUTEX_MOD_DISP_OVL1		12
 #define MT8173_MUTEX_MOD_DISP_RDMA0		13
@@ -324,6 +333,17 @@ static const unsigned int mt8186_mutex_mod[DDP_COMPONENT_ID_MAX] = {
 	[DDP_COMPONENT_RDMA1] = MT8186_MUTEX_MOD_DISP_RDMA1,
 };
 
+static const unsigned int mt8186_mutex_table_mod[MUTEX_MOD_IDX_MAX] = {
+	[MUTEX_MOD_IDX_MDP_RDMA0] = MT8186_MUTEX_MOD_MDP_RDMA0,
+	[MUTEX_MOD_IDX_MDP_RSZ0] = MT8186_MUTEX_MOD_MDP_RSZ0,
+	[MUTEX_MOD_IDX_MDP_RSZ1] = MT8186_MUTEX_MOD_MDP_RSZ1,
+	[MUTEX_MOD_IDX_MDP_TDSHP0] = MT8186_MUTEX_MOD_MDP_TDSHP0,
+	[MUTEX_MOD_IDX_MDP_WROT0] = MT8186_MUTEX_MOD_MDP_WROT0,
+	[MUTEX_MOD_IDX_MDP_HDR0] = MT8186_MUTEX_MOD_MDP_HDR0,
+	[MUTEX_MOD_IDX_MDP_AAL0] = MT8186_MUTEX_MOD_MDP_AAL0,
+	[MUTEX_MOD_IDX_MDP_COLOR0] = MT8186_MUTEX_MOD_MDP_COLOR0,
+};
+
 static const unsigned int mt8192_mutex_mod[DDP_COMPONENT_ID_MAX] = {
 	[DDP_COMPONENT_AAL0] = MT8192_MUTEX_MOD_DISP_AAL0,
 	[DDP_COMPONENT_CCORR] = MT8192_MUTEX_MOD_DISP_CCORR0,
@@ -463,6 +483,7 @@ static const struct mtk_mutex_data mt8186_mutex_driver_data = {
 	.mutex_sof = mt8186_mutex_sof,
 	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
 	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
+	.mutex_table_mod = mt8186_mutex_table_mod,
 };
 
 static const struct mtk_mutex_data mt8192_mutex_driver_data = {
@@ -816,6 +837,8 @@ static const struct of_device_id mutex_driver_dt_match[] = {
 	  .data = &mt8183_mutex_driver_data},
 	{ .compatible = "mediatek,mt8186-disp-mutex",
 	  .data = &mt8186_mutex_driver_data},
+	{ .compatible = "mediatek,mt8186-mdp3-mutex",
+	  .data = &mt8186_mutex_driver_data},
 	{ .compatible = "mediatek,mt8192-disp-mutex",
 	  .data = &mt8192_mutex_driver_data},
 	{ .compatible = "mediatek,mt8195-disp-mutex",
diff --git a/include/linux/soc/mediatek/mtk-mutex.h b/include/linux/soc/mediatek/mtk-mutex.h
index a0f4f51a3b45..b335c2837cd8 100644
--- a/include/linux/soc/mediatek/mtk-mutex.h
+++ b/include/linux/soc/mediatek/mtk-mutex.h
@@ -20,6 +20,8 @@ enum mtk_mutex_mod_index {
 	MUTEX_MOD_IDX_MDP_WDMA,
 	MUTEX_MOD_IDX_MDP_AAL0,
 	MUTEX_MOD_IDX_MDP_CCORR0,
+	MUTEX_MOD_IDX_MDP_HDR0,
+	MUTEX_MOD_IDX_MDP_COLOR0,
 
 	MUTEX_MOD_IDX_MAX		/* ALWAYS keep at the end */
 };
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH 2/2] soc: mediatek: mutex: add mt8186 mutex mod settings for mdp3
@ 2022-07-05 12:26   ` Allen-KH Cheng
  0 siblings, 0 replies; 30+ messages in thread
From: Allen-KH Cheng @ 2022-07-05 12:26 UTC (permalink / raw)
  To: Matthias Brugger, Rob Herring, Krzysztof Kozlowski,
	Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Allen-KH Cheng,
	Xiandong Wang

This patch adds mt8186 mutex mod settings for mdp3.

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
---
 drivers/soc/mediatek/mtk-mutex.c       | 23 +++++++++++++++++++++++
 include/linux/soc/mediatek/mtk-mutex.h |  2 ++
 2 files changed, 25 insertions(+)

diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c
index 2fd8318c3bdc..51fd0186d9b5 100644
--- a/drivers/soc/mediatek/mtk-mutex.c
+++ b/drivers/soc/mediatek/mtk-mutex.c
@@ -91,6 +91,15 @@
 #define MT8183_MUTEX_MOD_MDP_AAL0		23
 #define MT8183_MUTEX_MOD_MDP_CCORR0		24
 
+#define MT8186_MUTEX_MOD_MDP_RDMA0		0
+#define MT8186_MUTEX_MOD_MDP_AAL0		2
+#define MT8186_MUTEX_MOD_MDP_HDR0		4
+#define MT8186_MUTEX_MOD_MDP_RSZ0		5
+#define MT8186_MUTEX_MOD_MDP_RSZ1		6
+#define MT8186_MUTEX_MOD_MDP_WROT0		7
+#define MT8186_MUTEX_MOD_MDP_TDSHP0		9
+#define MT8186_MUTEX_MOD_MDP_COLOR0		14
+
 #define MT8173_MUTEX_MOD_DISP_OVL0		11
 #define MT8173_MUTEX_MOD_DISP_OVL1		12
 #define MT8173_MUTEX_MOD_DISP_RDMA0		13
@@ -324,6 +333,17 @@ static const unsigned int mt8186_mutex_mod[DDP_COMPONENT_ID_MAX] = {
 	[DDP_COMPONENT_RDMA1] = MT8186_MUTEX_MOD_DISP_RDMA1,
 };
 
+static const unsigned int mt8186_mutex_table_mod[MUTEX_MOD_IDX_MAX] = {
+	[MUTEX_MOD_IDX_MDP_RDMA0] = MT8186_MUTEX_MOD_MDP_RDMA0,
+	[MUTEX_MOD_IDX_MDP_RSZ0] = MT8186_MUTEX_MOD_MDP_RSZ0,
+	[MUTEX_MOD_IDX_MDP_RSZ1] = MT8186_MUTEX_MOD_MDP_RSZ1,
+	[MUTEX_MOD_IDX_MDP_TDSHP0] = MT8186_MUTEX_MOD_MDP_TDSHP0,
+	[MUTEX_MOD_IDX_MDP_WROT0] = MT8186_MUTEX_MOD_MDP_WROT0,
+	[MUTEX_MOD_IDX_MDP_HDR0] = MT8186_MUTEX_MOD_MDP_HDR0,
+	[MUTEX_MOD_IDX_MDP_AAL0] = MT8186_MUTEX_MOD_MDP_AAL0,
+	[MUTEX_MOD_IDX_MDP_COLOR0] = MT8186_MUTEX_MOD_MDP_COLOR0,
+};
+
 static const unsigned int mt8192_mutex_mod[DDP_COMPONENT_ID_MAX] = {
 	[DDP_COMPONENT_AAL0] = MT8192_MUTEX_MOD_DISP_AAL0,
 	[DDP_COMPONENT_CCORR] = MT8192_MUTEX_MOD_DISP_CCORR0,
@@ -463,6 +483,7 @@ static const struct mtk_mutex_data mt8186_mutex_driver_data = {
 	.mutex_sof = mt8186_mutex_sof,
 	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
 	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
+	.mutex_table_mod = mt8186_mutex_table_mod,
 };
 
 static const struct mtk_mutex_data mt8192_mutex_driver_data = {
@@ -816,6 +837,8 @@ static const struct of_device_id mutex_driver_dt_match[] = {
 	  .data = &mt8183_mutex_driver_data},
 	{ .compatible = "mediatek,mt8186-disp-mutex",
 	  .data = &mt8186_mutex_driver_data},
+	{ .compatible = "mediatek,mt8186-mdp3-mutex",
+	  .data = &mt8186_mutex_driver_data},
 	{ .compatible = "mediatek,mt8192-disp-mutex",
 	  .data = &mt8192_mutex_driver_data},
 	{ .compatible = "mediatek,mt8195-disp-mutex",
diff --git a/include/linux/soc/mediatek/mtk-mutex.h b/include/linux/soc/mediatek/mtk-mutex.h
index a0f4f51a3b45..b335c2837cd8 100644
--- a/include/linux/soc/mediatek/mtk-mutex.h
+++ b/include/linux/soc/mediatek/mtk-mutex.h
@@ -20,6 +20,8 @@ enum mtk_mutex_mod_index {
 	MUTEX_MOD_IDX_MDP_WDMA,
 	MUTEX_MOD_IDX_MDP_AAL0,
 	MUTEX_MOD_IDX_MDP_CCORR0,
+	MUTEX_MOD_IDX_MDP_HDR0,
+	MUTEX_MOD_IDX_MDP_COLOR0,
 
 	MUTEX_MOD_IDX_MAX		/* ALWAYS keep at the end */
 };
-- 
2.18.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH 0/2] Add mt8186 mutex support for mdp3
  2022-07-05 12:26 ` Allen-KH Cheng
@ 2022-07-06 14:17   ` Matthias Brugger
  -1 siblings, 0 replies; 30+ messages in thread
From: Matthias Brugger @ 2022-07-06 14:17 UTC (permalink / raw)
  To: Allen-KH Cheng, Rob Herring, Krzysztof Kozlowski, Chun-Kuang Hu,
	Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek



On 05/07/2022 14:26, Allen-KH Cheng wrote:
> This series are based on matthias.bgg/linux.git, for-next and provide
> mt8186 mutex support for Media Data Path 3 (MDP3).
> 
> Allen-KH Cheng (2):
>    dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
>    soc: mediatek: mutex: add mt8186 mutex mod settings for mdp3

Whole series applied to v5.19-next/soc

Thanks

> 
>   .../bindings/soc/mediatek/mediatek,mutex.yaml |  1 +
>   drivers/soc/mediatek/mtk-mutex.c              | 23 +++++++++++++++++++
>   include/linux/soc/mediatek/mtk-mutex.h        |  2 ++
>   3 files changed, 26 insertions(+)
> 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 0/2] Add mt8186 mutex support for mdp3
@ 2022-07-06 14:17   ` Matthias Brugger
  0 siblings, 0 replies; 30+ messages in thread
From: Matthias Brugger @ 2022-07-06 14:17 UTC (permalink / raw)
  To: Allen-KH Cheng, Rob Herring, Krzysztof Kozlowski, Chun-Kuang Hu,
	Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek



On 05/07/2022 14:26, Allen-KH Cheng wrote:
> This series are based on matthias.bgg/linux.git, for-next and provide
> mt8186 mutex support for Media Data Path 3 (MDP3).
> 
> Allen-KH Cheng (2):
>    dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
>    soc: mediatek: mutex: add mt8186 mutex mod settings for mdp3

Whole series applied to v5.19-next/soc

Thanks

> 
>   .../bindings/soc/mediatek/mediatek,mutex.yaml |  1 +
>   drivers/soc/mediatek/mtk-mutex.c              | 23 +++++++++++++++++++
>   include/linux/soc/mediatek/mtk-mutex.h        |  2 ++
>   3 files changed, 26 insertions(+)
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 2/2] soc: mediatek: mutex: add mt8186 mutex mod settings for mdp3
  2022-07-05 12:26   ` Allen-KH Cheng
@ 2022-07-07  8:51     ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 30+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-07  8:51 UTC (permalink / raw)
  To: Allen-KH Cheng, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang

Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
> This patch adds mt8186 mutex mod settings for mdp3.
> 
> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
> Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
> ---
>   drivers/soc/mediatek/mtk-mutex.c       | 23 +++++++++++++++++++++++
>   include/linux/soc/mediatek/mtk-mutex.h |  2 ++
>   2 files changed, 25 insertions(+)
> 
> diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c
> index 2fd8318c3bdc..51fd0186d9b5 100644
> --- a/drivers/soc/mediatek/mtk-mutex.c
> +++ b/drivers/soc/mediatek/mtk-mutex.c
> @@ -91,6 +91,15 @@
>   #define MT8183_MUTEX_MOD_MDP_AAL0		23
>   #define MT8183_MUTEX_MOD_MDP_CCORR0		24
>   
> +#define MT8186_MUTEX_MOD_MDP_RDMA0		0
> +#define MT8186_MUTEX_MOD_MDP_AAL0		2
> +#define MT8186_MUTEX_MOD_MDP_HDR0		4
> +#define MT8186_MUTEX_MOD_MDP_RSZ0		5
> +#define MT8186_MUTEX_MOD_MDP_RSZ1		6
> +#define MT8186_MUTEX_MOD_MDP_WROT0		7
> +#define MT8186_MUTEX_MOD_MDP_TDSHP0		9
> +#define MT8186_MUTEX_MOD_MDP_COLOR0		14
> +
>   #define MT8173_MUTEX_MOD_DISP_OVL0		11
>   #define MT8173_MUTEX_MOD_DISP_OVL1		12
>   #define MT8173_MUTEX_MOD_DISP_RDMA0		13
> @@ -324,6 +333,17 @@ static const unsigned int mt8186_mutex_mod[DDP_COMPONENT_ID_MAX] = {
>   	[DDP_COMPONENT_RDMA1] = MT8186_MUTEX_MOD_DISP_RDMA1,
>   };
>   
> +static const unsigned int mt8186_mutex_table_mod[MUTEX_MOD_IDX_MAX] = {
> +	[MUTEX_MOD_IDX_MDP_RDMA0] = MT8186_MUTEX_MOD_MDP_RDMA0,
> +	[MUTEX_MOD_IDX_MDP_RSZ0] = MT8186_MUTEX_MOD_MDP_RSZ0,
> +	[MUTEX_MOD_IDX_MDP_RSZ1] = MT8186_MUTEX_MOD_MDP_RSZ1,
> +	[MUTEX_MOD_IDX_MDP_TDSHP0] = MT8186_MUTEX_MOD_MDP_TDSHP0,
> +	[MUTEX_MOD_IDX_MDP_WROT0] = MT8186_MUTEX_MOD_MDP_WROT0,
> +	[MUTEX_MOD_IDX_MDP_HDR0] = MT8186_MUTEX_MOD_MDP_HDR0,
> +	[MUTEX_MOD_IDX_MDP_AAL0] = MT8186_MUTEX_MOD_MDP_AAL0,
> +	[MUTEX_MOD_IDX_MDP_COLOR0] = MT8186_MUTEX_MOD_MDP_COLOR0,
> +};
> +
>   static const unsigned int mt8192_mutex_mod[DDP_COMPONENT_ID_MAX] = {
>   	[DDP_COMPONENT_AAL0] = MT8192_MUTEX_MOD_DISP_AAL0,
>   	[DDP_COMPONENT_CCORR] = MT8192_MUTEX_MOD_DISP_CCORR0,
> @@ -463,6 +483,7 @@ static const struct mtk_mutex_data mt8186_mutex_driver_data = {
>   	.mutex_sof = mt8186_mutex_sof,
>   	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
>   	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
> +	.mutex_table_mod = mt8186_mutex_table_mod,
>   };
>   
>   static const struct mtk_mutex_data mt8192_mutex_driver_data = {
> @@ -816,6 +837,8 @@ static const struct of_device_id mutex_driver_dt_match[] = {
>   	  .data = &mt8183_mutex_driver_data},
>   	{ .compatible = "mediatek,mt8186-disp-mutex",
>   	  .data = &mt8186_mutex_driver_data},
> +	{ .compatible = "mediatek,mt8186-mdp3-mutex",

You don't need this entry, as mediatek,mt8186-disp-mutex already uses the same
driver data as this one.

Please drop that.

Everything else looks good.

> +	  .data = &mt8186_mutex_driver_data},
>   	{ .compatible = "mediatek,mt8192-disp-mutex",
>   	  .data = &mt8192_mutex_driver_data},
>   	{ .compatible = "mediatek,mt8195-disp-mutex",
> diff --git a/include/linux/soc/mediatek/mtk-mutex.h b/include/linux/soc/mediatek/mtk-mutex.h
> index a0f4f51a3b45..b335c2837cd8 100644
> --- a/include/linux/soc/mediatek/mtk-mutex.h
> +++ b/include/linux/soc/mediatek/mtk-mutex.h
> @@ -20,6 +20,8 @@ enum mtk_mutex_mod_index {
>   	MUTEX_MOD_IDX_MDP_WDMA,
>   	MUTEX_MOD_IDX_MDP_AAL0,
>   	MUTEX_MOD_IDX_MDP_CCORR0,
> +	MUTEX_MOD_IDX_MDP_HDR0,
> +	MUTEX_MOD_IDX_MDP_COLOR0,
>   
>   	MUTEX_MOD_IDX_MAX		/* ALWAYS keep at the end */
>   };
> 



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 2/2] soc: mediatek: mutex: add mt8186 mutex mod settings for mdp3
@ 2022-07-07  8:51     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 30+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-07  8:51 UTC (permalink / raw)
  To: Allen-KH Cheng, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang

Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
> This patch adds mt8186 mutex mod settings for mdp3.
> 
> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
> Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
> ---
>   drivers/soc/mediatek/mtk-mutex.c       | 23 +++++++++++++++++++++++
>   include/linux/soc/mediatek/mtk-mutex.h |  2 ++
>   2 files changed, 25 insertions(+)
> 
> diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c
> index 2fd8318c3bdc..51fd0186d9b5 100644
> --- a/drivers/soc/mediatek/mtk-mutex.c
> +++ b/drivers/soc/mediatek/mtk-mutex.c
> @@ -91,6 +91,15 @@
>   #define MT8183_MUTEX_MOD_MDP_AAL0		23
>   #define MT8183_MUTEX_MOD_MDP_CCORR0		24
>   
> +#define MT8186_MUTEX_MOD_MDP_RDMA0		0
> +#define MT8186_MUTEX_MOD_MDP_AAL0		2
> +#define MT8186_MUTEX_MOD_MDP_HDR0		4
> +#define MT8186_MUTEX_MOD_MDP_RSZ0		5
> +#define MT8186_MUTEX_MOD_MDP_RSZ1		6
> +#define MT8186_MUTEX_MOD_MDP_WROT0		7
> +#define MT8186_MUTEX_MOD_MDP_TDSHP0		9
> +#define MT8186_MUTEX_MOD_MDP_COLOR0		14
> +
>   #define MT8173_MUTEX_MOD_DISP_OVL0		11
>   #define MT8173_MUTEX_MOD_DISP_OVL1		12
>   #define MT8173_MUTEX_MOD_DISP_RDMA0		13
> @@ -324,6 +333,17 @@ static const unsigned int mt8186_mutex_mod[DDP_COMPONENT_ID_MAX] = {
>   	[DDP_COMPONENT_RDMA1] = MT8186_MUTEX_MOD_DISP_RDMA1,
>   };
>   
> +static const unsigned int mt8186_mutex_table_mod[MUTEX_MOD_IDX_MAX] = {
> +	[MUTEX_MOD_IDX_MDP_RDMA0] = MT8186_MUTEX_MOD_MDP_RDMA0,
> +	[MUTEX_MOD_IDX_MDP_RSZ0] = MT8186_MUTEX_MOD_MDP_RSZ0,
> +	[MUTEX_MOD_IDX_MDP_RSZ1] = MT8186_MUTEX_MOD_MDP_RSZ1,
> +	[MUTEX_MOD_IDX_MDP_TDSHP0] = MT8186_MUTEX_MOD_MDP_TDSHP0,
> +	[MUTEX_MOD_IDX_MDP_WROT0] = MT8186_MUTEX_MOD_MDP_WROT0,
> +	[MUTEX_MOD_IDX_MDP_HDR0] = MT8186_MUTEX_MOD_MDP_HDR0,
> +	[MUTEX_MOD_IDX_MDP_AAL0] = MT8186_MUTEX_MOD_MDP_AAL0,
> +	[MUTEX_MOD_IDX_MDP_COLOR0] = MT8186_MUTEX_MOD_MDP_COLOR0,
> +};
> +
>   static const unsigned int mt8192_mutex_mod[DDP_COMPONENT_ID_MAX] = {
>   	[DDP_COMPONENT_AAL0] = MT8192_MUTEX_MOD_DISP_AAL0,
>   	[DDP_COMPONENT_CCORR] = MT8192_MUTEX_MOD_DISP_CCORR0,
> @@ -463,6 +483,7 @@ static const struct mtk_mutex_data mt8186_mutex_driver_data = {
>   	.mutex_sof = mt8186_mutex_sof,
>   	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
>   	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
> +	.mutex_table_mod = mt8186_mutex_table_mod,
>   };
>   
>   static const struct mtk_mutex_data mt8192_mutex_driver_data = {
> @@ -816,6 +837,8 @@ static const struct of_device_id mutex_driver_dt_match[] = {
>   	  .data = &mt8183_mutex_driver_data},
>   	{ .compatible = "mediatek,mt8186-disp-mutex",
>   	  .data = &mt8186_mutex_driver_data},
> +	{ .compatible = "mediatek,mt8186-mdp3-mutex",

You don't need this entry, as mediatek,mt8186-disp-mutex already uses the same
driver data as this one.

Please drop that.

Everything else looks good.

> +	  .data = &mt8186_mutex_driver_data},
>   	{ .compatible = "mediatek,mt8192-disp-mutex",
>   	  .data = &mt8192_mutex_driver_data},
>   	{ .compatible = "mediatek,mt8195-disp-mutex",
> diff --git a/include/linux/soc/mediatek/mtk-mutex.h b/include/linux/soc/mediatek/mtk-mutex.h
> index a0f4f51a3b45..b335c2837cd8 100644
> --- a/include/linux/soc/mediatek/mtk-mutex.h
> +++ b/include/linux/soc/mediatek/mtk-mutex.h
> @@ -20,6 +20,8 @@ enum mtk_mutex_mod_index {
>   	MUTEX_MOD_IDX_MDP_WDMA,
>   	MUTEX_MOD_IDX_MDP_AAL0,
>   	MUTEX_MOD_IDX_MDP_CCORR0,
> +	MUTEX_MOD_IDX_MDP_HDR0,
> +	MUTEX_MOD_IDX_MDP_COLOR0,
>   
>   	MUTEX_MOD_IDX_MAX		/* ALWAYS keep at the end */
>   };
> 



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
  2022-07-05 12:26   ` Allen-KH Cheng
@ 2022-07-07  8:52     ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 30+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-07  8:52 UTC (permalink / raw)
  To: Allen-KH Cheng, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang

Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
> Add mdp3 mutex compatible for mt8186 SoC.
> 
> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
> Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>


Please drop this commit. Adding a mdp3-mutex compatible is not needed here.

> ---
>   .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml         | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
> index 627dcc3e8b32..234fa5dc07c2 100644
> --- a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
> +++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
> @@ -30,6 +30,7 @@ properties:
>         - mediatek,mt8173-disp-mutex
>         - mediatek,mt8183-disp-mutex
>         - mediatek,mt8186-disp-mutex
> +      - mediatek,mt8186-mdp3-mutex
>         - mediatek,mt8192-disp-mutex
>         - mediatek,mt8195-disp-mutex
>   




^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
@ 2022-07-07  8:52     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 30+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-07  8:52 UTC (permalink / raw)
  To: Allen-KH Cheng, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang

Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
> Add mdp3 mutex compatible for mt8186 SoC.
> 
> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
> Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>


Please drop this commit. Adding a mdp3-mutex compatible is not needed here.

> ---
>   .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml         | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
> index 627dcc3e8b32..234fa5dc07c2 100644
> --- a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
> +++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
> @@ -30,6 +30,7 @@ properties:
>         - mediatek,mt8173-disp-mutex
>         - mediatek,mt8183-disp-mutex
>         - mediatek,mt8186-disp-mutex
> +      - mediatek,mt8186-mdp3-mutex
>         - mediatek,mt8192-disp-mutex
>         - mediatek,mt8195-disp-mutex
>   




_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 0/2] Add mt8186 mutex support for mdp3
  2022-07-06 14:17   ` Matthias Brugger
@ 2022-07-07 10:08     ` Matthias Brugger
  -1 siblings, 0 replies; 30+ messages in thread
From: Matthias Brugger @ 2022-07-07 10:08 UTC (permalink / raw)
  To: Allen-KH Cheng, Rob Herring, Krzysztof Kozlowski, Chun-Kuang Hu,
	Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek



On 06/07/2022 16:17, Matthias Brugger wrote:
> 
> 
> On 05/07/2022 14:26, Allen-KH Cheng wrote:
>> This series are based on matthias.bgg/linux.git, for-next and provide
>> mt8186 mutex support for Media Data Path 3 (MDP3).
>>
>> Allen-KH Cheng (2):
>>    dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
>>    soc: mediatek: mutex: add mt8186 mutex mod settings for mdp3
> 
> Whole series applied to v5.19-next/soc
> 

We would need clarification if the HW block for MDP3 mutex is different from the 
one used for the disp mutex. It does not seem so. In this case we can just add a 
node on the corresponding address in the DTS.

Regards,
Matthias

> Thanks
> 
>>
>>   .../bindings/soc/mediatek/mediatek,mutex.yaml |  1 +
>>   drivers/soc/mediatek/mtk-mutex.c              | 23 +++++++++++++++++++
>>   include/linux/soc/mediatek/mtk-mutex.h        |  2 ++
>>   3 files changed, 26 insertions(+)
>>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 0/2] Add mt8186 mutex support for mdp3
@ 2022-07-07 10:08     ` Matthias Brugger
  0 siblings, 0 replies; 30+ messages in thread
From: Matthias Brugger @ 2022-07-07 10:08 UTC (permalink / raw)
  To: Allen-KH Cheng, Rob Herring, Krzysztof Kozlowski, Chun-Kuang Hu,
	Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek



On 06/07/2022 16:17, Matthias Brugger wrote:
> 
> 
> On 05/07/2022 14:26, Allen-KH Cheng wrote:
>> This series are based on matthias.bgg/linux.git, for-next and provide
>> mt8186 mutex support for Media Data Path 3 (MDP3).
>>
>> Allen-KH Cheng (2):
>>    dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
>>    soc: mediatek: mutex: add mt8186 mutex mod settings for mdp3
> 
> Whole series applied to v5.19-next/soc
> 

We would need clarification if the HW block for MDP3 mutex is different from the 
one used for the disp mutex. It does not seem so. In this case we can just add a 
node on the corresponding address in the DTS.

Regards,
Matthias

> Thanks
> 
>>
>>   .../bindings/soc/mediatek/mediatek,mutex.yaml |  1 +
>>   drivers/soc/mediatek/mtk-mutex.c              | 23 +++++++++++++++++++
>>   include/linux/soc/mediatek/mtk-mutex.h        |  2 ++
>>   3 files changed, 26 insertions(+)
>>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
  2022-07-07  8:52     ` AngeloGioacchino Del Regno
@ 2022-07-07 10:41       ` Matthias Brugger
  -1 siblings, 0 replies; 30+ messages in thread
From: Matthias Brugger @ 2022-07-07 10:41 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Allen-KH Cheng, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang



On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
> Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
>> Add mdp3 mutex compatible for mt8186 SoC.
>>
>> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
>> Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
> 
> 
> Please drop this commit. Adding a mdp3-mutex compatible is not needed here.
> 

Thanks for checking. We probably would need a fallback compatible. We can only 
know from the HW engineers that can confirm if the IP block is the same as the 
disp mutex or a different one.

I'll drop both patches for now until things got clear.

Regards,
Matthias

>> ---
>>   .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml         | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git 
>> a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml 
>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>> index 627dcc3e8b32..234fa5dc07c2 100644
>> --- a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>> +++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>> @@ -30,6 +30,7 @@ properties:
>>         - mediatek,mt8173-disp-mutex
>>         - mediatek,mt8183-disp-mutex
>>         - mediatek,mt8186-disp-mutex
>> +      - mediatek,mt8186-mdp3-mutex
>>         - mediatek,mt8192-disp-mutex
>>         - mediatek,mt8195-disp-mutex
> 
> 
> 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
@ 2022-07-07 10:41       ` Matthias Brugger
  0 siblings, 0 replies; 30+ messages in thread
From: Matthias Brugger @ 2022-07-07 10:41 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Allen-KH Cheng, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang



On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
> Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
>> Add mdp3 mutex compatible for mt8186 SoC.
>>
>> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
>> Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
> 
> 
> Please drop this commit. Adding a mdp3-mutex compatible is not needed here.
> 

Thanks for checking. We probably would need a fallback compatible. We can only 
know from the HW engineers that can confirm if the IP block is the same as the 
disp mutex or a different one.

I'll drop both patches for now until things got clear.

Regards,
Matthias

>> ---
>>   .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml         | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git 
>> a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml 
>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>> index 627dcc3e8b32..234fa5dc07c2 100644
>> --- a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>> +++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>> @@ -30,6 +30,7 @@ properties:
>>         - mediatek,mt8173-disp-mutex
>>         - mediatek,mt8183-disp-mutex
>>         - mediatek,mt8186-disp-mutex
>> +      - mediatek,mt8186-mdp3-mutex
>>         - mediatek,mt8192-disp-mutex
>>         - mediatek,mt8195-disp-mutex
> 
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
  2022-07-07 10:41       ` Matthias Brugger
@ 2022-07-07 10:59         ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 30+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-07 10:59 UTC (permalink / raw)
  To: Matthias Brugger, Allen-KH Cheng, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang

Il 07/07/22 12:41, Matthias Brugger ha scritto:
> 
> 
> On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
>> Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
>>> Add mdp3 mutex compatible for mt8186 SoC.
>>>
>>> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
>>> Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
>>
>>
>> Please drop this commit. Adding a mdp3-mutex compatible is not needed here.
>>
> 
> Thanks for checking. We probably would need a fallback compatible. We can only know 
> from the HW engineers that can confirm if the IP block is the same as the disp 
> mutex or a different one.
> 
> I'll drop both patches for now until things got clear.
> 

They're located in a different iospace from each other, but either the platform
data needs to *not be* joined together, or if they're together, I would not like
having two different compatible strings for essentially the same thing.

I would at this point prefer dropping '-disp' from 'mediatek,mt8186-disp-mutex'
so that we would be able to declare two 'mediatek,mt8186-mutex' in devicetree...
...or simply have two mediatek,mt8186-disp-mutex (although logically incorrect?).

Cheers,
Angelo

> Regards,
> Matthias
> 
>>> ---
>>>   .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml         | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml 
>>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>>> index 627dcc3e8b32..234fa5dc07c2 100644
>>> --- a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>>> +++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>>> @@ -30,6 +30,7 @@ properties:
>>>         - mediatek,mt8173-disp-mutex
>>>         - mediatek,mt8183-disp-mutex
>>>         - mediatek,mt8186-disp-mutex
>>> +      - mediatek,mt8186-mdp3-mutex
>>>         - mediatek,mt8192-disp-mutex
>>>         - mediatek,mt8195-disp-mutex
>>
>>
>>


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
@ 2022-07-07 10:59         ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 30+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-07 10:59 UTC (permalink / raw)
  To: Matthias Brugger, Allen-KH Cheng, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang

Il 07/07/22 12:41, Matthias Brugger ha scritto:
> 
> 
> On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
>> Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
>>> Add mdp3 mutex compatible for mt8186 SoC.
>>>
>>> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
>>> Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
>>
>>
>> Please drop this commit. Adding a mdp3-mutex compatible is not needed here.
>>
> 
> Thanks for checking. We probably would need a fallback compatible. We can only know 
> from the HW engineers that can confirm if the IP block is the same as the disp 
> mutex or a different one.
> 
> I'll drop both patches for now until things got clear.
> 

They're located in a different iospace from each other, but either the platform
data needs to *not be* joined together, or if they're together, I would not like
having two different compatible strings for essentially the same thing.

I would at this point prefer dropping '-disp' from 'mediatek,mt8186-disp-mutex'
so that we would be able to declare two 'mediatek,mt8186-mutex' in devicetree...
...or simply have two mediatek,mt8186-disp-mutex (although logically incorrect?).

Cheers,
Angelo

> Regards,
> Matthias
> 
>>> ---
>>>   .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml         | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml 
>>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>>> index 627dcc3e8b32..234fa5dc07c2 100644
>>> --- a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>>> +++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>>> @@ -30,6 +30,7 @@ properties:
>>>         - mediatek,mt8173-disp-mutex
>>>         - mediatek,mt8183-disp-mutex
>>>         - mediatek,mt8186-disp-mutex
>>> +      - mediatek,mt8186-mdp3-mutex
>>>         - mediatek,mt8192-disp-mutex
>>>         - mediatek,mt8195-disp-mutex
>>
>>
>>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
  2022-07-07 10:59         ` AngeloGioacchino Del Regno
@ 2022-07-08  8:14           ` allen-kh.cheng
  -1 siblings, 0 replies; 30+ messages in thread
From: allen-kh.cheng @ 2022-07-08  8:14 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang

Hi Angelo,

On Thu, 2022-07-07 at 12:59 +0200, AngeloGioacchino Del Regno wrote:
> Il 07/07/22 12:41, Matthias Brugger ha scritto:
> > 
> > 
> > On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
> > > Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
> > > > Add mdp3 mutex compatible for mt8186 SoC.
> > > > 
> > > > Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
> > > > Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
> > > 
> > > 
> > > Please drop this commit. Adding a mdp3-mutex compatible is not
> > > needed here.
> > > 
> > 
> > Thanks for checking. We probably would need a fallback compatible.
> > We can only know 
> > from the HW engineers that can confirm if the IP block is the same
> > as the disp 
> > mutex or a different one.
> > 
> > I'll drop both patches for now until things got clear.
> > 
> 
> They're located in a different iospace from each other, but either
> the platform
> data needs to *not be* joined together, or if they're together, I
> would not like
> having two different compatible strings for essentially the same
> thing.
> 
> I would at this point prefer dropping '-disp' from 'mediatek,mt8186-
> disp-mutex'
> so that we would be able to declare two 'mediatek,mt8186-mutex' in
> devicetree...
> ...or simply have two mediatek,mt8186-disp-mutex (although logically
> incorrect?).
> 
> Cheers,
> Angelo
> 

Thanks for your opinion.

They are two different hardwares for different address spaces. 

I think we drop '-disp' from 'mediatek,mt8186-disp-mutex' will be
excessive because we also need to modify mutex node in all exited dts
files.

I prefer havingg two mediatek,mt8186-disp-mutex. 

ex:
mutex: mutex@14001000 {
	compatible = "mediatek,mt8186-disp-mutex";
	..
}

mdp3_mutex0: mutex@1b001000 {
	compatible = "mediatek,mt8186-disp-mutex";
	...
}

What do you think?

Best regards,
Allen

> > Regards,
> > Matthias
> > 
> > > > ---
> > > >  
> > > > .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml       
> > > >   | 1 +
> > > >   1 file changed, 1 insertion(+)
> > > > 
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
> > > > .yaml 
> > > > b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
> > > > .yaml
> > > > index 627dcc3e8b32..234fa5dc07c2 100644
> > > > ---
> > > > a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
> > > > .yaml
> > > > +++
> > > > b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
> > > > .yaml
> > > > @@ -30,6 +30,7 @@ properties:
> > > >         - mediatek,mt8173-disp-mutex
> > > >         - mediatek,mt8183-disp-mutex
> > > >         - mediatek,mt8186-disp-mutex
> > > > +      - mediatek,mt8186-mdp3-mutex
> > > >         - mediatek,mt8192-disp-mutex
> > > >         - mediatek,mt8195-disp-mutex
> > > 
> > > 
> > > 
> 
> 



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
@ 2022-07-08  8:14           ` allen-kh.cheng
  0 siblings, 0 replies; 30+ messages in thread
From: allen-kh.cheng @ 2022-07-08  8:14 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang

Hi Angelo,

On Thu, 2022-07-07 at 12:59 +0200, AngeloGioacchino Del Regno wrote:
> Il 07/07/22 12:41, Matthias Brugger ha scritto:
> > 
> > 
> > On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
> > > Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
> > > > Add mdp3 mutex compatible for mt8186 SoC.
> > > > 
> > > > Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
> > > > Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
> > > 
> > > 
> > > Please drop this commit. Adding a mdp3-mutex compatible is not
> > > needed here.
> > > 
> > 
> > Thanks for checking. We probably would need a fallback compatible.
> > We can only know 
> > from the HW engineers that can confirm if the IP block is the same
> > as the disp 
> > mutex or a different one.
> > 
> > I'll drop both patches for now until things got clear.
> > 
> 
> They're located in a different iospace from each other, but either
> the platform
> data needs to *not be* joined together, or if they're together, I
> would not like
> having two different compatible strings for essentially the same
> thing.
> 
> I would at this point prefer dropping '-disp' from 'mediatek,mt8186-
> disp-mutex'
> so that we would be able to declare two 'mediatek,mt8186-mutex' in
> devicetree...
> ...or simply have two mediatek,mt8186-disp-mutex (although logically
> incorrect?).
> 
> Cheers,
> Angelo
> 

Thanks for your opinion.

They are two different hardwares for different address spaces. 

I think we drop '-disp' from 'mediatek,mt8186-disp-mutex' will be
excessive because we also need to modify mutex node in all exited dts
files.

I prefer havingg two mediatek,mt8186-disp-mutex. 

ex:
mutex: mutex@14001000 {
	compatible = "mediatek,mt8186-disp-mutex";
	..
}

mdp3_mutex0: mutex@1b001000 {
	compatible = "mediatek,mt8186-disp-mutex";
	...
}

What do you think?

Best regards,
Allen

> > Regards,
> > Matthias
> > 
> > > > ---
> > > >  
> > > > .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml       
> > > >   | 1 +
> > > >   1 file changed, 1 insertion(+)
> > > > 
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
> > > > .yaml 
> > > > b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
> > > > .yaml
> > > > index 627dcc3e8b32..234fa5dc07c2 100644
> > > > ---
> > > > a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
> > > > .yaml
> > > > +++
> > > > b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
> > > > .yaml
> > > > @@ -30,6 +30,7 @@ properties:
> > > >         - mediatek,mt8173-disp-mutex
> > > >         - mediatek,mt8183-disp-mutex
> > > >         - mediatek,mt8186-disp-mutex
> > > > +      - mediatek,mt8186-mdp3-mutex
> > > >         - mediatek,mt8192-disp-mutex
> > > >         - mediatek,mt8195-disp-mutex
> > > 
> > > 
> > > 
> 
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
  2022-07-08  8:14           ` allen-kh.cheng
@ 2022-07-08  8:19             ` Matthias Brugger
  -1 siblings, 0 replies; 30+ messages in thread
From: Matthias Brugger @ 2022-07-08  8:19 UTC (permalink / raw)
  To: allen-kh.cheng, AngeloGioacchino Del Regno, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang



On 08/07/2022 10:14, allen-kh.cheng wrote:
> Hi Angelo,
> 
> On Thu, 2022-07-07 at 12:59 +0200, AngeloGioacchino Del Regno wrote:
>> Il 07/07/22 12:41, Matthias Brugger ha scritto:
>>>
>>>
>>> On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
>>>> Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
>>>>> Add mdp3 mutex compatible for mt8186 SoC.
>>>>>
>>>>> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
>>>>> Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
>>>>
>>>>
>>>> Please drop this commit. Adding a mdp3-mutex compatible is not
>>>> needed here.
>>>>
>>>
>>> Thanks for checking. We probably would need a fallback compatible.
>>> We can only know
>>> from the HW engineers that can confirm if the IP block is the same
>>> as the disp
>>> mutex or a different one.
>>>
>>> I'll drop both patches for now until things got clear.
>>>
>>
>> They're located in a different iospace from each other, but either
>> the platform
>> data needs to *not be* joined together, or if they're together, I
>> would not like
>> having two different compatible strings for essentially the same
>> thing.
>>
>> I would at this point prefer dropping '-disp' from 'mediatek,mt8186-
>> disp-mutex'
>> so that we would be able to declare two 'mediatek,mt8186-mutex' in
>> devicetree...
>> ...or simply have two mediatek,mt8186-disp-mutex (although logically
>> incorrect?).
>>
>> Cheers,
>> Angelo
>>
> 
> Thanks for your opinion.
> 
> They are two different hardwares for different address spaces.
> 
> I think we drop '-disp' from 'mediatek,mt8186-disp-mutex' will be
> excessive because we also need to modify mutex node in all exited dts
> files.
> 
> I prefer havingg two mediatek,mt8186-disp-mutex.
> 
> ex:
> mutex: mutex@14001000 {
> 	compatible = "mediatek,mt8186-disp-mutex";
> 	..
> }
> 
> mdp3_mutex0: mutex@1b001000 {
> 	compatible = "mediatek,mt8186-disp-mutex";
> 	...
> }
> 
> What do you think?

I think that's an acceptable solution.

Regards,
Matthias

> 
> Best regards,
> Allen
> 
>>> Regards,
>>> Matthias
>>>
>>>>> ---
>>>>>   
>>>>> .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>>>>>    | 1 +
>>>>>    1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git
>>>>> a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>> .yaml
>>>>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>> .yaml
>>>>> index 627dcc3e8b32..234fa5dc07c2 100644
>>>>> ---
>>>>> a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>> .yaml
>>>>> +++
>>>>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>> .yaml
>>>>> @@ -30,6 +30,7 @@ properties:
>>>>>          - mediatek,mt8173-disp-mutex
>>>>>          - mediatek,mt8183-disp-mutex
>>>>>          - mediatek,mt8186-disp-mutex
>>>>> +      - mediatek,mt8186-mdp3-mutex
>>>>>          - mediatek,mt8192-disp-mutex
>>>>>          - mediatek,mt8195-disp-mutex
>>>>
>>>>
>>>>
>>
>>
> 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
@ 2022-07-08  8:19             ` Matthias Brugger
  0 siblings, 0 replies; 30+ messages in thread
From: Matthias Brugger @ 2022-07-08  8:19 UTC (permalink / raw)
  To: allen-kh.cheng, AngeloGioacchino Del Regno, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang



On 08/07/2022 10:14, allen-kh.cheng wrote:
> Hi Angelo,
> 
> On Thu, 2022-07-07 at 12:59 +0200, AngeloGioacchino Del Regno wrote:
>> Il 07/07/22 12:41, Matthias Brugger ha scritto:
>>>
>>>
>>> On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
>>>> Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
>>>>> Add mdp3 mutex compatible for mt8186 SoC.
>>>>>
>>>>> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
>>>>> Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
>>>>
>>>>
>>>> Please drop this commit. Adding a mdp3-mutex compatible is not
>>>> needed here.
>>>>
>>>
>>> Thanks for checking. We probably would need a fallback compatible.
>>> We can only know
>>> from the HW engineers that can confirm if the IP block is the same
>>> as the disp
>>> mutex or a different one.
>>>
>>> I'll drop both patches for now until things got clear.
>>>
>>
>> They're located in a different iospace from each other, but either
>> the platform
>> data needs to *not be* joined together, or if they're together, I
>> would not like
>> having two different compatible strings for essentially the same
>> thing.
>>
>> I would at this point prefer dropping '-disp' from 'mediatek,mt8186-
>> disp-mutex'
>> so that we would be able to declare two 'mediatek,mt8186-mutex' in
>> devicetree...
>> ...or simply have two mediatek,mt8186-disp-mutex (although logically
>> incorrect?).
>>
>> Cheers,
>> Angelo
>>
> 
> Thanks for your opinion.
> 
> They are two different hardwares for different address spaces.
> 
> I think we drop '-disp' from 'mediatek,mt8186-disp-mutex' will be
> excessive because we also need to modify mutex node in all exited dts
> files.
> 
> I prefer havingg two mediatek,mt8186-disp-mutex.
> 
> ex:
> mutex: mutex@14001000 {
> 	compatible = "mediatek,mt8186-disp-mutex";
> 	..
> }
> 
> mdp3_mutex0: mutex@1b001000 {
> 	compatible = "mediatek,mt8186-disp-mutex";
> 	...
> }
> 
> What do you think?

I think that's an acceptable solution.

Regards,
Matthias

> 
> Best regards,
> Allen
> 
>>> Regards,
>>> Matthias
>>>
>>>>> ---
>>>>>   
>>>>> .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>>>>>    | 1 +
>>>>>    1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git
>>>>> a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>> .yaml
>>>>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>> .yaml
>>>>> index 627dcc3e8b32..234fa5dc07c2 100644
>>>>> ---
>>>>> a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>> .yaml
>>>>> +++
>>>>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>> .yaml
>>>>> @@ -30,6 +30,7 @@ properties:
>>>>>          - mediatek,mt8173-disp-mutex
>>>>>          - mediatek,mt8183-disp-mutex
>>>>>          - mediatek,mt8186-disp-mutex
>>>>> +      - mediatek,mt8186-mdp3-mutex
>>>>>          - mediatek,mt8192-disp-mutex
>>>>>          - mediatek,mt8195-disp-mutex
>>>>
>>>>
>>>>
>>
>>
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
  2022-07-08  8:19             ` Matthias Brugger
@ 2022-07-08  8:28               ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 30+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-08  8:28 UTC (permalink / raw)
  To: Matthias Brugger, allen-kh.cheng, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang

Il 08/07/22 10:19, Matthias Brugger ha scritto:
> 
> 
> On 08/07/2022 10:14, allen-kh.cheng wrote:
>> Hi Angelo,
>>
>> On Thu, 2022-07-07 at 12:59 +0200, AngeloGioacchino Del Regno wrote:
>>> Il 07/07/22 12:41, Matthias Brugger ha scritto:
>>>>
>>>>
>>>> On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
>>>>> Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
>>>>>> Add mdp3 mutex compatible for mt8186 SoC.
>>>>>>
>>>>>> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
>>>>>> Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
>>>>>
>>>>>
>>>>> Please drop this commit. Adding a mdp3-mutex compatible is not
>>>>> needed here.
>>>>>
>>>>
>>>> Thanks for checking. We probably would need a fallback compatible.
>>>> We can only know
>>>> from the HW engineers that can confirm if the IP block is the same
>>>> as the disp
>>>> mutex or a different one.
>>>>
>>>> I'll drop both patches for now until things got clear.
>>>>
>>>
>>> They're located in a different iospace from each other, but either
>>> the platform
>>> data needs to *not be* joined together, or if they're together, I
>>> would not like
>>> having two different compatible strings for essentially the same
>>> thing.
>>>
>>> I would at this point prefer dropping '-disp' from 'mediatek,mt8186-
>>> disp-mutex'
>>> so that we would be able to declare two 'mediatek,mt8186-mutex' in
>>> devicetree...
>>> ...or simply have two mediatek,mt8186-disp-mutex (although logically
>>> incorrect?).
>>>
>>> Cheers,
>>> Angelo
>>>
>>
>> Thanks for your opinion.
>>
>> They are two different hardwares for different address spaces.
>>
>> I think we drop '-disp' from 'mediatek,mt8186-disp-mutex' will be
>> excessive because we also need to modify mutex node in all exited dts
>> files.
>>
>> I prefer havingg two mediatek,mt8186-disp-mutex.
>>
>> ex:
>> mutex: mutex@14001000 {
>>     compatible = "mediatek,mt8186-disp-mutex";
>>     ..
>> }
>>
>> mdp3_mutex0: mutex@1b001000 {
>>     compatible = "mediatek,mt8186-disp-mutex";
>>     ...
>> }
>>
>> What do you think?
> 
> I think that's an acceptable solution.
> 

I'm a bit undecided instead, now... because from what I understand now,
the platform data fields

	.mutex_mod  and  .mutex_sof

are *not valid* for mutex at 0x1b001000 but only for the instance at 0x14001000.

If we go this way, at this point, we would be free (and allowed by the driver)
to try to set these for 0x1b001000, and to try to set MDP3 table paths on
0x14001000, which is something that shouldn't be logically allowed, as the
hardware does *not* support that.

Unless I got that wrong, and these fields for MUTEX_MOD_DISP_xxxx do exist in
the mutex instance at 0xb001000, in which case, I fully agree with Matthias.

But otherwise, I have my doubts.

Cheers,
Angelo

> Regards,
> Matthias
> 
>>
>> Best regards,
>> Allen
>>
>>>> Regards,
>>>> Matthias
>>>>
>>>>>> ---
>>>>>> .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>>>>>>    | 1 +
>>>>>>    1 file changed, 1 insertion(+)
>>>>>>
>>>>>> diff --git
>>>>>> a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>>> .yaml
>>>>>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>>> .yaml
>>>>>> index 627dcc3e8b32..234fa5dc07c2 100644
>>>>>> ---
>>>>>> a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>>> .yaml
>>>>>> +++
>>>>>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>>> .yaml
>>>>>> @@ -30,6 +30,7 @@ properties:
>>>>>>          - mediatek,mt8173-disp-mutex
>>>>>>          - mediatek,mt8183-disp-mutex
>>>>>>          - mediatek,mt8186-disp-mutex
>>>>>> +      - mediatek,mt8186-mdp3-mutex
>>>>>>          - mediatek,mt8192-disp-mutex
>>>>>>          - mediatek,mt8195-disp-mutex
>>>>>
>>>>>
>>>>>
>>>
>>>
>>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
@ 2022-07-08  8:28               ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 30+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-08  8:28 UTC (permalink / raw)
  To: Matthias Brugger, allen-kh.cheng, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang

Il 08/07/22 10:19, Matthias Brugger ha scritto:
> 
> 
> On 08/07/2022 10:14, allen-kh.cheng wrote:
>> Hi Angelo,
>>
>> On Thu, 2022-07-07 at 12:59 +0200, AngeloGioacchino Del Regno wrote:
>>> Il 07/07/22 12:41, Matthias Brugger ha scritto:
>>>>
>>>>
>>>> On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
>>>>> Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
>>>>>> Add mdp3 mutex compatible for mt8186 SoC.
>>>>>>
>>>>>> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
>>>>>> Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
>>>>>
>>>>>
>>>>> Please drop this commit. Adding a mdp3-mutex compatible is not
>>>>> needed here.
>>>>>
>>>>
>>>> Thanks for checking. We probably would need a fallback compatible.
>>>> We can only know
>>>> from the HW engineers that can confirm if the IP block is the same
>>>> as the disp
>>>> mutex or a different one.
>>>>
>>>> I'll drop both patches for now until things got clear.
>>>>
>>>
>>> They're located in a different iospace from each other, but either
>>> the platform
>>> data needs to *not be* joined together, or if they're together, I
>>> would not like
>>> having two different compatible strings for essentially the same
>>> thing.
>>>
>>> I would at this point prefer dropping '-disp' from 'mediatek,mt8186-
>>> disp-mutex'
>>> so that we would be able to declare two 'mediatek,mt8186-mutex' in
>>> devicetree...
>>> ...or simply have two mediatek,mt8186-disp-mutex (although logically
>>> incorrect?).
>>>
>>> Cheers,
>>> Angelo
>>>
>>
>> Thanks for your opinion.
>>
>> They are two different hardwares for different address spaces.
>>
>> I think we drop '-disp' from 'mediatek,mt8186-disp-mutex' will be
>> excessive because we also need to modify mutex node in all exited dts
>> files.
>>
>> I prefer havingg two mediatek,mt8186-disp-mutex.
>>
>> ex:
>> mutex: mutex@14001000 {
>>     compatible = "mediatek,mt8186-disp-mutex";
>>     ..
>> }
>>
>> mdp3_mutex0: mutex@1b001000 {
>>     compatible = "mediatek,mt8186-disp-mutex";
>>     ...
>> }
>>
>> What do you think?
> 
> I think that's an acceptable solution.
> 

I'm a bit undecided instead, now... because from what I understand now,
the platform data fields

	.mutex_mod  and  .mutex_sof

are *not valid* for mutex at 0x1b001000 but only for the instance at 0x14001000.

If we go this way, at this point, we would be free (and allowed by the driver)
to try to set these for 0x1b001000, and to try to set MDP3 table paths on
0x14001000, which is something that shouldn't be logically allowed, as the
hardware does *not* support that.

Unless I got that wrong, and these fields for MUTEX_MOD_DISP_xxxx do exist in
the mutex instance at 0xb001000, in which case, I fully agree with Matthias.

But otherwise, I have my doubts.

Cheers,
Angelo

> Regards,
> Matthias
> 
>>
>> Best regards,
>> Allen
>>
>>>> Regards,
>>>> Matthias
>>>>
>>>>>> ---
>>>>>> .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>>>>>>    | 1 +
>>>>>>    1 file changed, 1 insertion(+)
>>>>>>
>>>>>> diff --git
>>>>>> a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>>> .yaml
>>>>>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>>> .yaml
>>>>>> index 627dcc3e8b32..234fa5dc07c2 100644
>>>>>> ---
>>>>>> a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>>> .yaml
>>>>>> +++
>>>>>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex
>>>>>> .yaml
>>>>>> @@ -30,6 +30,7 @@ properties:
>>>>>>          - mediatek,mt8173-disp-mutex
>>>>>>          - mediatek,mt8183-disp-mutex
>>>>>>          - mediatek,mt8186-disp-mutex
>>>>>> +      - mediatek,mt8186-mdp3-mutex
>>>>>>          - mediatek,mt8192-disp-mutex
>>>>>>          - mediatek,mt8195-disp-mutex
>>>>>
>>>>>
>>>>>
>>>
>>>
>>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
  2022-07-08  8:28               ` AngeloGioacchino Del Regno
@ 2022-07-08 11:58                 ` allen-kh.cheng
  -1 siblings, 0 replies; 30+ messages in thread
From: allen-kh.cheng @ 2022-07-08 11:58 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang

Hi Angelo,

On Fri, 2022-07-08 at 10:28 +0200, AngeloGioacchino Del Regno wrote:
> Il 08/07/22 10:19, Matthias Brugger ha scritto:
> > 
> > 
> > On 08/07/2022 10:14, allen-kh.cheng wrote:
> > > Hi Angelo,
> > > 
> > > On Thu, 2022-07-07 at 12:59 +0200, AngeloGioacchino Del Regno
> > > wrote:
> > > > Il 07/07/22 12:41, Matthias Brugger ha scritto:
> > > > > 
> > > > > 
> > > > > On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
> > > > > > Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
> > > > > > > Add mdp3 mutex compatible for mt8186 SoC.
> > > > > > > 
> > > > > > > Signed-off-by: Allen-KH Cheng <
> > > > > > > allen-kh.cheng@mediatek.com>
> > > > > > > Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
> > > > > > 
> > > > > > 
> > > > > > Please drop this commit. Adding a mdp3-mutex compatible is
> > > > > > not
> > > > > > needed here.
> > > > > > 
> > > > > 
> > > > > Thanks for checking. We probably would need a fallback
> > > > > compatible.
> > > > > We can only know
> > > > > from the HW engineers that can confirm if the IP block is the
> > > > > same
> > > > > as the disp
> > > > > mutex or a different one.
> > > > > 
> > > > > I'll drop both patches for now until things got clear.
> > > > > 
> > > > 
> > > > They're located in a different iospace from each other, but
> > > > either
> > > > the platform
> > > > data needs to *not be* joined together, or if they're together,
> > > > I
> > > > would not like
> > > > having two different compatible strings for essentially the
> > > > same
> > > > thing.
> > > > 
> > > > I would at this point prefer dropping '-disp' from
> > > > 'mediatek,mt8186-
> > > > disp-mutex'
> > > > so that we would be able to declare two 'mediatek,mt8186-mutex' 
> > > > in
> > > > devicetree...
> > > > ...or simply have two mediatek,mt8186-disp-mutex (although
> > > > logically
> > > > incorrect?).
> > > > 
> > > > Cheers,
> > > > Angelo
> > > > 
> > > 
> > > Thanks for your opinion.
> > > 
> > > They are two different hardwares for different address spaces.
> > > 
> > > I think we drop '-disp' from 'mediatek,mt8186-disp-mutex' will be
> > > excessive because we also need to modify mutex node in all exited
> > > dts
> > > files.
> > > 
> > > I prefer havingg two mediatek,mt8186-disp-mutex.
> > > 
> > > ex:
> > > mutex: mutex@14001000 {
> > >     compatible = "mediatek,mt8186-disp-mutex";
> > >     ..
> > > }
> > > 
> > > mdp3_mutex0: mutex@1b001000 {
> > >     compatible = "mediatek,mt8186-disp-mutex";
> > >     ...
> > > }
> > > 
> > > What do you think?
> > 
> > I think that's an acceptable solution.
> > 
> 
> I'm a bit undecided instead, now... because from what I understand
> now,
> the platform data fields
> 
> 	.mutex_mod  and  .mutex_sof
> 
> are *not valid* for mutex at 0x1b001000 but only for the instance at
> 0x14001000.
> 
> If we go this way, at this point, we would be free (and allowed by
> the driver)
> to try to set these for 0x1b001000, and to try to set MDP3 table
> paths on
> 0x14001000, which is something that shouldn't be logically allowed,
> as the
> hardware does *not* support that.
> 
> Unless I got that wrong, and these fields for MUTEX_MOD_DISP_xxxx do
> exist in
> the mutex instance at 0xb001000, in which case, I fully agree with
> Matthias.
> 
> But otherwise, I have my doubts.
> 
> Cheers,
> Angelo
> 

I got your point. 

The disp and mdp3 drivers work with the same data field beacase 
14001000 (disp mutex) would not use .mutex_table_mod and 1b001000 (mdp3
mutex) would not use .mutex_mod/.mutex_sof.


How about ...

static const struct mtk_mutex_data mt8186_mutex_driver_data = {
	.mutex_mod = mt8186_mutex_mod,
	.mutex_sof = mt8186_mutex_sof,
	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
};

static const struct mtk_mutex_data mt8186_mutex_mdp_driver_data = {
	.mutex_table_mod = mt8186_mutex_table_mod,
};

{ .compatible = "mediatek,mt8186-disp-mutex",
.data = &mt8186_mutex_driver_data},
{ .compatible = "mediatek,mt8186-mdp3-mutex",
.data = &mt8186_mutex_mdp_driver_data},


 mutex: mutex@14001000 {
    compatible = "mediatek,mt8186-disp-mutex";
    ..
 }
 mdp3_mutex0: mutex@1b001000 {
    compatible = "mediatek,mt8186-mdp3-mutex";
    ...
 }

Do you think that is feasible?

Best Regards,
Allen

> > Regards,
> > Matthias
> > 
> > > 
> > > Best regards,
> > > Allen
> > > 
> > > > > Regards,
> > > > > Matthias
> > > > > 
> > > > > > > ---
> > > > > > > .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
> > > > > > >    | 1 +
> > > > > > >    1 file changed, 1 insertion(+)
> > > > > > > 
> > > > > > > diff --git
> > > > > > > a/Documentation/devicetree/bindings/soc/mediatek/mediatek
> > > > > > > ,mutex
> > > > > > > .yaml
> > > > > > > b/Documentation/devicetree/bindings/soc/mediatek/mediatek
> > > > > > > ,mutex
> > > > > > > .yaml
> > > > > > > index 627dcc3e8b32..234fa5dc07c2 100644
> > > > > > > ---
> > > > > > > a/Documentation/devicetree/bindings/soc/mediatek/mediatek
> > > > > > > ,mutex
> > > > > > > .yaml
> > > > > > > +++
> > > > > > > b/Documentation/devicetree/bindings/soc/mediatek/mediatek
> > > > > > > ,mutex
> > > > > > > .yaml
> > > > > > > @@ -30,6 +30,7 @@ properties:
> > > > > > >          - mediatek,mt8173-disp-mutex
> > > > > > >          - mediatek,mt8183-disp-mutex
> > > > > > >          - mediatek,mt8186-disp-mutex
> > > > > > > +      - mediatek,mt8186-mdp3-mutex
> > > > > > >          - mediatek,mt8192-disp-mutex
> > > > > > >          - mediatek,mt8195-disp-mutex
> > > > > > 
> > > > > > 
> > > > > > 
> > > > 
> > > > 



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
@ 2022-07-08 11:58                 ` allen-kh.cheng
  0 siblings, 0 replies; 30+ messages in thread
From: allen-kh.cheng @ 2022-07-08 11:58 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang

Hi Angelo,

On Fri, 2022-07-08 at 10:28 +0200, AngeloGioacchino Del Regno wrote:
> Il 08/07/22 10:19, Matthias Brugger ha scritto:
> > 
> > 
> > On 08/07/2022 10:14, allen-kh.cheng wrote:
> > > Hi Angelo,
> > > 
> > > On Thu, 2022-07-07 at 12:59 +0200, AngeloGioacchino Del Regno
> > > wrote:
> > > > Il 07/07/22 12:41, Matthias Brugger ha scritto:
> > > > > 
> > > > > 
> > > > > On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
> > > > > > Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
> > > > > > > Add mdp3 mutex compatible for mt8186 SoC.
> > > > > > > 
> > > > > > > Signed-off-by: Allen-KH Cheng <
> > > > > > > allen-kh.cheng@mediatek.com>
> > > > > > > Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
> > > > > > 
> > > > > > 
> > > > > > Please drop this commit. Adding a mdp3-mutex compatible is
> > > > > > not
> > > > > > needed here.
> > > > > > 
> > > > > 
> > > > > Thanks for checking. We probably would need a fallback
> > > > > compatible.
> > > > > We can only know
> > > > > from the HW engineers that can confirm if the IP block is the
> > > > > same
> > > > > as the disp
> > > > > mutex or a different one.
> > > > > 
> > > > > I'll drop both patches for now until things got clear.
> > > > > 
> > > > 
> > > > They're located in a different iospace from each other, but
> > > > either
> > > > the platform
> > > > data needs to *not be* joined together, or if they're together,
> > > > I
> > > > would not like
> > > > having two different compatible strings for essentially the
> > > > same
> > > > thing.
> > > > 
> > > > I would at this point prefer dropping '-disp' from
> > > > 'mediatek,mt8186-
> > > > disp-mutex'
> > > > so that we would be able to declare two 'mediatek,mt8186-mutex' 
> > > > in
> > > > devicetree...
> > > > ...or simply have two mediatek,mt8186-disp-mutex (although
> > > > logically
> > > > incorrect?).
> > > > 
> > > > Cheers,
> > > > Angelo
> > > > 
> > > 
> > > Thanks for your opinion.
> > > 
> > > They are two different hardwares for different address spaces.
> > > 
> > > I think we drop '-disp' from 'mediatek,mt8186-disp-mutex' will be
> > > excessive because we also need to modify mutex node in all exited
> > > dts
> > > files.
> > > 
> > > I prefer havingg two mediatek,mt8186-disp-mutex.
> > > 
> > > ex:
> > > mutex: mutex@14001000 {
> > >     compatible = "mediatek,mt8186-disp-mutex";
> > >     ..
> > > }
> > > 
> > > mdp3_mutex0: mutex@1b001000 {
> > >     compatible = "mediatek,mt8186-disp-mutex";
> > >     ...
> > > }
> > > 
> > > What do you think?
> > 
> > I think that's an acceptable solution.
> > 
> 
> I'm a bit undecided instead, now... because from what I understand
> now,
> the platform data fields
> 
> 	.mutex_mod  and  .mutex_sof
> 
> are *not valid* for mutex at 0x1b001000 but only for the instance at
> 0x14001000.
> 
> If we go this way, at this point, we would be free (and allowed by
> the driver)
> to try to set these for 0x1b001000, and to try to set MDP3 table
> paths on
> 0x14001000, which is something that shouldn't be logically allowed,
> as the
> hardware does *not* support that.
> 
> Unless I got that wrong, and these fields for MUTEX_MOD_DISP_xxxx do
> exist in
> the mutex instance at 0xb001000, in which case, I fully agree with
> Matthias.
> 
> But otherwise, I have my doubts.
> 
> Cheers,
> Angelo
> 

I got your point. 

The disp and mdp3 drivers work with the same data field beacase 
14001000 (disp mutex) would not use .mutex_table_mod and 1b001000 (mdp3
mutex) would not use .mutex_mod/.mutex_sof.


How about ...

static const struct mtk_mutex_data mt8186_mutex_driver_data = {
	.mutex_mod = mt8186_mutex_mod,
	.mutex_sof = mt8186_mutex_sof,
	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
};

static const struct mtk_mutex_data mt8186_mutex_mdp_driver_data = {
	.mutex_table_mod = mt8186_mutex_table_mod,
};

{ .compatible = "mediatek,mt8186-disp-mutex",
.data = &mt8186_mutex_driver_data},
{ .compatible = "mediatek,mt8186-mdp3-mutex",
.data = &mt8186_mutex_mdp_driver_data},


 mutex: mutex@14001000 {
    compatible = "mediatek,mt8186-disp-mutex";
    ..
 }
 mdp3_mutex0: mutex@1b001000 {
    compatible = "mediatek,mt8186-mdp3-mutex";
    ...
 }

Do you think that is feasible?

Best Regards,
Allen

> > Regards,
> > Matthias
> > 
> > > 
> > > Best regards,
> > > Allen
> > > 
> > > > > Regards,
> > > > > Matthias
> > > > > 
> > > > > > > ---
> > > > > > > .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
> > > > > > >    | 1 +
> > > > > > >    1 file changed, 1 insertion(+)
> > > > > > > 
> > > > > > > diff --git
> > > > > > > a/Documentation/devicetree/bindings/soc/mediatek/mediatek
> > > > > > > ,mutex
> > > > > > > .yaml
> > > > > > > b/Documentation/devicetree/bindings/soc/mediatek/mediatek
> > > > > > > ,mutex
> > > > > > > .yaml
> > > > > > > index 627dcc3e8b32..234fa5dc07c2 100644
> > > > > > > ---
> > > > > > > a/Documentation/devicetree/bindings/soc/mediatek/mediatek
> > > > > > > ,mutex
> > > > > > > .yaml
> > > > > > > +++
> > > > > > > b/Documentation/devicetree/bindings/soc/mediatek/mediatek
> > > > > > > ,mutex
> > > > > > > .yaml
> > > > > > > @@ -30,6 +30,7 @@ properties:
> > > > > > >          - mediatek,mt8173-disp-mutex
> > > > > > >          - mediatek,mt8183-disp-mutex
> > > > > > >          - mediatek,mt8186-disp-mutex
> > > > > > > +      - mediatek,mt8186-mdp3-mutex
> > > > > > >          - mediatek,mt8192-disp-mutex
> > > > > > >          - mediatek,mt8195-disp-mutex
> > > > > > 
> > > > > > 
> > > > > > 
> > > > 
> > > > 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
  2022-07-08 11:58                 ` allen-kh.cheng
@ 2022-07-08 15:37                   ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 30+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-08 15:37 UTC (permalink / raw)
  To: allen-kh.cheng, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang

Il 08/07/22 13:58, allen-kh.cheng ha scritto:
> Hi Angelo,
> 
> On Fri, 2022-07-08 at 10:28 +0200, AngeloGioacchino Del Regno wrote:
>> Il 08/07/22 10:19, Matthias Brugger ha scritto:
>>>
>>>
>>> On 08/07/2022 10:14, allen-kh.cheng wrote:
>>>> Hi Angelo,
>>>>
>>>> On Thu, 2022-07-07 at 12:59 +0200, AngeloGioacchino Del Regno
>>>> wrote:
>>>>> Il 07/07/22 12:41, Matthias Brugger ha scritto:
>>>>>>
>>>>>>
>>>>>> On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
>>>>>>> Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
>>>>>>>> Add mdp3 mutex compatible for mt8186 SoC.
>>>>>>>>
>>>>>>>> Signed-off-by: Allen-KH Cheng <
>>>>>>>> allen-kh.cheng@mediatek.com>
>>>>>>>> Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
>>>>>>>
>>>>>>>
>>>>>>> Please drop this commit. Adding a mdp3-mutex compatible is
>>>>>>> not
>>>>>>> needed here.
>>>>>>>
>>>>>>
>>>>>> Thanks for checking. We probably would need a fallback
>>>>>> compatible.
>>>>>> We can only know
>>>>>> from the HW engineers that can confirm if the IP block is the
>>>>>> same
>>>>>> as the disp
>>>>>> mutex or a different one.
>>>>>>
>>>>>> I'll drop both patches for now until things got clear.
>>>>>>
>>>>>
>>>>> They're located in a different iospace from each other, but
>>>>> either
>>>>> the platform
>>>>> data needs to *not be* joined together, or if they're together,
>>>>> I
>>>>> would not like
>>>>> having two different compatible strings for essentially the
>>>>> same
>>>>> thing.
>>>>>
>>>>> I would at this point prefer dropping '-disp' from
>>>>> 'mediatek,mt8186-
>>>>> disp-mutex'
>>>>> so that we would be able to declare two 'mediatek,mt8186-mutex'
>>>>> in
>>>>> devicetree...
>>>>> ...or simply have two mediatek,mt8186-disp-mutex (although
>>>>> logically
>>>>> incorrect?).
>>>>>
>>>>> Cheers,
>>>>> Angelo
>>>>>
>>>>
>>>> Thanks for your opinion.
>>>>
>>>> They are two different hardwares for different address spaces.
>>>>
>>>> I think we drop '-disp' from 'mediatek,mt8186-disp-mutex' will be
>>>> excessive because we also need to modify mutex node in all exited
>>>> dts
>>>> files.
>>>>
>>>> I prefer havingg two mediatek,mt8186-disp-mutex.
>>>>
>>>> ex:
>>>> mutex: mutex@14001000 {
>>>>      compatible = "mediatek,mt8186-disp-mutex";
>>>>      ..
>>>> }
>>>>
>>>> mdp3_mutex0: mutex@1b001000 {
>>>>      compatible = "mediatek,mt8186-disp-mutex";
>>>>      ...
>>>> }
>>>>
>>>> What do you think?
>>>
>>> I think that's an acceptable solution.
>>>
>>
>> I'm a bit undecided instead, now... because from what I understand
>> now,
>> the platform data fields
>>
>> 	.mutex_mod  and  .mutex_sof
>>
>> are *not valid* for mutex at 0x1b001000 but only for the instance at
>> 0x14001000.
>>
>> If we go this way, at this point, we would be free (and allowed by
>> the driver)
>> to try to set these for 0x1b001000, and to try to set MDP3 table
>> paths on
>> 0x14001000, which is something that shouldn't be logically allowed,
>> as the
>> hardware does *not* support that.
>>
>> Unless I got that wrong, and these fields for MUTEX_MOD_DISP_xxxx do
>> exist in
>> the mutex instance at 0xb001000, in which case, I fully agree with
>> Matthias.
>>
>> But otherwise, I have my doubts.
>>
>> Cheers,
>> Angelo
>>
> 
> I got your point.
> 
> The disp and mdp3 drivers work with the same data field beacase
> 14001000 (disp mutex) would not use .mutex_table_mod and 1b001000 (mdp3
> mutex) would not use .mutex_mod/.mutex_sof.
> 
> 
> How about ...
> 
> static const struct mtk_mutex_data mt8186_mutex_driver_data = {
> 	.mutex_mod = mt8186_mutex_mod,
> 	.mutex_sof = mt8186_mutex_sof,
> 	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
> 	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
> };
> 
> static const struct mtk_mutex_data mt8186_mutex_mdp_driver_data = {
> 	.mutex_table_mod = mt8186_mutex_table_mod,
> };
> 
> { .compatible = "mediatek,mt8186-disp-mutex",
> .data = &mt8186_mutex_driver_data},
> { .compatible = "mediatek,mt8186-mdp3-mutex",
> .data = &mt8186_mutex_mdp_driver_data},
> 
> 
>   mutex: mutex@14001000 {
>      compatible = "mediatek,mt8186-disp-mutex";
>      ..
>   }
>   mdp3_mutex0: mutex@1b001000 {
>      compatible = "mediatek,mt8186-mdp3-mutex";
>      ...
>   }
> 
> Do you think that is feasible?
> 

This makes a lot more sense to me.

Though, you have to also add the mod and sof regs, because the mutex instance
for MDP_MUTEX does have these registers, even though they are used for different
mods/sofs.

static const struct mtk_mutex_data mt8186_mutex_driver_data = {
	.mutex_mod = mt8186_mutex_mod,
	.mutex_sof = mt8186_mutex_sof,
	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
};

static const struct mtk_mutex_data mt8186_mdp_mutex_driver_data = {
  	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
  	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
	.mutex_table_mod = mt8186_mdp_mutex_table_mod,
};

P.S.: Notice that mt8186_mdp_mutex_driver_data instead of
       mt8186_mutex_mdp_driver_data was chosen on purpose:
       like that, we're referencing to real block names.

Regards,
Angelo

> Best Regards,
> Allen
> 
>>> Regards,
>>> Matthias
>>>
>>>>
>>>> Best regards,
>>>> Allen
>>>>
>>>>>> Regards,
>>>>>> Matthias
>>>>>>
>>>>>>>> ---
>>>>>>>> .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>>>>>>>>     | 1 +
>>>>>>>>     1 file changed, 1 insertion(+)
>>>>>>>>
>>>>>>>> diff --git
>>>>>>>> a/Documentation/devicetree/bindings/soc/mediatek/mediatek
>>>>>>>> ,mutex
>>>>>>>> .yaml
>>>>>>>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek
>>>>>>>> ,mutex
>>>>>>>> .yaml
>>>>>>>> index 627dcc3e8b32..234fa5dc07c2 100644
>>>>>>>> ---
>>>>>>>> a/Documentation/devicetree/bindings/soc/mediatek/mediatek
>>>>>>>> ,mutex
>>>>>>>> .yaml
>>>>>>>> +++
>>>>>>>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek
>>>>>>>> ,mutex
>>>>>>>> .yaml
>>>>>>>> @@ -30,6 +30,7 @@ properties:
>>>>>>>>           - mediatek,mt8173-disp-mutex
>>>>>>>>           - mediatek,mt8183-disp-mutex
>>>>>>>>           - mediatek,mt8186-disp-mutex
>>>>>>>> +      - mediatek,mt8186-mdp3-mutex
>>>>>>>>           - mediatek,mt8192-disp-mutex
>>>>>>>>           - mediatek,mt8195-disp-mutex
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
> 




^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
@ 2022-07-08 15:37                   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 30+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-08 15:37 UTC (permalink / raw)
  To: allen-kh.cheng, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek, Xiandong Wang

Il 08/07/22 13:58, allen-kh.cheng ha scritto:
> Hi Angelo,
> 
> On Fri, 2022-07-08 at 10:28 +0200, AngeloGioacchino Del Regno wrote:
>> Il 08/07/22 10:19, Matthias Brugger ha scritto:
>>>
>>>
>>> On 08/07/2022 10:14, allen-kh.cheng wrote:
>>>> Hi Angelo,
>>>>
>>>> On Thu, 2022-07-07 at 12:59 +0200, AngeloGioacchino Del Regno
>>>> wrote:
>>>>> Il 07/07/22 12:41, Matthias Brugger ha scritto:
>>>>>>
>>>>>>
>>>>>> On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
>>>>>>> Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
>>>>>>>> Add mdp3 mutex compatible for mt8186 SoC.
>>>>>>>>
>>>>>>>> Signed-off-by: Allen-KH Cheng <
>>>>>>>> allen-kh.cheng@mediatek.com>
>>>>>>>> Signed-off-by: Xiandong Wang <xiandong.wang@mediatek.com>
>>>>>>>
>>>>>>>
>>>>>>> Please drop this commit. Adding a mdp3-mutex compatible is
>>>>>>> not
>>>>>>> needed here.
>>>>>>>
>>>>>>
>>>>>> Thanks for checking. We probably would need a fallback
>>>>>> compatible.
>>>>>> We can only know
>>>>>> from the HW engineers that can confirm if the IP block is the
>>>>>> same
>>>>>> as the disp
>>>>>> mutex or a different one.
>>>>>>
>>>>>> I'll drop both patches for now until things got clear.
>>>>>>
>>>>>
>>>>> They're located in a different iospace from each other, but
>>>>> either
>>>>> the platform
>>>>> data needs to *not be* joined together, or if they're together,
>>>>> I
>>>>> would not like
>>>>> having two different compatible strings for essentially the
>>>>> same
>>>>> thing.
>>>>>
>>>>> I would at this point prefer dropping '-disp' from
>>>>> 'mediatek,mt8186-
>>>>> disp-mutex'
>>>>> so that we would be able to declare two 'mediatek,mt8186-mutex'
>>>>> in
>>>>> devicetree...
>>>>> ...or simply have two mediatek,mt8186-disp-mutex (although
>>>>> logically
>>>>> incorrect?).
>>>>>
>>>>> Cheers,
>>>>> Angelo
>>>>>
>>>>
>>>> Thanks for your opinion.
>>>>
>>>> They are two different hardwares for different address spaces.
>>>>
>>>> I think we drop '-disp' from 'mediatek,mt8186-disp-mutex' will be
>>>> excessive because we also need to modify mutex node in all exited
>>>> dts
>>>> files.
>>>>
>>>> I prefer havingg two mediatek,mt8186-disp-mutex.
>>>>
>>>> ex:
>>>> mutex: mutex@14001000 {
>>>>      compatible = "mediatek,mt8186-disp-mutex";
>>>>      ..
>>>> }
>>>>
>>>> mdp3_mutex0: mutex@1b001000 {
>>>>      compatible = "mediatek,mt8186-disp-mutex";
>>>>      ...
>>>> }
>>>>
>>>> What do you think?
>>>
>>> I think that's an acceptable solution.
>>>
>>
>> I'm a bit undecided instead, now... because from what I understand
>> now,
>> the platform data fields
>>
>> 	.mutex_mod  and  .mutex_sof
>>
>> are *not valid* for mutex at 0x1b001000 but only for the instance at
>> 0x14001000.
>>
>> If we go this way, at this point, we would be free (and allowed by
>> the driver)
>> to try to set these for 0x1b001000, and to try to set MDP3 table
>> paths on
>> 0x14001000, which is something that shouldn't be logically allowed,
>> as the
>> hardware does *not* support that.
>>
>> Unless I got that wrong, and these fields for MUTEX_MOD_DISP_xxxx do
>> exist in
>> the mutex instance at 0xb001000, in which case, I fully agree with
>> Matthias.
>>
>> But otherwise, I have my doubts.
>>
>> Cheers,
>> Angelo
>>
> 
> I got your point.
> 
> The disp and mdp3 drivers work with the same data field beacase
> 14001000 (disp mutex) would not use .mutex_table_mod and 1b001000 (mdp3
> mutex) would not use .mutex_mod/.mutex_sof.
> 
> 
> How about ...
> 
> static const struct mtk_mutex_data mt8186_mutex_driver_data = {
> 	.mutex_mod = mt8186_mutex_mod,
> 	.mutex_sof = mt8186_mutex_sof,
> 	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
> 	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
> };
> 
> static const struct mtk_mutex_data mt8186_mutex_mdp_driver_data = {
> 	.mutex_table_mod = mt8186_mutex_table_mod,
> };
> 
> { .compatible = "mediatek,mt8186-disp-mutex",
> .data = &mt8186_mutex_driver_data},
> { .compatible = "mediatek,mt8186-mdp3-mutex",
> .data = &mt8186_mutex_mdp_driver_data},
> 
> 
>   mutex: mutex@14001000 {
>      compatible = "mediatek,mt8186-disp-mutex";
>      ..
>   }
>   mdp3_mutex0: mutex@1b001000 {
>      compatible = "mediatek,mt8186-mdp3-mutex";
>      ...
>   }
> 
> Do you think that is feasible?
> 

This makes a lot more sense to me.

Though, you have to also add the mod and sof regs, because the mutex instance
for MDP_MUTEX does have these registers, even though they are used for different
mods/sofs.

static const struct mtk_mutex_data mt8186_mutex_driver_data = {
	.mutex_mod = mt8186_mutex_mod,
	.mutex_sof = mt8186_mutex_sof,
	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
};

static const struct mtk_mutex_data mt8186_mdp_mutex_driver_data = {
  	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
  	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
	.mutex_table_mod = mt8186_mdp_mutex_table_mod,
};

P.S.: Notice that mt8186_mdp_mutex_driver_data instead of
       mt8186_mutex_mdp_driver_data was chosen on purpose:
       like that, we're referencing to real block names.

Regards,
Angelo

> Best Regards,
> Allen
> 
>>> Regards,
>>> Matthias
>>>
>>>>
>>>> Best regards,
>>>> Allen
>>>>
>>>>>> Regards,
>>>>>> Matthias
>>>>>>
>>>>>>>> ---
>>>>>>>> .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
>>>>>>>>     | 1 +
>>>>>>>>     1 file changed, 1 insertion(+)
>>>>>>>>
>>>>>>>> diff --git
>>>>>>>> a/Documentation/devicetree/bindings/soc/mediatek/mediatek
>>>>>>>> ,mutex
>>>>>>>> .yaml
>>>>>>>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek
>>>>>>>> ,mutex
>>>>>>>> .yaml
>>>>>>>> index 627dcc3e8b32..234fa5dc07c2 100644
>>>>>>>> ---
>>>>>>>> a/Documentation/devicetree/bindings/soc/mediatek/mediatek
>>>>>>>> ,mutex
>>>>>>>> .yaml
>>>>>>>> +++
>>>>>>>> b/Documentation/devicetree/bindings/soc/mediatek/mediatek
>>>>>>>> ,mutex
>>>>>>>> .yaml
>>>>>>>> @@ -30,6 +30,7 @@ properties:
>>>>>>>>           - mediatek,mt8173-disp-mutex
>>>>>>>>           - mediatek,mt8183-disp-mutex
>>>>>>>>           - mediatek,mt8186-disp-mutex
>>>>>>>> +      - mediatek,mt8186-mdp3-mutex
>>>>>>>>           - mediatek,mt8192-disp-mutex
>>>>>>>>           - mediatek,mt8195-disp-mutex
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
> 




_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
  2022-07-08 15:37                   ` AngeloGioacchino Del Regno
@ 2022-07-11 11:28                     ` allen-kh.cheng
  -1 siblings, 0 replies; 30+ messages in thread
From: allen-kh.cheng @ 2022-07-11 11:28 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek,
	Xiandong Wang (王先冬)

Hi Angelo,

On Fri, 2022-07-08 at 07:37 -0800, AngeloGioacchino Del Regno wrote:
> Il 08/07/22 13:58, allen-kh.cheng ha scritto:
> > Hi Angelo,
> > 
> > On Fri, 2022-07-08 at 10:28 +0200, AngeloGioacchino Del Regno
> > wrote:
> > > Il 08/07/22 10:19, Matthias Brugger ha scritto:
> > > > 
> > > > 
> > > > On 08/07/2022 10:14, allen-kh.cheng wrote:
> > > > > Hi Angelo,
> > > > > 
> > > > > On Thu, 2022-07-07 at 12:59 +0200, AngeloGioacchino Del Regno
> > > > > wrote:
> > > > > > Il 07/07/22 12:41, Matthias Brugger ha scritto:
> > > > > > > 
> > > > > > > 
> > > > > > > On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
> > > > > > > > Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
> > > > > > > > > Add mdp3 mutex compatible for mt8186 SoC.
> > > > > > > > > 
> > > > > > > > > Signed-off-by: Allen-KH Cheng <
> > > > > > > > > allen-kh.cheng@mediatek.com>
> > > > > > > > > Signed-off-by: Xiandong Wang <
> > > > > > > > > xiandong.wang@mediatek.com>
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Please drop this commit. Adding a mdp3-mutex compatible
> > > > > > > > is
> > > > > > > > not
> > > > > > > > needed here.
> > > > > > > > 
> > > > > > > 
> > > > > > > Thanks for checking. We probably would need a fallback
> > > > > > > compatible.
> > > > > > > We can only know
> > > > > > > from the HW engineers that can confirm if the IP block is
> > > > > > > the
> > > > > > > same
> > > > > > > as the disp
> > > > > > > mutex or a different one.
> > > > > > > 
> > > > > > > I'll drop both patches for now until things got clear.
> > > > > > > 
> > > > > > 
> > > > > > They're located in a different iospace from each other, but
> > > > > > either
> > > > > > the platform
> > > > > > data needs to *not be* joined together, or if they're
> > > > > > together,
> > > > > > I
> > > > > > would not like
> > > > > > having two different compatible strings for essentially the
> > > > > > same
> > > > > > thing.
> > > > > > 
> > > > > > I would at this point prefer dropping '-disp' from
> > > > > > 'mediatek,mt8186-
> > > > > > disp-mutex'
> > > > > > so that we would be able to declare two 'mediatek,mt8186-
> > > > > > mutex'
> > > > > > in
> > > > > > devicetree...
> > > > > > ...or simply have two mediatek,mt8186-disp-mutex (although
> > > > > > logically
> > > > > > incorrect?).
> > > > > > 
> > > > > > Cheers,
> > > > > > Angelo
> > > > > > 
> > > > > 
> > > > > Thanks for your opinion.
> > > > > 
> > > > > They are two different hardwares for different address
> > > > > spaces.
> > > > > 
> > > > > I think we drop '-disp' from 'mediatek,mt8186-disp-mutex'
> > > > > will be
> > > > > excessive because we also need to modify mutex node in all
> > > > > exited
> > > > > dts
> > > > > files.
> > > > > 
> > > > > I prefer havingg two mediatek,mt8186-disp-mutex.
> > > > > 
> > > > > ex:
> > > > > mutex: mutex@14001000 {
> > > > >      compatible = "mediatek,mt8186-disp-mutex";
> > > > >      ..
> > > > > }
> > > > > 
> > > > > mdp3_mutex0: mutex@1b001000 {
> > > > >      compatible = "mediatek,mt8186-disp-mutex";
> > > > >      ...
> > > > > }
> > > > > 
> > > > > What do you think?
> > > > 
> > > > I think that's an acceptable solution.
> > > > 
> > > 
> > > I'm a bit undecided instead, now... because from what I
> > > understand
> > > now,
> > > the platform data fields
> > > 
> > > 	.mutex_mod  and  .mutex_sof
> > > 
> > > are *not valid* for mutex at 0x1b001000 but only for the instance
> > > at
> > > 0x14001000.
> > > 
> > > If we go this way, at this point, we would be free (and allowed
> > > by
> > > the driver)
> > > to try to set these for 0x1b001000, and to try to set MDP3 table
> > > paths on
> > > 0x14001000, which is something that shouldn't be logically
> > > allowed,
> > > as the
> > > hardware does *not* support that.
> > > 
> > > Unless I got that wrong, and these fields for MUTEX_MOD_DISP_xxxx
> > > do
> > > exist in
> > > the mutex instance at 0xb001000, in which case, I fully agree
> > > with
> > > Matthias.
> > > 
> > > But otherwise, I have my doubts.
> > > 
> > > Cheers,
> > > Angelo
> > > 
> > 
> > I got your point.
> > 
> > The disp and mdp3 drivers work with the same data field beacase
> > 14001000 (disp mutex) would not use .mutex_table_mod and 1b001000
> > (mdp3
> > mutex) would not use .mutex_mod/.mutex_sof.
> > 
> > 
> > How about ...
> > 
> > static const struct mtk_mutex_data mt8186_mutex_driver_data = {
> > 	.mutex_mod = mt8186_mutex_mod,
> > 	.mutex_sof = mt8186_mutex_sof,
> > 	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
> > 	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
> > };
> > 
> > static const struct mtk_mutex_data mt8186_mutex_mdp_driver_data = {
> > 	.mutex_table_mod = mt8186_mutex_table_mod,
> > };
> > 
> > { .compatible = "mediatek,mt8186-disp-mutex",
> > .data = &mt8186_mutex_driver_data},
> > { .compatible = "mediatek,mt8186-mdp3-mutex",
> > .data = &mt8186_mutex_mdp_driver_data},
> > 
> > 
> >   mutex: mutex@14001000 {
> >      compatible = "mediatek,mt8186-disp-mutex";
> >      ..
> >   }
> >   mdp3_mutex0: mutex@1b001000 {
> >      compatible = "mediatek,mt8186-mdp3-mutex";
> >      ...
> >   }
> > 
> > Do you think that is feasible?
> > 
> 
> This makes a lot more sense to me.
> 
> Though, you have to also add the mod and sof regs, because the mutex
> instance
> for MDP_MUTEX does have these registers, even though they are used
> for different
> mods/sofs.
> 
> static const struct mtk_mutex_data mt8186_mutex_driver_data = {
> 	.mutex_mod = mt8186_mutex_mod,
> 	.mutex_sof = mt8186_mutex_sof,
> 	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
> 	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
> };
> 
> static const struct mtk_mutex_data mt8186_mdp_mutex_driver_data = {
>   	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
>   	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
> 	.mutex_table_mod = mt8186_mdp_mutex_table_mod,
> };
> 
> P.S.: Notice that mt8186_mdp_mutex_driver_data instead of
>        mt8186_mutex_mdp_driver_data was chosen on purpose:
>        like that, we're referencing to real block names.
> 
> Regards,
> Angelo
> 

Thanks for your suggestion.

According to our discussion, I will update in next version.

Best Regards,
Allen


> > Best Regards,
> > Allen
> > 
> > > > Regards,
> > > > Matthias
> > > > 
> > > > > 
> > > > > Best regards,
> > > > > Allen
> > > > > 
> > > > > > > Regards,
> > > > > > > Matthias
> > > > > > > 
> > > > > > > > > ---
> > > > > > > > > .../devicetree/bindings/soc/mediatek/mediatek,mutex.y
> > > > > > > > > aml
> > > > > > > > >     | 1 +
> > > > > > > > >     1 file changed, 1 insertion(+)
> > > > > > > > > 
> > > > > > > > > diff --git
> > > > > > > > > a/Documentation/devicetree/bindings/soc/mediatek/medi
> > > > > > > > > atek
> > > > > > > > > ,mutex
> > > > > > > > > .yaml
> > > > > > > > > b/Documentation/devicetree/bindings/soc/mediatek/medi
> > > > > > > > > atek
> > > > > > > > > ,mutex
> > > > > > > > > .yaml
> > > > > > > > > index 627dcc3e8b32..234fa5dc07c2 100644
> > > > > > > > > ---
> > > > > > > > > a/Documentation/devicetree/bindings/soc/mediatek/medi
> > > > > > > > > atek
> > > > > > > > > ,mutex
> > > > > > > > > .yaml
> > > > > > > > > +++
> > > > > > > > > b/Documentation/devicetree/bindings/soc/mediatek/medi
> > > > > > > > > atek
> > > > > > > > > ,mutex
> > > > > > > > > .yaml
> > > > > > > > > @@ -30,6 +30,7 @@ properties:
> > > > > > > > >           - mediatek,mt8173-disp-mutex
> > > > > > > > >           - mediatek,mt8183-disp-mutex
> > > > > > > > >           - mediatek,mt8186-disp-mutex
> > > > > > > > > +      - mediatek,mt8186-mdp3-mutex
> > > > > > > > >           - mediatek,mt8192-disp-mutex
> > > > > > > > >           - mediatek,mt8195-disp-mutex
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > 
> > > > > > 
> 
> 
> 



^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186
@ 2022-07-11 11:28                     ` allen-kh.cheng
  0 siblings, 0 replies; 30+ messages in thread
From: allen-kh.cheng @ 2022-07-11 11:28 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Chun-Kuang Hu, Philipp Zabel
  Cc: Project_Global_Chrome_Upstream_Group, devicetree,
	linux-arm-kernel, linux-kernel, linux-mediatek,
	Xiandong Wang (王先冬)

Hi Angelo,

On Fri, 2022-07-08 at 07:37 -0800, AngeloGioacchino Del Regno wrote:
> Il 08/07/22 13:58, allen-kh.cheng ha scritto:
> > Hi Angelo,
> > 
> > On Fri, 2022-07-08 at 10:28 +0200, AngeloGioacchino Del Regno
> > wrote:
> > > Il 08/07/22 10:19, Matthias Brugger ha scritto:
> > > > 
> > > > 
> > > > On 08/07/2022 10:14, allen-kh.cheng wrote:
> > > > > Hi Angelo,
> > > > > 
> > > > > On Thu, 2022-07-07 at 12:59 +0200, AngeloGioacchino Del Regno
> > > > > wrote:
> > > > > > Il 07/07/22 12:41, Matthias Brugger ha scritto:
> > > > > > > 
> > > > > > > 
> > > > > > > On 07/07/2022 10:52, AngeloGioacchino Del Regno wrote:
> > > > > > > > Il 05/07/22 14:26, Allen-KH Cheng ha scritto:
> > > > > > > > > Add mdp3 mutex compatible for mt8186 SoC.
> > > > > > > > > 
> > > > > > > > > Signed-off-by: Allen-KH Cheng <
> > > > > > > > > allen-kh.cheng@mediatek.com>
> > > > > > > > > Signed-off-by: Xiandong Wang <
> > > > > > > > > xiandong.wang@mediatek.com>
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Please drop this commit. Adding a mdp3-mutex compatible
> > > > > > > > is
> > > > > > > > not
> > > > > > > > needed here.
> > > > > > > > 
> > > > > > > 
> > > > > > > Thanks for checking. We probably would need a fallback
> > > > > > > compatible.
> > > > > > > We can only know
> > > > > > > from the HW engineers that can confirm if the IP block is
> > > > > > > the
> > > > > > > same
> > > > > > > as the disp
> > > > > > > mutex or a different one.
> > > > > > > 
> > > > > > > I'll drop both patches for now until things got clear.
> > > > > > > 
> > > > > > 
> > > > > > They're located in a different iospace from each other, but
> > > > > > either
> > > > > > the platform
> > > > > > data needs to *not be* joined together, or if they're
> > > > > > together,
> > > > > > I
> > > > > > would not like
> > > > > > having two different compatible strings for essentially the
> > > > > > same
> > > > > > thing.
> > > > > > 
> > > > > > I would at this point prefer dropping '-disp' from
> > > > > > 'mediatek,mt8186-
> > > > > > disp-mutex'
> > > > > > so that we would be able to declare two 'mediatek,mt8186-
> > > > > > mutex'
> > > > > > in
> > > > > > devicetree...
> > > > > > ...or simply have two mediatek,mt8186-disp-mutex (although
> > > > > > logically
> > > > > > incorrect?).
> > > > > > 
> > > > > > Cheers,
> > > > > > Angelo
> > > > > > 
> > > > > 
> > > > > Thanks for your opinion.
> > > > > 
> > > > > They are two different hardwares for different address
> > > > > spaces.
> > > > > 
> > > > > I think we drop '-disp' from 'mediatek,mt8186-disp-mutex'
> > > > > will be
> > > > > excessive because we also need to modify mutex node in all
> > > > > exited
> > > > > dts
> > > > > files.
> > > > > 
> > > > > I prefer havingg two mediatek,mt8186-disp-mutex.
> > > > > 
> > > > > ex:
> > > > > mutex: mutex@14001000 {
> > > > >      compatible = "mediatek,mt8186-disp-mutex";
> > > > >      ..
> > > > > }
> > > > > 
> > > > > mdp3_mutex0: mutex@1b001000 {
> > > > >      compatible = "mediatek,mt8186-disp-mutex";
> > > > >      ...
> > > > > }
> > > > > 
> > > > > What do you think?
> > > > 
> > > > I think that's an acceptable solution.
> > > > 
> > > 
> > > I'm a bit undecided instead, now... because from what I
> > > understand
> > > now,
> > > the platform data fields
> > > 
> > > 	.mutex_mod  and  .mutex_sof
> > > 
> > > are *not valid* for mutex at 0x1b001000 but only for the instance
> > > at
> > > 0x14001000.
> > > 
> > > If we go this way, at this point, we would be free (and allowed
> > > by
> > > the driver)
> > > to try to set these for 0x1b001000, and to try to set MDP3 table
> > > paths on
> > > 0x14001000, which is something that shouldn't be logically
> > > allowed,
> > > as the
> > > hardware does *not* support that.
> > > 
> > > Unless I got that wrong, and these fields for MUTEX_MOD_DISP_xxxx
> > > do
> > > exist in
> > > the mutex instance at 0xb001000, in which case, I fully agree
> > > with
> > > Matthias.
> > > 
> > > But otherwise, I have my doubts.
> > > 
> > > Cheers,
> > > Angelo
> > > 
> > 
> > I got your point.
> > 
> > The disp and mdp3 drivers work with the same data field beacase
> > 14001000 (disp mutex) would not use .mutex_table_mod and 1b001000
> > (mdp3
> > mutex) would not use .mutex_mod/.mutex_sof.
> > 
> > 
> > How about ...
> > 
> > static const struct mtk_mutex_data mt8186_mutex_driver_data = {
> > 	.mutex_mod = mt8186_mutex_mod,
> > 	.mutex_sof = mt8186_mutex_sof,
> > 	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
> > 	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
> > };
> > 
> > static const struct mtk_mutex_data mt8186_mutex_mdp_driver_data = {
> > 	.mutex_table_mod = mt8186_mutex_table_mod,
> > };
> > 
> > { .compatible = "mediatek,mt8186-disp-mutex",
> > .data = &mt8186_mutex_driver_data},
> > { .compatible = "mediatek,mt8186-mdp3-mutex",
> > .data = &mt8186_mutex_mdp_driver_data},
> > 
> > 
> >   mutex: mutex@14001000 {
> >      compatible = "mediatek,mt8186-disp-mutex";
> >      ..
> >   }
> >   mdp3_mutex0: mutex@1b001000 {
> >      compatible = "mediatek,mt8186-mdp3-mutex";
> >      ...
> >   }
> > 
> > Do you think that is feasible?
> > 
> 
> This makes a lot more sense to me.
> 
> Though, you have to also add the mod and sof regs, because the mutex
> instance
> for MDP_MUTEX does have these registers, even though they are used
> for different
> mods/sofs.
> 
> static const struct mtk_mutex_data mt8186_mutex_driver_data = {
> 	.mutex_mod = mt8186_mutex_mod,
> 	.mutex_sof = mt8186_mutex_sof,
> 	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
> 	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
> };
> 
> static const struct mtk_mutex_data mt8186_mdp_mutex_driver_data = {
>   	.mutex_mod_reg = MT8183_MUTEX0_MOD0,
>   	.mutex_sof_reg = MT8183_MUTEX0_SOF0,
> 	.mutex_table_mod = mt8186_mdp_mutex_table_mod,
> };
> 
> P.S.: Notice that mt8186_mdp_mutex_driver_data instead of
>        mt8186_mutex_mdp_driver_data was chosen on purpose:
>        like that, we're referencing to real block names.
> 
> Regards,
> Angelo
> 

Thanks for your suggestion.

According to our discussion, I will update in next version.

Best Regards,
Allen


> > Best Regards,
> > Allen
> > 
> > > > Regards,
> > > > Matthias
> > > > 
> > > > > 
> > > > > Best regards,
> > > > > Allen
> > > > > 
> > > > > > > Regards,
> > > > > > > Matthias
> > > > > > > 
> > > > > > > > > ---
> > > > > > > > > .../devicetree/bindings/soc/mediatek/mediatek,mutex.y
> > > > > > > > > aml
> > > > > > > > >     | 1 +
> > > > > > > > >     1 file changed, 1 insertion(+)
> > > > > > > > > 
> > > > > > > > > diff --git
> > > > > > > > > a/Documentation/devicetree/bindings/soc/mediatek/medi
> > > > > > > > > atek
> > > > > > > > > ,mutex
> > > > > > > > > .yaml
> > > > > > > > > b/Documentation/devicetree/bindings/soc/mediatek/medi
> > > > > > > > > atek
> > > > > > > > > ,mutex
> > > > > > > > > .yaml
> > > > > > > > > index 627dcc3e8b32..234fa5dc07c2 100644
> > > > > > > > > ---
> > > > > > > > > a/Documentation/devicetree/bindings/soc/mediatek/medi
> > > > > > > > > atek
> > > > > > > > > ,mutex
> > > > > > > > > .yaml
> > > > > > > > > +++
> > > > > > > > > b/Documentation/devicetree/bindings/soc/mediatek/medi
> > > > > > > > > atek
> > > > > > > > > ,mutex
> > > > > > > > > .yaml
> > > > > > > > > @@ -30,6 +30,7 @@ properties:
> > > > > > > > >           - mediatek,mt8173-disp-mutex
> > > > > > > > >           - mediatek,mt8183-disp-mutex
> > > > > > > > >           - mediatek,mt8186-disp-mutex
> > > > > > > > > +      - mediatek,mt8186-mdp3-mutex
> > > > > > > > >           - mediatek,mt8192-disp-mutex
> > > > > > > > >           - mediatek,mt8195-disp-mutex
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > 
> > > > > > 
> 
> 
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2022-07-11 11:40 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05 12:26 [PATCH 0/2] Add mt8186 mutex support for mdp3 Allen-KH Cheng
2022-07-05 12:26 ` Allen-KH Cheng
2022-07-05 12:26 ` [PATCH 1/2] dt-bindings: soc: mediatek: add mdp3 mutex support for mt8186 Allen-KH Cheng
2022-07-05 12:26   ` Allen-KH Cheng
2022-07-07  8:52   ` AngeloGioacchino Del Regno
2022-07-07  8:52     ` AngeloGioacchino Del Regno
2022-07-07 10:41     ` Matthias Brugger
2022-07-07 10:41       ` Matthias Brugger
2022-07-07 10:59       ` AngeloGioacchino Del Regno
2022-07-07 10:59         ` AngeloGioacchino Del Regno
2022-07-08  8:14         ` allen-kh.cheng
2022-07-08  8:14           ` allen-kh.cheng
2022-07-08  8:19           ` Matthias Brugger
2022-07-08  8:19             ` Matthias Brugger
2022-07-08  8:28             ` AngeloGioacchino Del Regno
2022-07-08  8:28               ` AngeloGioacchino Del Regno
2022-07-08 11:58               ` allen-kh.cheng
2022-07-08 11:58                 ` allen-kh.cheng
2022-07-08 15:37                 ` AngeloGioacchino Del Regno
2022-07-08 15:37                   ` AngeloGioacchino Del Regno
2022-07-11 11:28                   ` allen-kh.cheng
2022-07-11 11:28                     ` allen-kh.cheng
2022-07-05 12:26 ` [PATCH 2/2] soc: mediatek: mutex: add mt8186 mutex mod settings for mdp3 Allen-KH Cheng
2022-07-05 12:26   ` Allen-KH Cheng
2022-07-07  8:51   ` AngeloGioacchino Del Regno
2022-07-07  8:51     ` AngeloGioacchino Del Regno
2022-07-06 14:17 ` [PATCH 0/2] Add mt8186 mutex support " Matthias Brugger
2022-07-06 14:17   ` Matthias Brugger
2022-07-07 10:08   ` Matthias Brugger
2022-07-07 10:08     ` Matthias Brugger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.