Re: [Freedreno] [PATCH v4 18/18] arm64: dts: qcom: sm8250: Add compat qcom, sm8250-dsi-ctrl

2022-11-26 Thread Dmitry Baryshkov

On 25/11/2022 14:36, Bryan O'Donoghue wrote:

Add silicon specific compatible qcom,sm8250-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sm8250 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
  arch/arm64/boot/dts/qcom/sm8250.dtsi | 6 --
  1 file changed, 4 insertions(+), 2 deletions(-)


Reviewed-by: Dmitry Baryshkov 

--
With best wishes
Dmitry



Re: [Freedreno] [PATCH v4 17/18] arm64: dts: qcom: sdm845: Add compat qcom, sdm845-dsi-ctrl

2022-11-26 Thread Dmitry Baryshkov

On 25/11/2022 14:36, Bryan O'Donoghue wrote:

Add silicon specific compatible qcom,sdm845-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sdm845 against the yaml documentation.

Reviewed-by: Douglas Anderson 
Signed-off-by: Bryan O'Donoghue 
---
  arch/arm64/boot/dts/qcom/sdm845.dtsi | 6 --
  1 file changed, 4 insertions(+), 2 deletions(-)


Reviewed-by: Dmitry Baryshkov 

--
With best wishes
Dmitry



Re: [Freedreno] [PATCH v4 16/18] arm64: dts: qcom: sdm660: Add compat qcom, sdm660-dsi-ctrl

2022-11-26 Thread Dmitry Baryshkov

On 25/11/2022 14:36, Bryan O'Donoghue wrote:

Add silicon specific compatible qcom,sdm660-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sdm660 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
  arch/arm64/boot/dts/qcom/sdm660.dtsi | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm660.dtsi 
b/arch/arm64/boot/dts/qcom/sdm660.dtsi
index 10bf1c45cf6ec..f8ec728e67f3d 100644
--- a/arch/arm64/boot/dts/qcom/sdm660.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm660.dtsi
@@ -154,7 +154,8 @@ mdp5_intf2_out: endpoint {
  
  &mdss {

dsi1: dsi@c996000 {
-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sdm660-dsi-ctrl",
+"qcom,mdss-dsi-ctrl";


So, we'd end up with two identical DSI hosts, but one has compatible 
'qcom,sdm660-dsi-ctrl' and another one 'qcom,sdm630-dsi-ctrl'.


I think, use sdm660 for both of them (for both sdm630 and sdm660)


reg = <0x0c996000 0x400>;
reg-names = "dsi_ctrl";
  


--
With best wishes
Dmitry



Re: [Freedreno] [PATCH v4 15/18] arm64: dts: qcom: sdm630: Add compat qcom, sdm630-dsi-ctrl

2022-11-26 Thread Dmitry Baryshkov

On 25/11/2022 14:36, Bryan O'Donoghue wrote:

Add silicon specific compatible qcom,sdm630-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sdm630 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
  arch/arm64/boot/dts/qcom/sdm630.dtsi | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)


Reviewed-by: Dmitry Baryshkov 

--
With best wishes
Dmitry



Re: [Freedreno] [PATCH v4 14/18] arm64: dts: qcom: sc7280: Add compat qcom, sc7280-dsi-ctrl

2022-11-26 Thread Dmitry Baryshkov

On 25/11/2022 14:36, Bryan O'Donoghue wrote:

Add silicon specific compatible qcom,sc7280-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sc7280 against the yaml documentation.

Reviewed-by: Douglas Anderson 
Signed-off-by: Bryan O'Donoghue 
---
  arch/arm64/boot/dts/qcom/sc7280.dtsi | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)


Reviewed-by: Dmitry Baryshkov 

--
With best wishes
Dmitry



Re: [Freedreno] [PATCH v4 13/18] arm64: dts: qcom: sc7180: Add compat qcom, sc7180-dsi-ctrl

2022-11-26 Thread Dmitry Baryshkov

On 25/11/2022 14:36, Bryan O'Donoghue wrote:

Add silicon specific compatible qcom,sc7180-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for sc7180 against the yaml documentation.

Reviewed-by: Douglas Anderson 
Signed-off-by: Bryan O'Donoghue 
---
  arch/arm64/boot/dts/qcom/sc7180.dtsi | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)



