Skip to contentSkip to conversation

Add mt8186 dpi compatiable

PATCH In review [email protected] 3 participants 6 messages Apr 11, 2022 – Apr 12, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v4 cover Add mt8186 dpi compatiable

From: Xinlei Lee <[email protected]>

Base on 5.18-rc1

Change since v3:
1. Move mt8186_conf location.

Change since v2:
1. Move mt8186 compatiable location.

Change since v1:
1. Put switch dpi Topckgen MUX action in mt8186.dtsi.

Xinlei Lee (2):
dt-bindings: display: mediatek: dpi: Add compatible for MediaTek

    MT8186

drm/mediatek: Add mt8186 dpi compatible to mtk_dpi.c

 .../bindings/display/mediatek/mediatek,dpi.yaml       |  1 +
 drivers/gpu/drm/mediatek/mtk_dpi.c                    | 11 +++++++++++
 2 files changed, 12 insertions(+)
Signature · 1 line
2.18.0
#1 lore raw

PATCH v4 1/2 dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT8186

From: Xinlei Lee <[email protected]>

Add dt-binding documentation of dpi for MediaTek MT8186 SoC.

---
 .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml       | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml +1 -0
index 843f89d6053f..77ee1b923991 100644
@@ -22,6 +22,7 @@ properties:
       - mediatek,mt7623-dpi
       - mediatek,mt8173-dpi
       - mediatek,mt8183-dpi
+      - mediatek,mt8186-dpi
       - mediatek,mt8192-dpi
 
   reg:
Signature · 1 line
2.18.0
#2 lore raw

PATCH v4 2/2 drm/mediatek: Add mt8186 dpi compatible to mtk_dpi.c

In reply to [email protected]

From: Xinlei Lee <[email protected]>

Add the compatible because use different .data in mt8186.

---
 drivers/gpu/drm/mediatek/mtk_dpi.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/gpu/drm/mediatek/mtk_dpi.c +11 -0
index 4554e2de1430..824d7da41c6a 100644
@@ -815,6 +815,14 @@ static const struct mtk_dpi_conf mt8183_conf = {
 	.num_output_fmts = ARRAY_SIZE(mt8183_output_fmts),
 };
 
