Skip to contentSkip to conversation

SM6115/SM6125 MDSS core reset

PATCH Superseded Val Packett 3 participants 13 messages Feb 28 – Mar 1

Subsystems (5)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover SM6115/SM6125 MDSS core reset

v2: Collect R-b/T-b, expand commit messages to describe the issue everywhere
v1: https://lore.kernel.org/all/[email protected]/

Val Packett (6):
dt-bindings: clock: qcom,sm6115-dispcc: Define MDSS resets
dt-bindings: clock: qcom,dispcc-sm6125: Define MDSS resets
clk: qcom: dispcc-sm6115: Add missing MDSS resets
clk: qcom: dispcc-sm6125: Add missing MDSS resets
arm64: dts: qcom: sm6115: Add missing MDSS core reset
arm64: dts: qcom: sm6125: Add missing MDSS core reset

 arch/arm64/boot/dts/qcom/sm6115.dtsi           | 2 ++
 arch/arm64/boot/dts/qcom/sm6125.dtsi           | 3 +++
 drivers/clk/qcom/dispcc-sm6115.c               | 7 +++++++
 drivers/clk/qcom/dispcc-sm6125.c               | 7 +++++++
 include/dt-bindings/clock/qcom,dispcc-sm6125.h | 6 +++++-
 include/dt-bindings/clock/qcom,sm6115-dispcc.h | 7 +++++--
 6 files changed, 29 insertions(+), 3 deletions(-)
Signature · 1 line
2.52.0
#1 lore raw

PATCH v2 1/6 dt-bindings: clock: qcom,sm6115-dispcc: Define MDSS resets

Add the missing defines for MDSS resets, which are necessary to reset the display subsystem in order to avoid issues caused by state left over from the bootloader.

While here, align comment style with other SoCs.

Fixes 38557c6fc077 ("dt-bindings: clock: add QCOM SM6115 display clock bindings")
---
 include/dt-bindings/clock/qcom,sm6115-dispcc.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
include/dt-bindings/clock/qcom,sm6115-dispcc.h +5 -2
index d1a6c45b5029..ab8d312ade37 100644
@@ -6,7 +6,7 @@
 #ifndef _DT_BINDINGS_CLK_QCOM_DISP_CC_SM6115_H
 #define _DT_BINDINGS_CLK_QCOM_DISP_CC_SM6115_H
 
-/* DISP_CC clocks */
+/* Clocks */
 #define DISP_CC_PLL0			0
 #define DISP_CC_PLL0_OUT_MAIN		1
 #define DISP_CC_MDSS_AHB_CLK		2
@@ -30,7 +30,10 @@
 #define DISP_CC_SLEEP_CLK		20
 #define DISP_CC_SLEEP_CLK_SRC		21
 
-/* DISP_CC GDSCR */
+/* Resets */
+#define DISP_CC_MDSS_CORE_BCR			0
+
+/* GDSCs */
 #define MDSS_GDSC			0
 
 #endif
Signature · 1 line
2.52.0
Acked-by on v2 1/6
#2 lore raw

Re: [PATCH v2 1/6] dt-bindings: clock: qcom,sm6115-dispcc: Define MDSS resets

Quoted 7 lines · Val Packett

Add the missing defines for MDSS resets, which are necessary to reset the display subsystem in order to avoid issues caused by state left over from the bootloader.

While here, align comment style with other SoCs.

Fixes 38557c6fc077 ("dt-bindings: clock: add QCOM SM6115 display clock bindings")

IMO this is still not fix. Missing feature in original posting is not a bug, it's just incomplete posting which is in general accepted.

Your commit msg tries to explain the bug and I see nothing relevant to this binding. From that explanation I see nothing wrong in mentioned fixed commit.

Please drop fixes.

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH v2 1/6] dt-bindings: clock: qcom,sm6115-dispcc: Define MDSS resets

Quoted 9 lines · Krzysztof Kozlowski
Quoted 7 lines · Val Packett

Add the missing defines for MDSS resets, which are necessary to reset the display subsystem in order to avoid issues caused by state left over from the bootloader.

While here, align comment style with other SoCs.

Fixes 38557c6fc077 ("dt-bindings: clock: add QCOM SM6115 display clock bindings")
Quoted 8 lines

IMO this is still not fix. Missing feature in original posting is not a bug, it's just incomplete posting which is in general accepted.

Your commit msg tries to explain the bug and I see nothing relevant to this binding. From that explanation I see nothing wrong in mentioned fixed commit.

Please drop fixes.

Here we have an interesting situation. Patches for the bindings and for the clock driver are not fixes. The DT patch is a fix, because MDSS / DPU can misbehave when switching from the bootloader configuration to the running system.

Quoted 6 lines

Best regards,
Krzysztof

Signature · 2 lines
With best wishes
Dmitry
#4 lore raw

Re: [PATCH v2 1/6] dt-bindings: clock: qcom,sm6115-dispcc: Define MDSS resets

Quoted 17 lines · Dmitry Baryshkov
Quoted 16 lines · Krzysztof Kozlowski
Quoted 7 lines · Val Packett

