Skip to contentSkip to conversation

MSM8937 MDP/DSI PHY enablement

PATCH Superseded Barnabás Czémán 3 participants 11 messages Jun 22, 2024 – Jun 23, 2024

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover MSM8937 MDP/DSI PHY enablement

This patch series adds support for the MDP and DSI PHY as found on the MSM8937 platform.

---
Barnabás Czémán (2):
dt-bindings: display/msm: qcom, mdp5: Add msm8937 compatible
dt-bindings: msm: dsi-phy-28nm: Document msm8937 compatible

Daniil Titov (2):
drm/msm/mdp5: Add MDP5 configuration for MSM8937 drm/msm/dsi: Add phy configuration for MSM8937

 .../bindings/display/msm/dsi-phy-28nm.yaml         |  1 +
 .../devicetree/bindings/display/msm/qcom,mdp5.yaml |  1 +
 .../devicetree/bindings/display/msm/qcom,mdss.yaml |  1 +
 drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c           | 89 ++++++++++++++++++++++
 drivers/gpu/drm/msm/dsi/phy/dsi_phy.c              |  2 +
 drivers/gpu/drm/msm/dsi/phy/dsi_phy.h              |  1 +
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c         | 18 +++++
 7 files changed, 113 insertions(+)

---
base-commit: f76698bd9a8ca01d3581236082d786e9a6b72bb7
change-id: 20240607-dsi-851ebb226a8d

Best regards,

Signature · 1 line
Barnabás Czémán <[email protected]>
#1 lore raw

PATCH 1/4 dt-bindings: display/msm: qcom, mdp5: Add msm8937 compatible

Add the compatible for the MDP5 found on MSM8937.

---
 Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml +1 -0
index 91c774f106ce..e153f8d26e7a 100644
@@ -25,6 +25,7 @@ properties:
               - qcom,msm8226-mdp5
               - qcom,msm8916-mdp5
               - qcom,msm8917-mdp5
+              - qcom,msm8937-mdp5
               - qcom,msm8953-mdp5
               - qcom,msm8974-mdp5
               - qcom,msm8976-mdp5
Signature · 1 line
2.45.2
#3 lore raw

PATCH 2/4 drm/msm/mdp5: Add MDP5 configuration for MSM8937

In reply to Barnabás Czémán

From: Daniil Titov <[email protected]>

Add the mdp5_cfg_hw entry for MDP5 version v1.14 found on msm8937.

---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 89 ++++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)
drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c +89 -0
index c5179e4c393c..6413c0d3e237 100644
@@ -1011,6 +1011,94 @@ static const struct mdp5_cfg_hw msm8917_config = {
 	.max_clk = 320000000,
 };
 
