Skip to contentSkip to conversation

Fix SM6115 MDSS register access during runtime resume

PATCH Superseded Michael McAllister 3 participants 8 messages Oct 24 – Oct 26

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

cover Fix SM6115 MDSS register access during runtime resume

Hi,

This fixes garbled compressed scanout on my device (Moto G10, SM4250) after display power cycling. MDSS needs the DISPCC AHB clock before the DPU child resumes, so this adds it to the binding and shared SM6115 clock list. I tested this on 7.2.9 and power-cycled the display 20 times.

Michael McAllister (2):
dt-bindings: display: msm: sm6115-mdss: Add missing AHB clock
arm64: dts: qcom: sm6115: Add missing MDSS AHB clock

 .../devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml    | 5 ++++-
 arch/arm64/boot/dts/qcom/sm6115.dtsi                         | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

base-commit: d053e38e614fb2e383b298ce8fc308a780d7f209

Signature · 1 line
2.39.5
#1 lore raw

PATCH 1/2 dt-bindings: display: msm: sm6115-mdss: Add missing AHB clock

MDSS register access requires the AHB clock supplied by DISPCC, in addition to the GCC bus clocks and the MDP core clock already listed. The DPU child also uses this clock, but MDSS needs it before the child resumes so that it can access its own registers.

Add the missing clock to the end of the list and update the example. Keep the existing three-clock descriptions valid for compatibility with older device trees.

Fixes b93bdff44a85 ("dt-bindings: display/msm: add support for SM6115")
---
 .../devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml +4 -1
index 309de1953..d4fac93d9 100644
@@ -21,10 +21,12 @@ properties:
     const: qcom,sm6115-mdss
 
   clocks:
+    minItems: 3
     items:
       - description: Display AHB clock from gcc
       - description: Display AXI clock
       - description: Display core clock
+      - description: Display AHB clock from dispcc
 
   iommus:
     maxItems: 2
@@ -92,7 +94,8 @@ examples:
         power-domains = <&dispcc MDSS_GDSC>;
         clocks = <&gcc GCC_DISP_AHB_CLK>,
                  <&gcc GCC_DISP_HF_AXI_CLK>,
-                 <&dispcc DISP_CC_MDSS_MDP_CLK>;
+                 <&dispcc DISP_CC_MDSS_MDP_CLK>,
+                 <&dispcc DISP_CC_MDSS_AHB_CLK>;
 
         interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
         interrupt-controller;
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] dt-bindings: display: msm: sm6115-mdss: Add missing AHB clock

Quoted 11 lines · Michael McAllister

MDSS register access requires the AHB clock supplied by DISPCC, in addition to the GCC bus clocks and the MDP core clock already listed. The DPU child also uses this clock, but MDSS needs it before the child resumes so that it can access its own registers.

Add the missing clock to the end of the list and update the example. Keep the existing three-clock descriptions valid for compatibility with older device trees.

Fixes b93bdff44a85 ("dt-bindings: display/msm: add support for SM6115")

Drop the blank line between tags.

Quoted 4 lines
---
 .../devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Best regards,
Krzysztof

#3 lore raw

PATCH 2/2 arm64: dts: qcom: sm6115: Add missing MDSS AHB clock

In reply to Michael McAllister

The MDSS node is missing DISP_CC_MDSS_AHB_CLK. Although the DPU child already requests this clock, MDSS resumes before the child enables it. The MDSS hardware-version register can then read as zero, causing msm_mdss_enable() to skip UBWC configuration.

On the Motorola Moto G10 (SM4250), this results in garbled compressed scanout after display power cycling. Adding the clock restores the UBWC configuration and makes compressed and linear scanout agree.

Include the DISPCC AHB clock in the MDSS clock list so that its existing bulk clock handling enables it before accessing the MDSS registers.

Fixes 705e50427d81 ("arm64: dts: qcom: sm6115: Add mdss/dpu node")
---
 arch/arm64/boot/dts/qcom/sm6115.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm6115.dtsi +2 -1
index 0f2af8aba..f7002b9eb 100644
@@ -1927,7 +1927,8 @@ mdss: display-subsystem@5e00000 {
 
 			clocks = <&gcc GCC_DISP_AHB_CLK>,
 				 <&gcc GCC_DISP_HF_AXI_CLK>,
-				 <&dispcc DISP_CC_MDSS_MDP_CLK>;
+				 <&dispcc DISP_CC_MDSS_MDP_CLK>,
+				 <&dispcc DISP_CC_MDSS_AHB_CLK>;
 
 			resets = <&dispcc DISP_CC_MDSS_CORE_BCR>;
 
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] arm64: dts: qcom: sm6115: Add missing MDSS AHB clock

Quoted 9 lines · Michael McAllister