Reviewed-by: Dmitry Baryshkov 

--
With best wishes
Dmitry



Re: [Freedreno] [PATCH v4 12/18] arm64: dts: qcom: msm8996: Add compat qcom, msm8996-dsi-ctrl

2022-11-26 Thread Dmitry Baryshkov

On 25/11/2022 14:36, Bryan O'Donoghue wrote:

Add silicon specific compatible qcom,msm8996-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8996 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
  arch/arm64/boot/dts/qcom/msm8996.dtsi | 6 --
  1 file changed, 4 insertions(+), 2 deletions(-)


Reviewed-by: Dmitry Baryshkov 

--
With best wishes
Dmitry



Re: [Freedreno] [PATCH v4 11/18] arm64: dts: qcom: msm8916: Add compat qcom, msm8916-dsi-ctrl

2022-11-26 Thread Dmitry Baryshkov

On 25/11/2022 14:36, Bryan O'Donoghue wrote:

Add silicon specific compatible qcom,msm8916-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8916 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
  arch/arm64/boot/dts/qcom/msm8916.dtsi | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)


Reviewed-by: Dmitry Baryshkov 

--
With best wishes
Dmitry



Re: [Freedreno] [PATCH v4 10/18] ARM: dts: qcom: msm8974: Add compat qcom, msm8974-dsi-ctrl

2022-11-26 Thread Dmitry Baryshkov

On 25/11/2022 14:36, Bryan O'Donoghue wrote:

Add silicon specific compatible qcom,msm8974-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for msm8974 against the yaml documentation.

Signed-off-by: Bryan O'Donoghue 
---
  arch/arm/boot/dts/qcom-msm8974.dtsi | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)


Reviewed-by: Dmitry Baryshkov 

--
With best wishes
Dmitry



Re: [Freedreno] [PATCH v4 09/18] ARM: dts: qcom: apq8064: add compat qcom, apq8064-dsi-ctrl

2022-11-26 Thread Dmitry Baryshkov

On 25/11/2022 14:36, Bryan O'Donoghue wrote:

Append silicon specific compatible qcom,apq8064-dsi-ctrl to the
mdss-dsi-ctrl block. This allows us to differentiate the specific bindings
for apq8064 against the yaml documentation.

Reviewed-by: David Heidelberg 
Signed-off-by: Bryan O'Donoghue 
---
  arch/arm/boot/dts/qcom-apq8064.dtsi | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)


Reviewed-by: Dmitry Baryshkov 

--
With best wishes
Dmitry



Re: [Freedreno] [PATCH v4 06/18] dt-bindings: msm: dsi-controller-main: Fix description of core clock

2022-11-26 Thread Dmitry Baryshkov

On 25/11/2022 14:36, Bryan O'Donoghue wrote:

There's a typo in describing the core clock as an 'escape' clock. The
accurate description is 'core'.

Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
Reviewed-by: Dmitry Baryshkov 
Acked-by: Krzysztof Kozlowski 
Signed-off-by: Bryan O'Donoghue 


In the next spin please move this patch after first two fixes, so all 
three of them can be picked into -fixes.



---
  .../devicetree/bindings/display/msm/dsi-controller-main.yaml| 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 88aac7d33555c..0c09b9230b7f5 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -40,7 +40,7 @@ properties:
- description: Display byte clock
- description: Display byte interface clock
- description: Display pixel clock
-  - description: Display escape clock
+  - description: Display core clock
- description: Display AHB clock
- description: Display AXI clock
  


--
With best wishes
Dmitry



Re: [Freedreno] [PATCH v4 04/18] dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC

2022-11-26 Thread Dmitry Baryshkov

On 25/11/2022 14:36, Bryan O'Donoghue wrote:

Currently we do not differentiate between the various users of the
qcom,mdss-dsi-ctrl. The driver is flexible enough to operate from one
compatible string but, the hardware does have some significant differences
in the number of clocks.

To facilitate documenting the clocks add the following compatible strings

