Fix up Qualcomm DSI bindings
Subsystems (6)
v3 cover Fix up Qualcomm DSI bindings
v2 -> v3:
- Deprecate "qcom,mdss-dsi-ctrl" correctly instead of removing it [1/2]
- Remove the note about separate driver logic, as it's gone now [2/2]
Depends on:
https://lore.kernel.org/linux-arm-msm/[email protected]/
Link to v2:
https://lore.kernel.org/linux-arm-msm/[email protected]/
---
Konrad Dybcio (2):
dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible
dt-bindings: display: msm: sm6115-mdss: Fix DSI compatible
.../devicetree/bindings/display/msm/dsi-controller-main.yaml | 2 +- .../devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-)
---
base-commit: 9a33780f72f64c1cd151d84a9959f58a13b0c970
change-id: 20230304-topic-dsi_fixup-ecaf0bd3b767
Best regards,
Signature · 1 line
Konrad Dybcio <[email protected]>
PATCH v3 1/2 dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible
The point of the previous cleanup was to disallow "qcom,mdss-dsi-ctrl" alone. This however didn't quite work out and the property became undocumented instead of deprecated. Fix that.
--- Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml +1 -1
@@ -35,7 +35,7 @@ properties: - items: - enum: - qcom,dsi-ctrl-6g-qcm2290 - - const: qcom,mdss-dsi-ctrl + - qcom,mdss-dsi-ctrl # This should always come with an SoC-specific compatible deprecated: true reg:
Signature · 1 line
2.39.2
Re: [PATCH v3 1/2] dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible
Quoted 16 lines · Konrad Dybcio
The point of the previous cleanup was to disallow "qcom,mdss-dsi-ctrl" alone. This however didn't quite work out and the property became undocumented instead of deprecated. Fix that.
Fixes 0c0f65c6dd44 ("dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC")Signed-off-by Konrad Dybcio <[email protected]>--- Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml +0
-0
Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml properties: · line 41
Quoted 8 lines
Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml +1
-1@@ -35,7 +35,7 @@ properties: - items: - enum: - qcom,dsi-ctrl-6g-qcm2290 - - const: qcom,mdss-dsi-ctrl + - qcom,mdss-dsi-ctrl # This should always come with an SoC-specific compatible deprecated: true reg:
This change would make compatible = "qcom,dsi-ctrl-6g-qcm2290", "qcom,mdss-dsi-ctrl"; break though
Take this example, I'm going to use 8916 because its easy.
If we apply your change to dsi-controller-main.yaml
Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml +1 -1
@@ -34,7 +34,7 @@ properties: - items: - enum: - dsi-ctrl-6g-qcm2290 - - const: qcom,mdss-dsi-ctrl + - qcom,mdss-dsi-ctrl deprecated: true reg:
and then make 8916 == compatible = "qcom,dsi-ctrl-6g-qcm2290", "qcom,mdss-dsi-ctrl";
arch/arm64/boot/dts/qcom/msm8916.dtsi +1 -1
@@ -1094,7 +1094,7 @@ mdp5_intf1_out: endpoint { }; dsi0: dsi@1a98000 { - compatible = "qcom,msm8916-dsi-ctrl", + compatible = "dsi-ctrl-6g-qcm2290", "qcom,mdss-dsi-ctrl"; reg = <0x01a98000 0x25c>; reg-names = "dsi_ctrl";
arch/arm64/boot/dts/qcom/apq8016-sbc.dtb: dsi@1a98000: compatible: 'oneOf' conditional failed, one must be fixed:
['dsi-ctrl-6g-qcm2290', 'qcom,mdss-dsi-ctrl'] is too long
so compatible = "qcom,dsi-ctrl-6g-qcm2290", "qcom,mdss-dsi-ctrl"; is now invalid, not deprecated.
This change also makes compatible = "qcom,dsi-ctrl-6g-qcm2290" or compatible = "qcom,mdss-dsi-ctrl" standalone valid compatible which is again not what we want.
- enum:
- qcom,dsi-ctrl-6g-qcm2290
- qcom,mdss-dsi-ctrl
means either "qcom,dsi-ctrl-6g-qcm2290" or "qcom,mdss-dsi-ctrl" are valid compat strings...
As an example if you apply your change and then change the msm8916.dtsi to the below
Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml +1 -1
@@ -34,7 +34,7 @@ properties: - items: - enum: - dsi-ctrl-6g-qcm2290 - - const: qcom,mdss-dsi-ctrl + - qcom,mdss-dsi-ctrl deprecated: true reg:
arch/arm64/boot/dts/qcom/msm8916.dtsi +1 -2
@@ -1094,8 +1094,7 @@ mdp5_intf1_out: endpoint { }; dsi0: dsi@1a98000 { - compatible = "qcom,msm8916-dsi-ctrl", - "qcom,mdss-dsi-ctrl"; + compatible = "qcom,mdss-dsi-ctrl"; reg = <0x01a98000 0x25c>; reg-names = "dsi_ctrl";
Then test it with
make O=$BUILDDIR DT_DOC_CHECKER=$DT_DOC_CHECKER DT_EXTRACT_EX=$DT_EXTRACT_EX DT_MK_SCHEMA=$DT_MK_SCHEMA DT_CHECKER=$DT_CHECKER CHECKER_FLAGS=-W=1 CHECK_DTBS=y qcom/apq8016-sbc.dtb
you'll see no error. However if you just do this
arch/arm64/boot/dts/qcom/msm8916.dtsi +1 -2
@@ -1094,8 +1094,7 @@ mdp5_intf1_out: endpoint { }; dsi0: dsi@1a98000 { - compatible = "qcom,msm8916-dsi-ctrl", - "qcom,mdss-dsi-ctrl"; + compatible = "qcom,mdss-dsi-ctrl"; reg = <0x01a98000 0x25c>; reg-names = "dsi_ctrl";
and run the same test you get
apq8016-sbc.dtb: dsi@1a98000: compatible: 'oneOf' conditional failed, one must be fixed:
['qcom,mdss-dsi-ctrl'] is too short 'qcom,mdss-dsi-ctrl' is not one of ['qcom,apq8064-dsi-ctrl',
'qcom,msm8916-dsi-ctrl', 'qcom,msm8953-dsi-ctrl', 'qcom,msm8974-dsi-ctrl', 'qcom,msm8996-dsi-ctrl', 'qcom,msm8998-dsi-ctrl', 'qcom,qcm2290-dsi-ctrl', 'qcom,sc7180-dsi-ctrl', 'qcom,sc7280-dsi-ctrl', 'qcom,sdm660-dsi-ctrl', 'qcom,sdm845-dsi-ctrl', 'qcom,sm8150-dsi-ctrl', 'qcom,sm8250-dsi-ctrl', 'qcom,sm8350-dsi-ctrl', 'qcom,sm8450-dsi-ctrl', 'qcom,sm8550-dsi-ctrl']
---
bod
Re: [PATCH v3 1/2] dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible
Quoted 11 lines · Bryan O'Donoghue
Quoted 10 lines · Konrad Dybcio
The point of the previous cleanup was to disallow "qcom,mdss-dsi-ctrl" alone. This however didn't quite work out and the property became undocumented instead of deprecated. Fix that.
Fixes 0c0f65c6dd44 ("dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC")Signed-off-by Konrad Dybcio <[email protected]>---
Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
Quoted 5 lines
Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml +0
-0@@ -35,7 +35,7 @@ properties:Quoted 8 lines
- items:
- enum:
- qcom,dsi-ctrl-6g-qcm2290
- - const: qcom,mdss-dsi-ctrl
+ - qcom,mdss-dsi-ctrl # This should always come with an SoC-specific compatible
deprecated: true
reg:This change would make compatible = "qcom,dsi-ctrl-6g-qcm2290", "qcom,mdss-dsi-ctrl"; break though
Intended, they were never supposed to go together, as at the time before this patchset (and its stated dependency) the fallback would not be sufficient, the driver wouldn't even probe.
Quoted 35 lines
Take this example, I'm going to use 8916 because its easy.
If we apply your change to
dsi-controller-main.yamlDocumentation/devicetree/bindings/display/msm/dsi-controller-main.yaml +0
-0@@ -34,7 +34,7 @@ properties:- items:
- enum:
- dsi-ctrl-6g-qcm2290
- - const: qcom,mdss-dsi-ctrl
+ - qcom,mdss-dsi-ctrl
deprecated: truereg:
and then make 8916 == compatible = "qcom,dsi-ctrl-6g-qcm2290", "qcom,mdss-dsi-ctrl";
arch/arm64/boot/dts/qcom/msm8916.dtsi +1
-1@@ -1094,7 +1094,7 @@ mdp5_intf1_out: endpoint { }; dsi0: dsi@1a98000 { - compatible = "qcom,msm8916-dsi-ctrl", + compatible = "dsi-ctrl-6g-qcm2290", "qcom,mdss-dsi-ctrl"; reg = <0x01a98000 0x25c>; reg-names = "dsi_ctrl";
Quoted 5 lines
arch/arm64/boot/dts/qcom/apq8016-sbc.dtb: dsi@1a98000: compatible: 'oneOf' conditional failed, one must be fixed:
['dsi-ctrl-6g-qcm2290', 'qcom,mdss-dsi-ctrl'] is too longso compatible = "qcom,dsi-ctrl-6g-qcm2290", "qcom,mdss-dsi-ctrl"; is now invalid, not deprecated.
Intended
Quoted 2 lines
This change also makes compatible = "qcom,dsi-ctrl-6g-qcm2290" or compatible = "qcom,mdss-dsi-ctrl" standalone valid compatible which is again not what we want.
-ish, it's marked as deprecated but it is valid.
Quoted 6 lines
- enum:
- qcom,dsi-ctrl-6g-qcm2290
- qcom,mdss-dsi-ctrlmeans either "qcom,dsi-ctrl-6g-qcm2290" or "qcom,mdss-dsi-ctrl" are valid compat strings...
Correct
Quoted 32 lines
As an example if you apply your change and then change the
msm8916.dtsito the belowDocumentation/devicetree/bindings/display/msm/dsi-controller-main.yaml +0
-0@@ -34,7 +34,7 @@ properties:- items:
- enum:
- dsi-ctrl-6g-qcm2290
- - const: qcom,mdss-dsi-ctrl
+ - qcom,mdss-dsi-ctrl
deprecated: truereg:
arch/arm64/boot/dts/qcom/msm8916.dtsi +1
-2@@ -1094,8 +1094,7 @@ mdp5_intf1_out: endpoint { }; dsi0: dsi@1a98000 { - compatible = "qcom,msm8916-dsi-ctrl", - "qcom,mdss-dsi-ctrl"; + compatible = "qcom,mdss-dsi-ctrl"; reg = <0x01a98000 0x25c>; reg-names = "dsi_ctrl";Then test it with
Quoted 1 line
make O=$BUILDDIR DT_DOC_CHECKER=$DT_DOC_CHECKER DT_EXTRACT_EX=$DT_EXTRACT_EX DT_MK_SCHEMA=$DT_MK_SCHEMA DT_CHECKER=$DT_CHECKER CHECKER_FLAGS=-W=1 CHECK_DTBS=y qcom/apq8016-sbc.dtb
(sidenote: you can just do
make ARCH=.. OUT=.. CHECK_DTBS=y qcom/apq8016-sbc.dtb
the tools are picked up automatically by Kbuild)
Quoted 18 lines
you'll see no error. However if you just do this
arch/arm64/boot/dts/qcom/msm8916.dtsi +1
-2@@ -1094,8 +1094,7 @@ mdp5_intf1_out: endpoint { }; dsi0: dsi@1a98000 { - compatible = "qcom,msm8916-dsi-ctrl", - "qcom,mdss-dsi-ctrl"; + compatible = "qcom,mdss-dsi-ctrl"; reg = <0x01a98000 0x25c>; reg-names = "dsi_ctrl";
Quoted 1 line
and run the same test you get
Yes, correct. It's valid but it's deprecated, so the bindings are sane. Keep in mind there's an ABI-like aspect to this.
Konrad
Quoted 7 lines
apq8016-sbc.dtb: dsi@1a98000: compatible: 'oneOf' conditional failed, one must be fixed:
['qcom,mdss-dsi-ctrl'] is too short
'qcom,mdss-dsi-ctrl' is not one of ['qcom,apq8064-dsi-ctrl', 'qcom,msm8916-dsi-ctrl', 'qcom,msm8953-dsi-ctrl', 'qcom,msm8974-dsi-ctrl', 'qcom,msm8996-dsi-ctrl', 'qcom,msm8998-dsi-ctrl', 'qcom,qcm2290-dsi-ctrl', 'qcom,sc7180-dsi-ctrl', 'qcom,sc7280-dsi-ctrl', 'qcom,sdm660-dsi-ctrl', 'qcom,sdm845-dsi-ctrl', 'qcom,sm8150-dsi-ctrl', 'qcom,sm8250-dsi-ctrl', 'qcom,sm8350-dsi-ctrl', 'qcom,sm8450-dsi-ctrl', 'qcom,sm8550-dsi-ctrl']---
bod
Re: [PATCH v3 1/2] dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible
Quoted 17 lines · Konrad Dybcio
Quoted 17 lines
you'll see no error. However if you just do this
arch/arm64/boot/dts/qcom/msm8916.dtsi +1
-2@@ -1094,8 +1094,7 @@ mdp5_intf1_out: endpoint { }; dsi0: dsi@1a98000 { - compatible = "qcom,msm8916-dsi-ctrl", - "qcom,mdss-dsi-ctrl"; + compatible = "qcom,mdss-dsi-ctrl"; reg = <0x01a98000 0x25c>; reg-names = "dsi_ctrl";
Quoted 5 lines
Quoted 1 line
and run the same test you get
Yes, correct. It's valid but it's deprecated, so the bindings are sane. Keep in mind there's an ABI-like aspect to this.
Konrad
The _driver_ will still accept "qcom,mdss-dsi-ctrl" which is ABI compliant but, I don't see why the yaml should.
If you declare a new .dts with only "qcom,mdss-dsi-ctrl", that should throw a yaml check error.
---
bod
Bryan O'Donoghue
Reviewed-byRe: [PATCH v3 1/2] dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible
Quoted 22 lines · Bryan O'Donoghue
Quoted 21 lines · Konrad Dybcio
Quoted 17 lines
you'll see no error. However if you just do this
arch/arm64/boot/dts/qcom/msm8916.dtsi +1
-2@@ -1094,8 +1094,7 @@ mdp5_intf1_out: endpoint { }; dsi0: dsi@1a98000 { - compatible = "qcom,msm8916-dsi-ctrl", - "qcom,mdss-dsi-ctrl"; + compatible = "qcom,mdss-dsi-ctrl"; reg = <0x01a98000 0x25c>; reg-names = "dsi_ctrl";Quoted 1 line
and run the same test you get
Yes, correct. It's valid but it's deprecated, so the bindings are sane. Keep in mind there's an ABI-like aspect to this.
Quoted 8 lines
Quoted 1 line
Konrad
The _driver_ will still accept "qcom,mdss-dsi-ctrl" which is ABI compliant but, I don't see why the yaml should.
If you declare a new .dts with only "qcom,mdss-dsi-ctrl", that should throw a yaml check error.
---
bod
Actually. I agree with you, I just dislike it.
- "qcom,mdss-dsi-ctrl" <- the driver will accept this
- "qcom,dsi-ctrl-6g-qcm2290" <- the driver will not accept this
bah
Re: [PATCH v3 1/2] dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible
Quoted 25 lines · Bryan O'Donoghue
Quoted 24 lines · Bryan O'Donoghue
Quoted 22 lines · Konrad Dybcio
Quoted 17 lines
you'll see no error. However if you just do this
arch/arm64/boot/dts/qcom/msm8916.dtsi +1
-2@@ -1094,8 +1094,7 @@ mdp5_intf1_out: endpoint { }; dsi0: dsi@1a98000 { - compatible = "qcom,msm8916-dsi-ctrl", - "qcom,mdss-dsi-ctrl"; + compatible = "qcom,mdss-dsi-ctrl"; reg = <0x01a98000 0x25c>; reg-names = "dsi_ctrl";Quoted 1 line
and run the same test you get
Yes, correct. It's valid but it's deprecated, so the bindings are sane. Keep in mind there's an ABI-like aspect to this.
Konrad
Quoted 8 lines
Quoted 6 lines
The _driver_ will still accept "qcom,mdss-dsi-ctrl" which is ABI compliant but, I don't see why the yaml should.
If you declare a new .dts with only "qcom,mdss-dsi-ctrl", that should throw a yaml check error.
---
bodActually. I agree with you, I just dislike it.
If I understand correctly, you are dissatisfied with dt_binding_check not even throwing a warning when a deprecated binding is present.. I agree, that could be improved..
Konrad
Quoted 7 lines
- "qcom,mdss-dsi-ctrl" <- the driver will accept this
- "qcom,dsi-ctrl-6g-qcm2290" <- the driver will not accept thisbah
Reviewed-by Bryan O'Donoghue <[email protected]>
Re: [PATCH v3 1/2] dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible
In reply to Konrad DybcioQuoted 2 lines · Konrad Dybcio
The point of the previous cleanup was to disallow "qcom,mdss-dsi-ctrl" alone. This however didn't quite work out and the property became
s/property/compatible/
Quoted 1 line
undocumented instead of deprecated. Fix that.
Best regards,
Krzysztof
PATCH v3 2/2 dt-bindings: display: msm: sm6115-mdss: Fix DSI compatible
In reply to Konrad DybcioSince the DSI autodetection is bound to work correctly on 6115 now, switch to using the correct per-SoC + generic fallback compatible combo.
--- .../devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml +7 -1
@@ -40,7 +40,13 @@ patternProperties: type: object properties: compatible: - const: qcom,dsi-ctrl-6g-qcm2290 + oneOf: + - items: + - const: qcom,sm6115-dsi-ctrl + - const: qcom,mdss-dsi-ctrl + - description: Old binding, please don't use + deprecated: true + const: qcom,dsi-ctrl-6g-qcm2290 "^phy@[0-9a-f]+$": type: object
Signature · 1 line
2.39.2
Re: [PATCH v3 2/2] dt-bindings: display: msm: sm6115-mdss: Fix DSI compatible
Quoted 14 lines · Konrad Dybcio
Since the DSI autodetection is bound to work correctly on 6115 now, switch to using the correct per-SoC + generic fallback compatible combo.
Signed-off-by Konrad Dybcio <[email protected]>--- .../devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml +0
-0
Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml patternProperties: · line 46
Quoted 8 lines
Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml +4
-1@@ -40,7 +40,13 @@ patternProperties: type: object properties: compatible: - const: qcom,dsi-ctrl-6g-qcm2290 + oneOf: + - items: + - const: qcom,sm6115-dsi-ctrl + - const: qcom,mdss-dsi-ctrl
Does it actually work? You did not define qcom,sm6115-dsi-ctrl in dsi-controller-main?
Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml patternProperties: · line 52
Quoted 7 lines
Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml +3
-0+ - description: Old binding, please don't use + deprecated: true + const: qcom,dsi-ctrl-6g-qcm2290 "^phy@[0-9a-f]+$": type: object
Best regards,
Krzysztof
Re: [PATCH v3 2/2] dt-bindings: display: msm: sm6115-mdss: Fix DSI compatible
Quoted 10 lines · Krzysztof Kozlowski
Quoted 9 lines · Konrad Dybcio
Since the DSI autodetection is bound to work correctly on 6115 now, switch to using the correct per-SoC + generic fallback compatible combo.
Signed-off-by Konrad Dybcio <[email protected]>--- .../devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Quoted 16 lines
Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml patternProperties: · line 46
Quoted 13 lines
Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml +4
-1@@ -40,7 +40,13 @@ patternProperties: type: object properties: compatible: - const: qcom,dsi-ctrl-6g-qcm2290 + oneOf: + - items: + - const: qcom,sm6115-dsi-ctrl + - const: qcom,mdss-dsi-ctrlDoes it actually work? You did not define qcom,sm6115-dsi-ctrl in dsi-controller-main?
Check the "Depends on" in the cover letter.
Konrad
Quoted 12 lines
Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml patternProperties: · line 52
Quoted 8 lines
Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml +3
-0+ - description: Old binding, please don't use + deprecated: true + const: qcom,dsi-ctrl-6g-qcm2290 "^phy@[0-9a-f]+$": type: objectBest regards,
Krzysztof
Re: [PATCH v3 2/2] dt-bindings: display: msm: sm6115-mdss: Fix DSI compatible
Quoted 29 lines · Konrad Dybcio
Quoted 10 lines · Krzysztof Kozlowski
Quoted 9 lines · Konrad Dybcio
Since the DSI autodetection is bound to work correctly on 6115 now, switch to using the correct per-SoC + generic fallback compatible combo.
Signed-off-by Konrad Dybcio <[email protected]>--- .../devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)Quoted 16 lines
Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml patternProperties: · line 46
Quoted 13 lines
Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml +4
-1@@ -40,7 +40,13 @@ patternProperties: type: object properties: compatible: - const: qcom,dsi-ctrl-6g-qcm2290 + oneOf: + - items: + - const: qcom,sm6115-dsi-ctrl + - const: qcom,mdss-dsi-ctrlDoes it actually work? You did not define qcom,sm6115-dsi-ctrl in dsi-controller-main?
Quoted 2 lines
Check the "Depends on" in the cover letter.
Then it looks like it should be squashed with that patch. Why adding new compatible in multiple steps?
Best regards,
Krzysztof