+static const struct mdp5_cfg_hw msm8937_config = {
+	.name = "msm8937",
+	.mdp = {
+		.count = 1,
+		.caps = MDP_CAP_CDM |
+			MDP_CAP_SRC_SPLIT,
+	},
+	.ctl = {
+		.count = 3,
+		.base = { 0x01000, 0x01200, 0x01400 },
+		.flush_hw_mask = 0xffffffff,
+	},
+	.pipe_vig = {
+		.count = 1,
+		.base = { 0x04000 },
+		.caps = MDP_PIPE_CAP_HFLIP	|
+			MDP_PIPE_CAP_VFLIP	|
+			MDP_PIPE_CAP_SCALE	|
+			MDP_PIPE_CAP_CSC	|
+			MDP_PIPE_CAP_DECIMATION	|
+			MDP_PIPE_CAP_SW_PIX_EXT	|
+			0,
+	},
+	.pipe_rgb = {
+		.count = 2,
+		.base = { 0x14000, 0x16000 },
+		.caps = MDP_PIPE_CAP_HFLIP	|
+			MDP_PIPE_CAP_VFLIP	|
+			MDP_PIPE_CAP_DECIMATION	|
+			MDP_PIPE_CAP_SW_PIX_EXT	|
+			0,
+	},
+	.pipe_dma = {
+		.count = 1,
+		.base = { 0x24000 },
+		.caps = MDP_PIPE_CAP_HFLIP	|
+			MDP_PIPE_CAP_VFLIP	|
+			MDP_PIPE_CAP_SW_PIX_EXT	|
+			0,
+	},
+	.pipe_cursor = {
+		.count = 1,
+		.base = { 0x34000 },
+		.caps = MDP_PIPE_CAP_HFLIP	|
+			MDP_PIPE_CAP_VFLIP	|
+			MDP_PIPE_CAP_SW_PIX_EXT	|
+			MDP_PIPE_CAP_CURSOR	|
+			0,
+	},
+
+	.lm = {
+		.count = 2,
+		.base = { 0x44000, 0x45000 },
+		.instances = {
+				{ .id = 0, .pp = 0, .dspp = 0,
+				  .caps = MDP_LM_CAP_DISPLAY |
+					  MDP_LM_CAP_PAIR },
+				{ .id = 1, .pp = 1, .dspp = -1,
+				  .caps = MDP_LM_CAP_DISPLAY },
+			     },
+		.nb_stages = 5,
+		.max_width = 2048,
+		.max_height = 0xFFFF,
+	},
+	.dspp = {
+		.count = 1,
+		.base = { 0x54000 },
+
+	},
+	.pp = {
+		.count = 2,
+		.base = { 0x70000, 0x70800 },
+	},
+	.cdm = {
+		.count = 1,
+		.base = { 0x79200 },
+	},
+	.intf = {
+		.base = { 0x00000, 0x6a800, 0x6b000 },
+		.connect = {
+			[0] = INTF_DISABLED,
+			[1] = INTF_DSI,
+			[2] = INTF_DSI,
+		},
+	},
+	.max_clk = 320000000,
+};
+
 static const struct mdp5_cfg_hw msm8998_config = {
 	.name = "msm8998",
 	.mdp = {
@@ -1325,6 +1413,7 @@ static const struct mdp5_cfg_handler cfg_handlers_v1[] = {
 	{ .revision = 9, .config = { .hw = &msm8x94_config } },
 	{ .revision = 7, .config = { .hw = &msm8x96_config } },
 	{ .revision = 11, .config = { .hw = &msm8x76_config } },
+	{ .revision = 14, .config = { .hw = &msm8937_config } },
 	{ .revision = 15, .config = { .hw = &msm8917_config } },
 	{ .revision = 16, .config = { .hw = &msm8x53_config } },
 };
Signature · 1 line
2.45.2
#7 lore raw

PATCH 3/4 dt-bindings: msm: dsi-phy-28nm: Document msm8937 compatible

In reply to Barnabás Czémán

The MSM8937 SoC uses a slightly different 28nm dsi phy. Add a new compatible for it.

---
 Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml | 1 +
 Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml    | 1 +
 2 files changed, 2 insertions(+)
Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml +1 -0
index 288d8babb76a..a55c2445d189 100644
@@ -16,6 +16,7 @@ properties:
   compatible:
     enum:
       - qcom,dsi-phy-28nm-8226
+      - qcom,dsi-phy-28nm-8937
       - qcom,dsi-phy-28nm-8960
       - qcom,dsi-phy-28nm-hpm
       - qcom,dsi-phy-28nm-hpm-fam-b
Documentation/devicetree/bindings/display/msm/qcom,mdss.yaml +1 -0
index e4576546bf0d..7c6462caa442 100644
@@ -126,6 +126,7 @@ patternProperties:
           - qcom,dsi-phy-14nm-8953
           - qcom,dsi-phy-20nm
           - qcom,dsi-phy-28nm-8226
+          - qcom,dsi-phy-28nm-8937
           - qcom,dsi-phy-28nm-hpm
           - qcom,dsi-phy-28nm-hpm-fam-b
           - qcom,dsi-phy-28nm-lp
Signature · 1 line
2.45.2
#9 lore raw

PATCH 4/4 drm/msm/dsi: Add phy configuration for MSM8937

In reply to Barnabás Czémán

From: Daniil Titov <[email protected]>

Add phy configuration for 28nm dsi phy found on MSM8937 SoC. Only difference from existing msm8916 configuration is number of phy and io_start addresses.

---
 drivers/gpu/drm/msm/dsi/phy/dsi_phy.c      |  2 ++
 drivers/gpu/drm/msm/dsi/phy/dsi_phy.h      |  1 +
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c | 18 ++++++++++++++++++
 3 files changed, 21 insertions(+)
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c +2 -0
index 24a347fe2998..dd58bc0a49eb 100644
@@ -545,6 +545,8 @@ static const struct of_device_id dsi_phy_dt_match[] = {
 	  .data = &dsi_phy_28nm_lp_cfgs },
 	{ .compatible = "qcom,dsi-phy-28nm-8226",
 	  .data = &dsi_phy_28nm_8226_cfgs },
+	{ .compatible = "qcom,dsi-phy-28nm-8937",
+	  .data = &dsi_phy_28nm_8937_cfgs },
 #endif
 #ifdef CONFIG_DRM_MSM_DSI_20NM_PHY
 	{ .compatible = "qcom,dsi-phy-20nm",
drivers/gpu/drm/msm/dsi/phy/dsi_phy.h +1 -0
index 5a5dc3faa971..a9b4eb2c0e8c 100644
@@ -47,6 +47,7 @@ extern const struct msm_dsi_phy_cfg dsi_phy_28nm_hpm_cfgs;
 extern const struct msm_dsi_phy_cfg dsi_phy_28nm_hpm_famb_cfgs;
 extern const struct msm_dsi_phy_cfg dsi_phy_28nm_lp_cfgs;
 extern const struct msm_dsi_phy_cfg dsi_phy_28nm_8226_cfgs;
+extern const struct msm_dsi_phy_cfg dsi_phy_28nm_8937_cfgs;
 extern const struct msm_dsi_phy_cfg dsi_phy_28nm_8960_cfgs;
 extern const struct msm_dsi_phy_cfg dsi_phy_20nm_cfgs;
 extern const struct msm_dsi_phy_cfg dsi_phy_14nm_cfgs;
drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c +18 -0
index ceec7bb87bf1..3afc8b1c9bdf 100644
@@ -917,3 +917,21 @@ const struct msm_dsi_phy_cfg dsi_phy_28nm_8226_cfgs = {
 	.num_dsi_phy = 1,
 	.quirks = DSI_PHY_28NM_QUIRK_PHY_8226,
 };
+
+const struct msm_dsi_phy_cfg dsi_phy_28nm_8937_cfgs = {
+	.has_phy_regulator = true,
+	.regulator_data = dsi_phy_28nm_regulators,
+	.num_regulators = ARRAY_SIZE(dsi_phy_28nm_regulators),
+	.ops = {
+		.enable = dsi_28nm_phy_enable,
+		.disable = dsi_28nm_phy_disable,
+		.pll_init = dsi_pll_28nm_init,
+		.save_pll_state = dsi_28nm_pll_save_state,
+		.restore_pll_state = dsi_28nm_pll_restore_state,
+	},
+	.min_pll_rate = VCO_MIN_RATE,
+	.max_pll_rate = VCO_MAX_RATE,
+	.io_start = { 0x1a94400, 0x1a96400 },
+	.num_dsi_phy = 2,
+	.quirks = DSI_PHY_28NM_QUIRK_PHY_LP,
+};
Signature · 1 line
2.45.2
#4 lore raw

Re: [PATCH 2/4] drm/msm/mdp5: Add MDP5 configuration for MSM8937

In reply to Barnabás Czémán
Quoted 15 lines · Barnabás Czémán

From: Daniil Titov <[email protected]>

Add the mdp5_cfg_hw entry for MDP5 version v1.14 found on msm8937.

---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 89 ++++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)
drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c +0 -0
index c5179e4c393c..6413c0d3e237 100644

drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c static const struct mdp5_cfg_hw msm8917_config = { · line 1019

Quoted 9 lines
drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c +6 -0
@@ -1011,6 +1011,94 @@ static const struct mdp5_cfg_hw msm8917_config = {
 	.max_clk = 320000000,
 };
 
+static const struct mdp5_cfg_hw msm8937_config = {
+	.name = "msm8937",
+	.mdp = {
+		.count = 1,
+		.caps = MDP_CAP_CDM |
+			MDP_CAP_SRC_SPLIT,

Could you please point out the SRC_SPLIT reference?

Other than that LGTM

Signature · 2 lines
With best wishes
Dmitry
Reviewed-by on v1 4/4
#10 lore raw

Re: [PATCH 4/4] drm/msm/dsi: Add phy configuration for MSM8937

In reply to Barnabás Czémán
Quoted 6 lines · Barnabás Czémán

From: Daniil Titov <[email protected]>

Add phy configuration for 28nm dsi phy found on MSM8937 SoC. Only difference from existing msm8916 configuration is number of phy and io_start addresses.

Quoted 8 lines
---
 drivers/gpu/drm/msm/dsi/phy/dsi_phy.c      |  2 ++
 drivers/gpu/drm/msm/dsi/phy/dsi_phy.h      |  1 +
 drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c | 18 ++++++++++++++++++
 3 files changed, 21 insertions(+)
Signature · 2 lines
With best wishes
Dmitry
Reviewed-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] dt-bindings: display/msm: qcom, mdp5: Add msm8937 compatible

In reply to Barnabás Czémán
Quoted 4 lines · Barnabás Czémán

Add the compatible for the MDP5 found on MSM8937.

---

---

<form letter>
This is an automated instruction, just in case, because many review tags are being ignored. If you know the process, you can skip it (please do not feel offended by me posting it here - no bad intentions intended). If you do not know the process, here is a short explanation:

Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions, under or above your Signed-off-by tag. Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for tags received on the version they apply.

https://elixir.bootlin.com/linux/v6.5-rc3/source/Documentation/process/submitting-patches.rst#L577
</form letter>

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH 2/4] drm/msm/mdp5: Add MDP5 configuration for MSM8937

In reply to Dmitry Baryshkov
Quoted 20 lines · Dmitry Baryshkov
Quoted 18 lines · Barnabás Czémán

From: Daniil Titov <[email protected]>

Add the mdp5_cfg_hw entry for MDP5 version v1.14 found on msm8937.

---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 89 ++++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)
drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c +0 -0
index c5179e4c393c..6413c0d3e237 100644
@@ -1011,6 +1011,94 @@ static const struct mdp5_cfg_hw msm8917_config = {
      .max_clk = 320000000,
 };
 
Quoted 8 lines

drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c static const struct mdp5_cfg_hw msm8917_config = { · line 1019

Quoted 6 lines
drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c +6 -0
+static const struct mdp5_cfg_hw msm8937_config = {
+     .name = "msm8937",
+     .mdp = {
+             .count = 1,
+             .caps = MDP_CAP_CDM |
+                     MDP_CAP_SRC_SPLIT,

Could you please point out the SRC_SPLIT reference?

Is this would be qcom,mdss-has-source-split in downstream, because if it is i think it is a mistake and it is wrong at msm8953 also.

Quoted 6 lines

Other than that LGTM

--
With best wishes
Dmitry

#6 lore raw

Re: [PATCH 2/4] drm/msm/mdp5: Add MDP5 configuration for MSM8937

Quoted 30 lines · Barnabás Czémán
Quoted 20 lines · Dmitry Baryshkov
Quoted 18 lines · Barnabás Czémán

From: Daniil Titov <[email protected]>

Add the mdp5_cfg_hw entry for MDP5 version v1.14 found on msm8937.

---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 89 ++++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)
drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c +0 -0
index c5179e4c393c..6413c0d3e237 100644
@@ -1011,6 +1011,94 @@ static const struct mdp5_cfg_hw msm8917_config = {
      .max_clk = 320000000,
 };
 
Quoted 8 lines

drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c static const struct mdp5_cfg_hw msm8917_config = { · line 1019

Quoted 6 lines
drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c +6 -0
+static const struct mdp5_cfg_hw msm8937_config = {
+     .name = "msm8937",
+     .mdp = {
+             .count = 1,
+             .caps = MDP_CAP_CDM |
+                     MDP_CAP_SRC_SPLIT,

Could you please point out the SRC_SPLIT reference?

Quoted 1 line

Is this would be qcom,mdss-has-source-split in downstream, because if

Yes, IIRC.

Quoted 1 line

it is i think it is a mistake and it is wrong at msm8953 also.

Please send a fix.

Quoted 6 lines
Quoted 6 lines

Other than that LGTM

--
With best wishes
Dmitry

Signature · 2 lines
With best wishes
Dmitry