The MDSS node is missing DISP_CC_MDSS_AHB_CLK. Although the DPU child already requests this clock, MDSS resumes before the child enables it. The MDSS hardware-version register can then read as zero, causing msm_mdss_enable() to skip UBWC configuration.

On the Motorola Moto G10 (SM4250), this results in garbled compressed scanout after display power cycling. Adding the clock restores the UBWC configuration and makes compressed and linear scanout agree.

Quoted 8 lines

Include the DISPCC AHB clock in the MDSS clock list so that its existing bulk clock handling enables it before accessing the MDSS registers.

Fixes 705e50427d81 ("arm64: dts: qcom: sm6115: Add mdss/dpu node")

---

Konrad

#5 lore raw

v2 cover Fix SM6115 MDSS register access during runtime resume

In reply to Michael McAllister

Hi,

This fixes garbled compressed scanout on my device (Moto G10, SM4250) after display power cycling. MDSS needs the DISPCC AHB clock before the DPU child resumes, so this adds it to the binding and shared SM6115 clock list. I tested this on 7.2.9 and power-cycled the display 20 times.

Changes in v2:
- Remove blank lines between commit trailers.
- Add the received review tags.

v1: https://lore.kernel.org/all/[email protected]/

Michael McAllister (2):
dt-bindings: display: msm: sm6115-mdss: Add missing AHB clock
arm64: dts: qcom: sm6115: Add missing MDSS AHB clock

 .../devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml    | 5 ++++-
 arch/arm64/boot/dts/qcom/sm6115.dtsi                         | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

base-commit: d053e38e614fb2e383b298ce8fc308a780d7f209

Signature · 1 line
2.39.5
#6 lore raw

PATCH v2 1/2 dt-bindings: display: msm: sm6115-mdss: Add missing AHB clock

MDSS register access requires the AHB clock supplied by DISPCC, in addition to the GCC bus clocks and the MDP core clock already listed. The DPU child also uses this clock, but MDSS needs it before the child resumes so that it can access its own registers.

Add the missing clock to the end of the list and update the example. Keep the existing three-clock descriptions valid for compatibility with older device trees.

Fixes b93bdff44a85 ("dt-bindings: display/msm: add support for SM6115")

---
Changes in v2:
- Remove the blank line between commit trailers.
- Add the received Reviewed-by tag.

 .../devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml +4 -1
index 309de1953..d4fac93d9 100644
@@ -21,10 +21,12 @@ properties:
     const: qcom,sm6115-mdss
 
   clocks:
+    minItems: 3
     items:
       - description: Display AHB clock from gcc
       - description: Display AXI clock
       - description: Display core clock
+      - description: Display AHB clock from dispcc
 
   iommus:
     maxItems: 2
@@ -92,7 +94,8 @@ examples:
         power-domains = <&dispcc MDSS_GDSC>;
         clocks = <&gcc GCC_DISP_AHB_CLK>,
                  <&gcc GCC_DISP_HF_AXI_CLK>,
-                 <&dispcc DISP_CC_MDSS_MDP_CLK>;
+                 <&dispcc DISP_CC_MDSS_MDP_CLK>,
+                 <&dispcc DISP_CC_MDSS_AHB_CLK>;
 
         interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
         interrupt-controller;
#7 lore raw

PATCH v2 2/2 arm64: dts: qcom: sm6115: Add missing MDSS AHB clock

In reply to Michael McAllister

The MDSS node is missing DISP_CC_MDSS_AHB_CLK. Although the DPU child already requests this clock, MDSS resumes before the child enables it. The MDSS hardware-version register can then read as zero, causing msm_mdss_enable() to skip UBWC configuration.

On the Motorola Moto G10 (SM4250), this results in garbled compressed scanout after display power cycling. Adding the clock restores the UBWC configuration and makes compressed and linear scanout agree.

Include the DISPCC AHB clock in the MDSS clock list so that its existing bulk clock handling enables it before accessing the MDSS registers.

Fixes 705e50427d81 ("arm64: dts: qcom: sm6115: Add mdss/dpu node")

---
Changes in v2:
- Remove the blank line between commit trailers.
- Add the received Reviewed-by tag.

 arch/arm64/boot/dts/qcom/sm6115.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm6115.dtsi +2 -1
index 0f2af8aba..f7002b9eb 100644
@@ -1927,7 +1927,8 @@ mdss: display-subsystem@5e00000 {
 
 			clocks = <&gcc GCC_DISP_AHB_CLK>,
 				 <&gcc GCC_DISP_HF_AXI_CLK>,
-				 <&dispcc DISP_CC_MDSS_MDP_CLK>;
+				 <&dispcc DISP_CC_MDSS_MDP_CLK>,
+				 <&dispcc DISP_CC_MDSS_AHB_CLK>;
 
 			resets = <&dispcc DISP_CC_MDSS_CORE_BCR>;