- qcom,apq8064-dsi-ctrl
- qcom,msm8916-dsi-ctrl
- qcom,msm8974-dsi-ctrl
- qcom,msm8996-dsi-ctrl
- qcom,sc7180-dsi-ctrl
- qcom,sc7280-dsi-ctrl
- qcom,sdm630-dsi-ctrl
- qcom,sdm660-dsi-ctrl
- qcom,sdm845-dsi-ctrl
- qcom,sm8250-dsi-ctrl

Each SoC dtsi should declare "qcom,socname-dsi-ctrl", "qcom,mdss-dsi-ctrl";

Signed-off-by: Bryan O'Donoghue 
---
  .../display/msm/dsi-controller-main.yaml  | 19 +++
  1 file changed, 15 insertions(+), 4 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index 67d08dc338925..0cd2079137b02 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -14,9 +14,20 @@ allOf:
  
  properties:

compatible:
-enum:
-  - qcom,mdss-dsi-ctrl
-  - qcom,qcm2290-dsi-ctrl
+items:
+  - enum:
+  - qcom,apq8064-dsi-ctrl
+  - qcom,msm8916-dsi-ctrl
+  - qcom,msm8974-dsi-ctrl
+  - qcom,msm8996-dsi-ctrl
+  - qcom,qcm2290-dsi-ctrl
+  - qcom,sc7180-dsi-ctrl
+  - qcom,sc7280-dsi-ctrl
+  - qcom,sdm630-dsi-ctrl
+  - qcom,sdm660-dsi-ctrl
+  - qcom,sdm845-dsi-ctrl
+  - qcom,sm8250-dsi-ctrl
+  - const: qcom,mdss-dsi-ctrl
  
reg:

  maxItems: 1