Add the missing defines for MDSS resets, which are necessary to reset the display subsystem in order to avoid issues caused by state left over from the bootloader.

While here, align comment style with other SoCs.

Fixes 38557c6fc077 ("dt-bindings: clock: add QCOM SM6115 display clock bindings")

IMO this is still not fix. Missing feature in original posting is not a bug, it's just incomplete posting which is in general accepted.

Your commit msg tries to explain the bug and I see nothing relevant to this binding. From that explanation I see nothing wrong in mentioned fixed commit.

Quoted 6 lines
Quoted 1 line

Please drop fixes.

Here we have an interesting situation. Patches for the bindings and for the clock driver are not fixes. The DT patch is a fix, because MDSS / DPU can misbehave when switching from the bootloader configuration to the running system.

If these are not fixes, then they should not carry a tag claiming they are fixes.

Best regards,
Krzysztof

#5 lore raw

PATCH v2 2/6 dt-bindings: clock: qcom,dispcc-sm6125: Define MDSS resets

In reply to Val Packett

Add the missing defines for MDSS resets, which are necessary to reset the display subsystem in order to avoid issues caused by state left over from the bootloader.

While here, align comment style with other SoCs.

Fixes 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings")
---
 include/dt-bindings/clock/qcom,dispcc-sm6125.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/dt-bindings/clock/qcom,dispcc-sm6125.h +5 -1
index 4ff974f4fcc3..f58b85d2c814 100644
@@ -6,6 +6,7 @@
 #ifndef _DT_BINDINGS_CLK_QCOM_DISP_CC_SM6125_H
 #define _DT_BINDINGS_CLK_QCOM_DISP_CC_SM6125_H
 
+/* Clocks */
 #define DISP_CC_PLL0			0
 #define DISP_CC_MDSS_AHB_CLK		1
 #define DISP_CC_MDSS_AHB_CLK_SRC	2
@@ -35,7 +36,10 @@
 #define DISP_CC_MDSS_VSYNC_CLK_SRC	26
 #define DISP_CC_XO_CLK			27
 
-/* DISP_CC GDSCR */
+/* Resets */
+#define DISP_CC_MDSS_CORE_BCR			0
+
+/* GDSCs */
 #define MDSS_GDSC			0
 
 #endif
Signature · 1 line
2.52.0
Acked-by on v2 2/6
#6 lore raw

Re: [PATCH v2 2/6] dt-bindings: clock: qcom,dispcc-sm6125: Define MDSS resets

Quoted 7 lines · Val Packett

Add the missing defines for MDSS resets, which are necessary to reset the display subsystem in order to avoid issues caused by state left over from the bootloader.

While here, align comment style with other SoCs.

Fixes 8397c9c0c26b ("dt-bindings: clock: add QCOM SM6125 display clock bindings")

Same comment, nothing wrong was in above commit and posting bindings without reset part is not a bug.

With fixes dropped:

Best regards,
Krzysztof

#7 lore raw

PATCH v2 3/6 clk: qcom: dispcc-sm6115: Add missing MDSS resets

In reply to Val Packett

The MDSS resets were left undescribed. Add them to allow resetting the display subsystem, which is necessary to avoid issues caused by state left over from the bootloader on various platforms.

Fixes 9b518788631c ("clk: qcom: Add display clock controller driver for SM6115")
---
 drivers/clk/qcom/dispcc-sm6115.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/clk/qcom/dispcc-sm6115.c +7 -0
index 8ae25d51db94..75bd57213079 100644
@@ -22,6 +22,7 @@
 #include "clk-regmap-divider.h"
 #include "common.h"
 #include "gdsc.h"
+#include "reset.h"
 
 enum {
 	DT_BI_TCXO,
@@ -511,6 +512,10 @@ static struct clk_branch disp_cc_sleep_clk = {
 	},
 };
 