+static const struct mtk_dpi_conf mt8186_conf = {
+	.cal_factor =  mt8183_calculate_factor,
+	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 150000,
+	.output_fmts = mt8183_output_fmts,
+	.num_output_fmts = ARRAY_SIZE(mt8183_output_fmts),
+};
+
 static const struct mtk_dpi_conf mt8192_conf = {
 	.cal_factor = mt8183_calculate_factor,
 	.reg_h_fre_con = 0xe0,
@@ -942,6 +950,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
 	{ .compatible = "mediatek,mt8183-dpi",
 	  .data = &mt8183_conf,
 	},
+	{ .compatible = "mediatek,mt8186-dpi",
+	  .data = &mt8186_conf,
+	},
 	{ .compatible = "mediatek,mt8192-dpi",
 	  .data = &mt8192_conf,
 	},
Signature · 1 line
2.18.0
Reviewed-by on v4 2/2
#3 lore raw

Re: [PATCH v4,2/2] drm/mediatek: Add mt8186 dpi compatible to mtk_dpi.c

Quoted 39 lines · On Mon, 2022-04-11 at 10:53 +0800, [email protected] wrote:

From: Xinlei Lee <[email protected]>

Add the compatible because use different .data in mt8186.

---
 drivers/gpu/drm/mediatek/mtk_dpi.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/gpu/drm/mediatek/mtk_dpi.c +11 -0
index 4554e2de1430..824d7da41c6a 100644
@@ -815,6 +815,14 @@ static const struct mtk_dpi_conf mt8183_conf = {
 	.num_output_fmts = ARRAY_SIZE(mt8183_output_fmts),
 };
 
+static const struct mtk_dpi_conf mt8186_conf = {
+	.cal_factor =  mt8183_calculate_factor,
+	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 150000,
+	.output_fmts = mt8183_output_fmts,
+	.num_output_fmts = ARRAY_SIZE(mt8183_output_fmts),
+};
+
 static const struct mtk_dpi_conf mt8192_conf = {
 	.cal_factor = mt8183_calculate_factor,
 	.reg_h_fre_con = 0xe0,
@@ -942,6 +950,9 @@ static const struct of_device_id mtk_dpi_of_ids[]
 = {
 	{ .compatible = "mediatek,mt8183-dpi",
 	  .data = &mt8183_conf,
 	},
+	{ .compatible = "mediatek,mt8186-dpi",
+	  .data = &mt8186_conf,
+	},
 	{ .compatible = "mediatek,mt8192-dpi",
 	  .data = &mt8192_conf,
Quoted 1 line

},

#4 lore raw

Re: [PATCH v4,2/2] drm/mediatek: Add mt8186 dpi compatible to mtk_dpi.c

In reply to [email protected]

Hi, Xinlei:

Quoted 30 lines · On Mon, 2022-04-11 at 10:53 +0800, [email protected] wrote:

From: Xinlei Lee <[email protected]>

Add the compatible because use different .data in mt8186.

---
 drivers/gpu/drm/mediatek/mtk_dpi.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/gpu/drm/mediatek/mtk_dpi.c +8 -0
index 4554e2de1430..824d7da41c6a 100644
@@ -815,6 +815,14 @@ static const struct mtk_dpi_conf mt8183_conf = {
 	.num_output_fmts = ARRAY_SIZE(mt8183_output_fmts),
 };
 
+static const struct mtk_dpi_conf mt8186_conf = {
+	.cal_factor =  mt8183_calculate_factor,
+	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 150000,
+	.output_fmts = mt8183_output_fmts,
+	.num_output_fmts = ARRAY_SIZE(mt8183_output_fmts),
+};
+
 static const struct mtk_dpi_conf mt8192_conf = {
 	.cal_factor = mt8183_calculate_factor,
 	.reg_h_fre_con = 0xe0,

drivers/gpu/drm/mediatek/mtk_dpi.c static const struct of_device_id mtk_dpi_of_ids[] · line 955

Quoted 6 lines
drivers/gpu/drm/mediatek/mtk_dpi.c +2 -0
@@ -942,6 +950,9 @@ static const struct of_device_id mtk_dpi_of_ids[]
 = {
 	{ .compatible = "mediatek,mt8183-dpi",
 	  .data = &mt8183_conf,
 	},
+	{ .compatible = "mediatek,mt8186-dpi",
+	  .data = &mt8186_conf,

If Nicolas' patch [1] is correct, this should be

.data = &mt8192_conf,

Could you help to comfirm patch [1] is correct or not?

[1]
https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/

Regards,
CK

Quoted 4 lines
drivers/gpu/drm/mediatek/mtk_dpi.c +1 -0
+	},
 	{ .compatible = "mediatek,mt8192-dpi",
 	  .data = &mt8192_conf,

},

author
#5 lore raw

Re: [PATCH v4,2/2] drm/mediatek: Add mt8186 dpi compatible to mtk_dpi.c

Quoted 44 lines · CK Hu

Hi, Xinlei:

Quoted 33 lines · On Mon, 2022-04-11 at 10:53 +0800, [email protected] wrote:

From: Xinlei Lee <[email protected]>

Add the compatible because use different .data in mt8186.

---
 drivers/gpu/drm/mediatek/mtk_dpi.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/gpu/drm/mediatek/mtk_dpi.c +8 -0
index 4554e2de1430..824d7da41c6a 100644
@@ -815,6 +815,14 @@ static const struct mtk_dpi_conf mt8183_conf =
 {
 	.num_output_fmts = ARRAY_SIZE(mt8183_output_fmts),
 };
 
+static const struct mtk_dpi_conf mt8186_conf = {
+	.cal_factor =  mt8183_calculate_factor,
+	.reg_h_fre_con = 0xe0,
+	.max_clock_khz = 150000,
+	.output_fmts = mt8183_output_fmts,
+	.num_output_fmts = ARRAY_SIZE(mt8183_output_fmts),
+};
+
 static const struct mtk_dpi_conf mt8192_conf = {
 	.cal_factor = mt8183_calculate_factor,
drivers/gpu/drm/mediatek/mtk_dpi.c +0 -0
 	.reg_h_fre_con = 0xe0,
@@ -942,6 +950,9 @@ static const struct of_device_id

mtk_dpi_of_ids[]
= {

drivers/gpu/drm/mediatek/mtk_dpi.c static const struct of_device_id mtk_dpi_of_ids[] = { · line 954

Quoted 5 lines
drivers/gpu/drm/mediatek/mtk_dpi.c +2 -0
 	{ .compatible = "mediatek,mt8183-dpi",
 	  .data = &mt8183_conf,
 	},
+	{ .compatible = "mediatek,mt8186-dpi",
+	  .data = &mt8186_conf,

If Nicolas' patch [1] is correct, this should be

Quoted 6 lines

.data = &mt8192_conf,

Could you help to comfirm patch [1] is correct or not?

[1]

https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/

Quoted 10 lines

Regards,
CK

drivers/gpu/drm/mediatek/mtk_dpi.c static const struct of_device_id mtk_dpi_of_ids[] = { · line 958

Quoted 4 lines
drivers/gpu/drm/mediatek/mtk_dpi.c +1 -0
+	},
 	{ .compatible = "mediatek,mt8192-dpi",
 	  .data = &mt8192_conf,
 	},

Hi CK:

Thanks for your review.
I checked that mt8186_conf & mt8192_conf are the same.
In the next version, I will remove mt8186_conf and reuse mt8192_conf.

Best Regards!
xinlei