* [PATCH v2 1/4] dt-bindings: display/msm/gpu: constrain clocks in top-level
2024-06-23 20:02 [PATCH v2 0/4] dt-bindings: display/msm/gpu: few cleanups Krzysztof Kozlowski
@ 2024-06-23 20:03 ` Krzysztof Kozlowski
2024-06-23 20:03 ` [PATCH v2 2/4] dt-bindings: display/msm/gpu: define reg-names " Krzysztof Kozlowski
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-23 20:03 UTC (permalink / raw)
To: Rob Clark, Sean Paul, Konrad Dybcio, Abhinav Kumar,
Dmitry Baryshkov, Marijn Suijten, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, devicetree, linux-kernel,
Conor Dooley, Krzysztof Kozlowski
We expect each schema with variable number of clocks, to have the widest
constrains in top-level "properties:". This is more readable and also
makes binding stricter, if there is no "if:then:" block for given
variant.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Documentation/devicetree/bindings/display/msm/gpu.yaml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/msm/gpu.yaml b/Documentation/devicetree/bindings/display/msm/gpu.yaml
index 40b5c6bd11f8..253e68d92779 100644
--- a/Documentation/devicetree/bindings/display/msm/gpu.yaml
+++ b/Documentation/devicetree/bindings/display/msm/gpu.yaml
@@ -32,9 +32,13 @@ properties:
- pattern: '^amd,imageon-200\.[0-1]$'
- const: amd,imageon
- clocks: true
+ clocks:
+ minItems: 2
+ maxItems: 7
- clock-names: true
+ clock-names:
+ minItems: 2
+ maxItems: 7
reg:
minItems: 1
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v2 2/4] dt-bindings: display/msm/gpu: define reg-names in top-level
2024-06-23 20:02 [PATCH v2 0/4] dt-bindings: display/msm/gpu: few cleanups Krzysztof Kozlowski
2024-06-23 20:03 ` [PATCH v2 1/4] dt-bindings: display/msm/gpu: constrain clocks in top-level Krzysztof Kozlowski
@ 2024-06-23 20:03 ` Krzysztof Kozlowski
2024-06-23 20:03 ` [PATCH v2 3/4] dt-bindings: display/msm/gpu: simplify compatible regex Krzysztof Kozlowski
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-23 20:03 UTC (permalink / raw)
To: Rob Clark, Sean Paul, Konrad Dybcio, Abhinav Kumar,
Dmitry Baryshkov, Marijn Suijten, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, devicetree, linux-kernel,
Conor Dooley, Krzysztof Kozlowski
All devices should (and actually do) have same order of entries, if
possible. That's the case for reg/reg-names, so define the reg-names in
top-level to enforce that.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Documentation/devicetree/bindings/display/msm/gpu.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/msm/gpu.yaml b/Documentation/devicetree/bindings/display/msm/gpu.yaml
index 253e68d92779..baea1946c65d 100644
--- a/Documentation/devicetree/bindings/display/msm/gpu.yaml
+++ b/Documentation/devicetree/bindings/display/msm/gpu.yaml
@@ -46,7 +46,10 @@ properties:
reg-names:
minItems: 1
- maxItems: 3
+ items:
+ - const: kgsl_3d0_reg_memory
+ - const: cx_mem
+ - const: cx_dbgc
interrupts:
maxItems: 1
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v2 3/4] dt-bindings: display/msm/gpu: simplify compatible regex
2024-06-23 20:02 [PATCH v2 0/4] dt-bindings: display/msm/gpu: few cleanups Krzysztof Kozlowski
2024-06-23 20:03 ` [PATCH v2 1/4] dt-bindings: display/msm/gpu: constrain clocks in top-level Krzysztof Kozlowski
2024-06-23 20:03 ` [PATCH v2 2/4] dt-bindings: display/msm/gpu: define reg-names " Krzysztof Kozlowski
@ 2024-06-23 20:03 ` Krzysztof Kozlowski
2024-06-23 20:03 ` [PATCH v2 4/4] dt-bindings: display/msm/gpu: fix the schema being not applied Krzysztof Kozlowski
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-23 20:03 UTC (permalink / raw)
To: Rob Clark, Sean Paul, Konrad Dybcio, Abhinav Kumar,
Dmitry Baryshkov, Marijn Suijten, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, devicetree, linux-kernel,
Conor Dooley, Krzysztof Kozlowski
Regex for newer Adreno compatibles can be simpler.
Suggested-by: Conor Dooley <conor@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Documentation/devicetree/bindings/display/msm/gpu.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/msm/gpu.yaml b/Documentation/devicetree/bindings/display/msm/gpu.yaml
index baea1946c65d..03aaced1abda 100644
--- a/Documentation/devicetree/bindings/display/msm/gpu.yaml
+++ b/Documentation/devicetree/bindings/display/msm/gpu.yaml
@@ -17,7 +17,7 @@ properties:
The driver is parsing the compat string for Adreno to
figure out the chip-id.
items:
- - pattern: '^qcom,adreno-[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$'
+ - pattern: '^qcom,adreno-[0-9a-f]{8}$'
- const: qcom,adreno
- description: |
The driver is parsing the compat string for Adreno to
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v2 4/4] dt-bindings: display/msm/gpu: fix the schema being not applied
2024-06-23 20:02 [PATCH v2 0/4] dt-bindings: display/msm/gpu: few cleanups Krzysztof Kozlowski
` (2 preceding siblings ...)
2024-06-23 20:03 ` [PATCH v2 3/4] dt-bindings: display/msm/gpu: simplify compatible regex Krzysztof Kozlowski
@ 2024-06-23 20:03 ` Krzysztof Kozlowski
2024-06-24 16:36 ` [PATCH v2 0/4] dt-bindings: display/msm/gpu: few cleanups Conor Dooley
2024-06-25 16:57 ` Dmitry Baryshkov
5 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-23 20:03 UTC (permalink / raw)
To: Rob Clark, Sean Paul, Konrad Dybcio, Abhinav Kumar,
Dmitry Baryshkov, Marijn Suijten, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, devicetree, linux-kernel,
Krzysztof Kozlowski
dtschema v2024.4, v2024.5 and maybe earlier do not select device nodes for
given binding validation if the schema contains compatible list with
pattern and a const fallback. This leads to binding being a no-op - not
being applied at all. Issue should be fixed in the dtschema but for now
add a work-around do the binding can be used against DTS validation.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
This will uncover issues with DTS, which is expected and fixed in:
1. Incorrect AMD compatible:
https://lore.kernel.org/linux-arm-msm/20240623193420.333735-1-krzysztof.kozlowski@linaro.org/T/#t
2. alwayson clock:
https://lore.kernel.org/linux-arm-msm/20240121194221.13513-6-a39.skl@gmail.com/
---
Documentation/devicetree/bindings/display/msm/gpu.yaml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/msm/gpu.yaml b/Documentation/devicetree/bindings/display/msm/gpu.yaml
index 03aaced1abda..6ddc72fd85b0 100644
--- a/Documentation/devicetree/bindings/display/msm/gpu.yaml
+++ b/Documentation/devicetree/bindings/display/msm/gpu.yaml
@@ -10,6 +10,18 @@ title: Adreno or Snapdragon GPUs
maintainers:
- Rob Clark <robdclark@gmail.com>
+# dtschema does not select nodes based on pattern+const, so add custom select
+# as a work-around:
+select:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,adreno
+ - amd,imageon
+ required:
+ - compatible
+
properties:
compatible:
oneOf:
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v2 0/4] dt-bindings: display/msm/gpu: few cleanups
2024-06-23 20:02 [PATCH v2 0/4] dt-bindings: display/msm/gpu: few cleanups Krzysztof Kozlowski
` (3 preceding siblings ...)
2024-06-23 20:03 ` [PATCH v2 4/4] dt-bindings: display/msm/gpu: fix the schema being not applied Krzysztof Kozlowski
@ 2024-06-24 16:36 ` Conor Dooley
2024-06-25 16:57 ` Dmitry Baryshkov
5 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2024-06-24 16:36 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Rob Clark, Sean Paul, Konrad Dybcio, Abhinav Kumar,
Dmitry Baryshkov, Marijn Suijten, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, dri-devel,
freedreno, devicetree, linux-kernel, Conor Dooley
[-- Attachment #1: Type: text/plain, Size: 334 bytes --]
On Sun, Jun 23, 2024 at 10:02:59PM +0200, Krzysztof Kozlowski wrote:
> Changes since v1:
> 1. Add tags
> 2. New patches #3 and #4
> 3. Drop previous patch "dt-bindings: display/msm/gpu: constrain
> reg/reg-names per variant", because I need to investigate more.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Cheers,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v2 0/4] dt-bindings: display/msm/gpu: few cleanups
2024-06-23 20:02 [PATCH v2 0/4] dt-bindings: display/msm/gpu: few cleanups Krzysztof Kozlowski
` (4 preceding siblings ...)
2024-06-24 16:36 ` [PATCH v2 0/4] dt-bindings: display/msm/gpu: few cleanups Conor Dooley
@ 2024-06-25 16:57 ` Dmitry Baryshkov
5 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2024-06-25 16:57 UTC (permalink / raw)
To: Rob Clark, Sean Paul, Konrad Dybcio, Abhinav Kumar,
Marijn Suijten, David Airlie, Daniel Vetter, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Krzysztof Kozlowski
Cc: linux-arm-msm, dri-devel, freedreno, devicetree, linux-kernel,
Conor Dooley, Conor Dooley
On Sun, 23 Jun 2024 22:02:59 +0200, Krzysztof Kozlowski wrote:
> Changes since v1:
> 1. Add tags
> 2. New patches #3 and #4
> 3. Drop previous patch "dt-bindings: display/msm/gpu: constrain
> reg/reg-names per variant", because I need to investigate more.
>
> v1: dt-bindings: display/msm/gpu: constrain reg/reg-names per variant
>
> [...]
Applied, thanks!
[1/4] dt-bindings: display/msm/gpu: constrain clocks in top-level
https://gitlab.freedesktop.org/lumag/msm/-/commit/d6c7c411be78
[2/4] dt-bindings: display/msm/gpu: define reg-names in top-level
https://gitlab.freedesktop.org/lumag/msm/-/commit/c808ece19640
[3/4] dt-bindings: display/msm/gpu: simplify compatible regex
https://gitlab.freedesktop.org/lumag/msm/-/commit/6d69f8d37c85
[4/4] dt-bindings: display/msm/gpu: fix the schema being not applied
https://gitlab.freedesktop.org/lumag/msm/-/commit/399af57ccca2
Best regards,
--
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
^ permalink raw reply [flat|nested] 7+ messages in thread