+static const struct qcom_reset_map disp_cc_sm6115_resets[] = {
+	[DISP_CC_MDSS_CORE_BCR] = { 0x2000 },
+};
+
 static struct gdsc mdss_gdsc = {
 	.gdscr = 0x3000,
 	.pd = {
@@ -561,6 +566,8 @@ static const struct qcom_cc_desc disp_cc_sm6115_desc = {
 	.config = &disp_cc_sm6115_regmap_config,
 	.clks = disp_cc_sm6115_clocks,
 	.num_clks = ARRAY_SIZE(disp_cc_sm6115_clocks),
+	.resets = disp_cc_sm6115_resets,
+	.num_resets = ARRAY_SIZE(disp_cc_sm6115_resets),
 	.gdscs = disp_cc_sm6115_gdscs,
 	.num_gdscs = ARRAY_SIZE(disp_cc_sm6115_gdscs),
 };
Signature · 1 line
2.52.0
#8 lore raw

Re: [PATCH v2 3/6] clk: qcom: dispcc-sm6115: Add missing MDSS resets

Quoted 5 lines · Val Packett

The MDSS resets were left undescribed. Add them to allow resetting the display subsystem, which is necessary to avoid issues caused by state left over from the bootloader on various platforms.

Fixes 9b518788631c ("clk: qcom: Add display clock controller driver for SM6115")

Not a bug being fixed here.

Best regards,
Krzysztof

#9 lore raw

PATCH v2 4/6 clk: qcom: dispcc-sm6125: Add missing MDSS resets

In reply to Val Packett

The MDSS resets were left undescribed. Add them to allow resetting the display subsystem, which is necessary to avoid issues caused by state left over from the bootloader on various platforms.

Fixes 6e87c8f07407 ("clk: qcom: Add display clock controller driver for SM6125")
---
 drivers/clk/qcom/dispcc-sm6125.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/clk/qcom/dispcc-sm6125.c +7 -0
index 851d38a487d3..2c67abcfef12 100644
@@ -17,6 +17,7 @@
 #include "clk-regmap.h"
 #include "common.h"
 #include "gdsc.h"
+#include "reset.h"
 
 enum {
 	P_BI_TCXO,
@@ -607,6 +608,10 @@ static struct clk_branch disp_cc_xo_clk = {
 	},
 };
 
+static const struct qcom_reset_map disp_cc_sm6125_resets[] = {
+	[DISP_CC_MDSS_CORE_BCR] = { 0x2000 },
+};
+
 static struct gdsc mdss_gdsc = {
 	.gdscr = 0x3000,
 	.pd = {
@@ -663,6 +668,8 @@ static const struct qcom_cc_desc disp_cc_sm6125_desc = {
 	.config = &disp_cc_sm6125_regmap_config,
 	.clks = disp_cc_sm6125_clocks,
 	.num_clks = ARRAY_SIZE(disp_cc_sm6125_clocks),
+	.resets = disp_cc_sm6125_resets,
+	.num_resets = ARRAY_SIZE(disp_cc_sm6125_resets),
 	.gdscs = disp_cc_sm6125_gdscs,
 	.num_gdscs = ARRAY_SIZE(disp_cc_sm6125_gdscs),
 };
Signature · 1 line
2.52.0
#10 lore raw

PATCH v2 5/6 arm64: dts: qcom: sm6115: Add missing MDSS core reset

In reply to Val Packett

To make sure the display subsystem starts in a predictable state, we need to reset it. Otherwise, unpredictable issues can happen, e.g. on the motorola-guamp smartphone DSI would not transmit anything.

Wire up the reset to fix.

Fixes 705e50427d81 ("arm64: dts: qcom: sm6115: Add mdss/dpu node")
---
 arch/arm64/boot/dts/qcom/sm6115.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/sm6115.dtsi +2 -0
index e9336adbc391..3a9a1ad8d581 100644
@@ -1864,6 +1864,8 @@ mdss: display-subsystem@5e00000 {
 				 <&gcc GCC_DISP_HF_AXI_CLK>,
 				 <&dispcc DISP_CC_MDSS_MDP_CLK>;
 
+			resets = <&dispcc DISP_CC_MDSS_CORE_BCR>;
+
 			interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
 			interrupt-controller;
 			#interrupt-cells = <1>;
Signature · 1 line
2.52.0
#11 lore raw

PATCH v2 6/6 arm64: dts: qcom: sm6125: Add missing MDSS core reset

In reply to Val Packett

To make sure the display subsystem starts in a predictable state, we need to reset it. Otherwise, unpredictable issues can happen, e.g. on the xiaomi-laurel-sprout smartphone DSI would not work on boot.

Wire up the reset to fix.

Fixes 0865d23a0226 ("arm64: dts: qcom: sm6125: Add display hardware nodes")
---
 arch/arm64/boot/dts/qcom/sm6125.dtsi | 3 +++
 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/qcom/sm6125.dtsi +3 -0
index 80c42dff5399..a22374e5a17f 100644
@@ -1238,6 +1238,8 @@ mdss: display-subsystem@5e00000 {
 				      "ahb",
 				      "core";
 
+			resets = <&dispcc DISP_CC_MDSS_CORE_BCR>;
+
 			power-domains = <&dispcc MDSS_GDSC>;
 
 			iommus = <&apps_smmu 0x400 0x0>;
@@ -1437,6 +1439,7 @@ dispcc: clock-controller@5f00000 {
 			power-domains = <&rpmpd RPMPD_VDDCX>;
 
 			#clock-cells = <1>;
+			#reset-cells = <1>;
 			#power-domain-cells = <1>;
 		};
 
Signature · 1 line
2.52.0
#12 lore raw

Re: [PATCH v2 6/6] arm64: dts: qcom: sm6125: Add missing MDSS core reset

Quoted 7 lines · Val Packett

To make sure the display subsystem starts in a predictable state, we need to reset it. Otherwise, unpredictable issues can happen, e.g. on the xiaomi-laurel-sprout smartphone DSI would not work on boot.

Wire up the reset to fix.

Fixes 0865d23a0226 ("arm64: dts: qcom: sm6125: Add display hardware nodes")

This maybe is the only place you can add fixes tag, because original DTS was so incomplete that it could not reliably work, so here I could accept a fixes.

Best regards,
Krzysztof