@@ -146,7 +157,7 @@ examples:
   #include 
  
   dsi@ae94000 {

-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";


Other examples (from qcom,SOC-mdss.yaml) also must be updated.


 reg = <0x0ae94000 0x400>;
 reg-names = "dsi_ctrl";
  


--
With best wishes
Dmitry



Re: [Freedreno] [PATCH v4 03/18] dt-bindings: msm: dsi-controller-main: Rename qcom, dsi-ctrl-6g-qcm2290 to qcom, qcm2290-dsi-ctrl

2022-11-26 Thread Dmitry Baryshkov

On 25/11/2022 14:36, Bryan O'Donoghue wrote:

We will add in a number of compat strings to dsi-controller-main.yaml in
the format "qcom,socname-dsi-ctrl" convert the currently unused
qcom,dsi-ctrl-6g-qcm2290 to qcom,qcm2290-dsi-ctrl.

Signed-off-by: Bryan O'Donoghue 


I'd say, as you are going to introduce new bindings using two compat 
strings, just leave this binding as is, marking it as deprecated.



---
  .../devicetree/bindings/display/msm/dsi-controller-main.yaml| 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index cf782c5f5bdb0..67d08dc338925 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -16,7 +16,7 @@ properties:
compatible:
  enum:
- qcom,mdss-dsi-ctrl
-  - qcom,dsi-ctrl-6g-qcm2290
+  - qcom,qcm2290-dsi-ctrl
  
reg:

  maxItems: 1


--
With best wishes
Dmitry



Re: [Freedreno] [PATCH v3 08/18] dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in

2022-11-26 Thread Bryan O'Donoghue

On 26/11/2022 14:46, Krzysztof Kozlowski wrote:

1. vdd->VDD


Hmm.

I honestly didn't pick that up from your previous comment but, np.

---
bod



Re: [Freedreno] [PATCH v3 05/18] dt-bindings: msm: dsi-controller-main: Document clocks on a per compatible basis

2022-11-26 Thread Bryan O'Donoghue

On 26/11/2022 14:44, Krzysztof Kozlowski wrote:

On 24/11/2022 01:47, Bryan O'Donoghue wrote:

Each compatible has a different set of clocks which are associated with it.
Add in the list of clocks for each compatible.

Signed-off-by: Bryan O'Donoghue 
---
  .../display/msm/dsi-controller-main.yaml  | 154 --
  1 file changed, 143 insertions(+), 11 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
index c4da717d2..88aac7d33555c 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
@@ -9,9 +9,6 @@ title: Qualcomm Display DSI controller
  maintainers:
- Krishna Manikandan 
  
-allOf:

-  - $ref: "../dsi-controller.yaml#"
-
  properties:
compatible:
  items:
@@ -48,13 +45,8 @@ properties:
- description: Display AXI clock
  
clock-names:

-items:
-  - const: byte
-  - const: byte_intf
-  - const: pixel
-  - const: core
-  - const: iface
-  - const: bus
+minItems: 6
+maxItems: 9
  
phys:

  maxItems: 1
@@ -147,6 +139,146 @@ required:
- assigned-clock-parents
- ports
  
+allOf:

+  - $ref: "../dsi-controller.yaml#"
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,apq8064-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 7
+clock-names:
+  items:
+- const: iface
+- const: bus
+- const: core_mmss
+- const: src
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8916-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 6
+clock-names:
+  items:
+- const: mdp_core
+- const: iface
+- const: bus
+- const: byte
+- const: pixel
+- const: core
+
+  - if:
+  properties:
+compatible:
+  contains:
+enum:
+  - qcom,msm8974-dsi-ctrl
+then:
+  properties:
+clocks:
+  maxItems: 3
+clock-names:
+  items:
+- const: iface
+- const: bus
+- const: vsync


minItems are 6, so does it actually work?


Hmm.

I ran this using a recent version of dt-schema from github

DT_DOC_CHECKER=~/Development/qualcomm/dt-schema/tools/dt-doc-validate
DT_EXTRACT_EX=~/Development/qualcomm/dt-schema/tools/dt-extract-example
DT_MK_SCHEMA=~/Development/qualcomm/dt-schema/tools/dt-mk-schema
DT_CHECKER=~/Development/qualcomm/dt-schema/tools/dt-validate

make DT_CHECKER_FLAGS=-m dt_binding_check O=$BUILDDIR 
DT_DOC_CHECKER=$DT_DOC_CHECKER DT_EXTRACT_EX=$DT_EXTRACT_EX 
DT_MK_SCHEMA=$DT_MK_SCHEMA DT_CHECKER=$DT_CHECKER 
DT_SCHEMA_FILES=display/msm/dsi-controller-main.yaml -j `nproc`


Neither of these throw an warning in my compile log

arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts:&dsi0
arch/arm/boot/dts/qcom-msm8974pro-samsung-klte.dts:&dsi0

thanks for spotting


-   compatible = "qcom,mdss-dsi-ctrl";
+   compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";




already dropped in v4



Re: [Freedreno] [PATCH v3 03/18] dt-bindings: msm: dsi-controller-main: Rename qcom, dsi-ctrl-6g-qcm2290 to qcom, qcm2290-dsi-ctrl

2022-11-26 Thread Bryan O'Donoghue

On 26/11/2022 14:36, Krzysztof Kozlowski wrote:

That's a bit surprising. Did we discuss it? It breaks the ABI, so I
doubt (driver/bindings were already upstreamed).

Best regards,
Krzysztof


We did discuss it but, apparently didn't grep it.

I'll drop this


Re: [Freedreno] [PATCH v3 08/18] dt-bindings: msm: dsi-controller-main: Add vdd* descriptions back in

2022-11-26 Thread Krzysztof Kozlowski
On 24/11/2022 01:47, Bryan O'Donoghue wrote:
> When converting from .txt to .yaml we didn't include descriptions for the
> existing regulator supplies.
> 
> - vdd
> - vdda
> - vddio
> 
> Add those descriptions into the yaml now as they were prior to the
> conversion. In the .txt description we marked these regulators as required,
> however, that requirement appears to have been in error.
> 
> Taking the example of sc7180-trogdor-wormdingler.dtsi. The avdd and avee
> come from GPIO controlled external regulators, not the SoC and in this case
> there's no need for vddio to power an I/O bus. Similarly the regulators for
> the LCD are controlled by the panel driver not by the dsi-ctrl driver.
> 
> It would be possible to connect a different type of panel to the DSI bus
> here in which case we may or may not want to make use of vdd, vdda or
> vddio.
> 
> This is also the case for older chipsets like apq8064, msm8916 etc the vdd*
> regulators in the dsi-ctrl block are helpers not dependencies.
> 
> Add the description of vdd, vdda and vddio back in for the existing
> upstream dts where vdd, vdda or vddio are already declared but, don't
> declare those regulators required - they are not SoC requirements.
> 
> Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI 
> bindings")
> Signed-off-by: Bryan O'Donoghue 
> ---
>  .../bindings/display/msm/dsi-controller-main.yaml| 12 
>  1 file changed, 12 insertions(+)
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
> b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> index 0fbb0c04f4b06..bcbcbdca1a78a 100644
> --- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> @@ -133,6 +133,18 @@ properties:
>- port@0
>- port@1
>  
> +  vdd-supply:
> +description:
> +  vdd regulator device node

I see my comment was not really implemented. I asked:
1. vdd->VDD
2. Drop "device node". It's not a device node. It's a VDD regulator.


Best regards,
Krzysztof



Re: [Freedreno] [PATCH v3 05/18] dt-bindings: msm: dsi-controller-main: Document clocks on a per compatible basis

2022-11-26 Thread Krzysztof Kozlowski
On 24/11/2022 01:47, Bryan O'Donoghue wrote:
> Each compatible has a different set of clocks which are associated with it.
> Add in the list of clocks for each compatible.
> 
> Signed-off-by: Bryan O'Donoghue 
> ---
>  .../display/msm/dsi-controller-main.yaml  | 154 --
>  1 file changed, 143 insertions(+), 11 deletions(-)
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
> b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> index c4da717d2..88aac7d33555c 100644
> --- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> @@ -9,9 +9,6 @@ title: Qualcomm Display DSI controller
>  maintainers:
>- Krishna Manikandan 
>  
> -allOf:
> -  - $ref: "../dsi-controller.yaml#"
> -
>  properties:
>compatible:
>  items:
> @@ -48,13 +45,8 @@ properties:
>- description: Display AXI clock
>  
>clock-names:
> -items:
> -  - const: byte
> -  - const: byte_intf
> -  - const: pixel
> -  - const: core
> -  - const: iface
> -  - const: bus
> +minItems: 6
> +maxItems: 9
>  
>phys:
>  maxItems: 1
> @@ -147,6 +139,146 @@ required:
>- assigned-clock-parents
>- ports
>  
> +allOf:
> +  - $ref: "../dsi-controller.yaml#"
> +  - if:
> +  properties:
> +compatible:
> +  contains:
> +enum:
> +  - qcom,apq8064-dsi-ctrl
> +then:
> +  properties:
> +clocks:
> +  maxItems: 7
> +clock-names:
> +  items:
> +- const: iface
> +- const: bus
> +- const: core_mmss
> +- const: src
> +- const: byte
> +- const: pixel
> +- const: core
> +
> +  - if:
> +  properties:
> +compatible:
> +  contains:
> +enum:
> +  - qcom,msm8916-dsi-ctrl
> +then:
> +  properties:
> +clocks:
> +  maxItems: 6
> +clock-names:
> +  items:
> +- const: mdp_core
> +- const: iface
> +- const: bus
> +- const: byte
> +- const: pixel
> +- const: core
> +
> +  - if:
> +  properties:
> +compatible:
> +  contains:
> +enum:
> +  - qcom,msm8974-dsi-ctrl
> +then:
> +  properties:
> +clocks:
> +  maxItems: 3
> +clock-names:
> +  items:
> +- const: iface
> +- const: bus
> +- const: vsync

minItems are 6, so does it actually work?

> +
> +  - if:
> +  properties:
> +compatible:
> +  contains:
> +enum:
> +  - qcom,msm8996-dsi-ctrl
> +then:
> +  properties:
> +clocks:
> +  maxItems: 7
> +clock-names:
> +  items:
> +- const: mdp_core
> +- const: byte
> +- const: iface
> +- const: bus
> +- const: core_mmss
> +- const: pixel
> +- const: core
> +
> +  - if:
> +  properties:
> +compatible:
> +  contains:
> +enum:
> +  - qcom,sc7180-dsi-ctrl
> +  - qcom,sc7280-dsi-ctrl
> +  - qcom,sm8250-dsi-ctrl
> +then:
> +  properties:
> +clocks:
> +  maxItems: 6
> +clock-names:
> +  items:
> +- const: byte
> +- const: byte_intf
> +- const: pixel
> +- const: core
> +- const: iface
> +- const: bus
> +
> +  - if:
> +  properties:
> +compatible:
> +  contains:
> +enum:
> +  - qcom,sdm630-dsi-ctrl
> +  - qcom,sdm660-dsi-ctrl
> +then:
> +  properties:
> +clocks:
> +  maxItems: 9
> +clock-names:
> +  items:
> +- const: mdp_core
> +- const: byte
> +- const: byte_intf
> +- const: mnoc
> +- const: iface
> +- const: bus
> +- const: core_mmss
> +- const: pixel
> +- const: core
> +
> +  - if:
> +  properties:
> +compatible:
> +  contains:
> +enum:
> +  - qcom,sdm845-dsi-ctrl
> +then:
> +  properties:
> +clocks:
> +  maxItems: 6
> +clock-names:
> +  items:
> +- const: byte
> +- const: byte_intf
> +- const: pixel
> +- const: core
> +- const: iface
> +- const: bus
> +
>  additionalProperties: false
>  
>  examples:
> @@ -157,7 +289,7 @@ examples:
>   #include 
>  
>   dsi@ae94000 {
> -   compatible = "qcom,mdss-dsi-ctrl";
> +   compatible = "qcom,sc7180-dsi-ctrl", "qcom,mdss-dsi-ctrl";

Not related to this patch.


Be

Re: [Freedreno] [PATCH v3 07/18] dt-bindings: msm: dsi-controller-main: Fix clock declarations

2022-11-26 Thread Krzysztof Kozlowski
On 24/11/2022 01:47, Bryan O'Donoghue wrote:
> When converting from .txt to .yaml dt-binding descriptions we appear to
> have missed some of the previous detail on the number and names of
> permissible clocks.
> 
> Fix this by listing the clock descriptions against the clock names at a
> high level.
> 
> Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI 
> bindings")
> Signed-off-by: Bryan O'Donoghue 
> ---
>  .../display/msm/dsi-controller-main.yaml  | 20 ---
>  1 file changed, 13 insertions(+), 7 deletions(-)
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
> b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> index 0c09b9230b7f5..0fbb0c04f4b06 100644
> --- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> @@ -36,13 +36,19 @@ properties:
>  maxItems: 1
>  
>clocks:
> -items:
> -  - description: Display byte clock
> -  - description: Display byte interface clock
> -  - description: Display pixel clock
> -  - description: Display core clock
> -  - description: Display AHB clock
> -  - description: Display AXI clock
> +description: |
> +  Several clocks are used, depending on the variant. Typical ones are::
> +   - bus:: Display AHB clock.
> +   - byte:: Display byte clock.
> +   - byte_intf:: Display byte interface clock.
> +   - core:: Display core clock.
> +   - core_mss:: Core MultiMedia SubSystem clock.
> +   - iface:: Display AXI clock.
> +   - mdp_core:: MDP Core clock.
> +   - mnoc:: MNOC clock
> +   - pixel:: Display pixel clock.
> +minItems: 6
> +maxItems: 9

I don't understand why this is separate from your previous patch. At
patch #5 this part become wrong, so it cannot be separate, obviously.
IOW, Your patch #5 is buggy without this piece.

Best regards,
Krzysztof



Re: [Freedreno] [PATCH v3 04/18] dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC

2022-11-26 Thread Krzysztof Kozlowski
On 24/11/2022 01:47, Bryan O'Donoghue wrote:
> Currently we do not differentiate between the various users of the
> qcom,mdss-dsi-ctrl. The driver is flexible enough to operate from one
> compatible string but, the hardware does have some significant differences
> in the number of clocks.
> 
> To facilitate documenting the clocks add the following compatible strings
> 
> - qcom,apq8064-dsi-ctrl
> - qcom,msm8916-dsi-ctrl
> - qcom,msm8974-dsi-ctrl
> - qcom,msm8996-dsi-ctrl
> - qcom,sc7180-dsi-ctrl
> - qcom,sc7280-dsi-ctrl
> - qcom,sdm630-dsi-ctrl
> - qcom,sdm660-dsi-ctrl
> - qcom,sdm845-dsi-ctrl
> - qcom,sm8250-dsi-ctrl
> 
> Each SoC dtsi should declare "qcom,socname-dsi-ctrl", "qcom,mdss-dsi-ctrl";

You need to test the bindings before sending them. Such change needs
updates in examples.

> 
> Signed-off-by: Bryan O'Donoghue 
> ---
>  .../display/msm/dsi-controller-main.yaml| 17 ++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
> b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> index 67d08dc338925..c4da717d2 100644
> --- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> @@ -14,9 +14,20 @@ allOf:
>  
>  properties:
>compatible:
> -enum:
> -  - qcom,mdss-dsi-ctrl
> -  - qcom,qcm2290-dsi-ctrl

You need to mention changes to existing compatibles in the commit msg.

> +items:
> +  - enum:
> +  - qcom,apq8064-dsi-ctrl
> +  - qcom,msm8916-dsi-ctrl
> +  - qcom,msm8974-dsi-ctrl
> +  - qcom,msm8996-dsi-ctrl
> +  - qcom,qcm2290-dsi-ctrl


Best regards,
Krzysztof



Re: [Freedreno] [PATCH v3 03/18] dt-bindings: msm: dsi-controller-main: Rename qcom, dsi-ctrl-6g-qcm2290 to qcom, qcm2290-dsi-ctrl

2022-11-26 Thread Krzysztof Kozlowski
On 24/11/2022 01:47, Bryan O'Donoghue wrote:
> We will add in a number of compat strings to dsi-controller-main.yaml in
> the format "qcom,socname-dsi-ctrl" convert the currently unused
> qcom,dsi-ctrl-6g-qcm2290 to qcom,qcm2290-dsi-ctrl.

It is used: drivers/gpu/drm/msm/dsi/dsi.c

> 
> Signed-off-by: Bryan O'Donoghue 
> ---
>  .../devicetree/bindings/display/msm/dsi-controller-main.yaml| 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml 
> b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> index cf782c5f5bdb0..67d08dc338925 100644
> --- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
> @@ -16,7 +16,7 @@ properties:
>compatible:
>  enum:
>- qcom,mdss-dsi-ctrl
> -  - qcom,dsi-ctrl-6g-qcm2290
> +  - qcom,qcm2290-dsi-ctrl

That's a bit surprising. Did we discuss it? It breaks the ABI, so I
doubt (driver/bindings were already upstreamed).

Best regards,
Krzysztof



[Freedreno] [pull] drm/msm: drm-msm-display-for-6.2

2022-11-26 Thread Dmitry Baryshkov
Hi Dave,

As agreed with Rob Clark, a pull request for the non-GPU part of the drm/msm 
driver. Summary below.

The following changes since commit 7f7a942c0a338c4a2a7b359bdb2b68e9896122ec:

  Merge tag 'drm-next-20221025' of git://linuxtv.org/pinchartl/media into 
drm-next (2022-10-27 14:44:15 +1000)

are available in the Git repository at:

  https://gitlab.freedesktop.org/lumag/msm.git tags/drm-msm-display-for-6.2

for you to fetch changes up to 8d1d17d47eaebe4466459846d07e4ba8953fa585:

  Merge branches 'msm-next-lumag-core', 'msm-next-lumag-dpu', 
'msm-next-lumag-dp', 'msm-next-lumag-dsi', 'msm-next-lumag-hdmi' and 
'msm-next-lumag-mdp5' into msm-next-lumag (2022-11-26 12:06:29 +0200)


drm/msm updates for 6.2

Core:
- MSM_INFO_GET_FLAGS support
- Cleaned up MSM IOMMU wrapper code

DPU:
- Added support for XR30 and P010 image formats
- Reworked MDSS/DPU schema, added SM8250 MDSS bindings
- Added Qualcomm SM6115 support

DP:
- Dropped unsane sanity checks

DSI:
- Fix calculation of DSC pps payload

DSI PHY:
- DSI PHY support for QCM2290

HDMI:
- Reworked dev init path


Adam Skladowski (2):
  dt-bindings: display/msm: add support for SM6115
  drm/msm/disp/dpu1: add support for display on SM6115

Bryan O'Donoghue (1):
  dt-bindings: msm: dsi-controller-main: Drop redundant phy-names

Dan Carpenter (1):
  drm/msm/hdmi: remove unnecessary NULL check

Dmitry Baryshkov (25):
  Merge remote-tracking branch 'msm/msm-fixes' into HEAD
  drm/msm: less magic numbers in msm_mdss_enable
  drm/msm/mdp5: stop overriding drvdata
  dt-bindings: display/msm: split qcom, mdss bindings
  dt-bindings: display/msm: add gcc-bus clock to dpu-smd845
  dt-bindings: display/msm: add interconnects property to qcom, mdss-smd845
  dt-bindings: display/msm: move common DPU properties to dpu-common.yaml
  dt-bindings: display/msm: move common MDSS properties to mdss-common.yaml
  dt-bindings: display/msm: split dpu-sc7180 into DPU and MDSS parts
  dt-bindings: display/msm: split dpu-sc7280 into DPU and MDSS parts
  dt-bindings: display/msm: split dpu-sdm845 into DPU and MDSS parts
  dt-bindings: display/msm: split dpu-msm8998 into DPU and MDSS parts
  dt-bindings: display/msm: split dpu-qcm2290 into DPU and MDSS parts
  dt-bindings: display/msm: add missing device nodes to mdss-* schemas
  dt-bindings: display/msm: add support for the display on SM8250
  drm/msm/hdmi: use devres helper for runtime PM management
  drm/msm/hdmi: drop constant resource names from platform config
  drm/msm: move domain allocation into msm_iommu_new()
  drm/msm: remove duplicated code from a6xx_create_address_space
  drm/msm/hdmi: move resource allocation to probe function
  drm/msm/hdmi: don't take extra reference on PHY device
  drm/msm/hdmi: move msm_hdmi_get_phy() to msm_hdmi_dev_probe()
  dt-bindings: display/msm/dsi-controller-main: allow defining opp-table
  drm/msm/mdp5: fix reading hw revision on db410c platform
  Merge branches 'msm-next-lumag-core', 'msm-next-lumag-dpu', 
'msm-next-lumag-dp', 'msm-next-lumag-dsi', 'msm-next-lumag-hdmi' and 
'msm-next-lumag-mdp5' into msm-next-lumag

Jessica Zhang (2):
  drm/msm/dpu: Add support for XR30 format
  drm/msm/dpu: Add support for P010 format

Johan Hovold (2):
  drm/msm/dp: drop modeset sanity checks
  drm/msm/dsi: drop modeset sanity checks

Kuogee Hsieh (2):
  drm/msm/dp: replace variable err with len at dp_aux_link_power_up()
  drm/msm/dp: retry 3 times if set sink to D0 poweer state failed

Liu Shixin (1):
  drm/msm/dpu: use DEFINE_SHOW_ATTRIBUTE to simplify dpu_regset32

Loic Poulain (2):
  dt-bindings: display/msm: Add QCM2290 DSI phy
  drm/msm/dsi: Add phy configuration for QCM2290

Marijn Suijten (11):
  drm/msm/dpu1: Account for DSC's bits_per_pixel having 4 fractional bits
  drm/msm/dsi: Remove useless math in DSC calculations
  drm/msm/dsi: Remove repeated calculation of slice_per_intf
  drm/msm/dsi: Use DIV_ROUND_UP instead of conditional increment on modulo
  drm/msm/dsi: Reuse earlier computed dsc->slice_chunk_size
  drm/msm/dsi: Appropriately set dsc->mux_word_size based on bpc
  drm/msm/dsi: Migrate to drm_dsc_compute_rc_parameters()
  drm/msm/dsi: Account for DSC's bits_per_pixel having 4 fractional bits
  drm/msm/dsi: Disallow 8 BPC DSC configuration for alternative BPC values
  drm/msm/dpu1: Account for DSC's bits_per_pixel having 4 fractional bits
  drm/msm/dsi: Prevent signed BPG offsets from bleeding into adjacent bits

Rob Clark (1):
  drm/msm: Add MSM_INFO_GET_FLAGS

Robert Foss (1):
  drm/msm/dpu: Refactor sc7280_pp location

 .../bindings/display/msm/dpu-common.yaml   |  52 +++
 .../bindings/display/msm/dpu-msm8998.yaml  | 223 ---