* [PATCH 1/3] dt-bindings: display/msm/gpu: constrain clocks in top-level
@ 2024-06-23 12:00 Krzysztof Kozlowski
2024-06-23 12:00 ` [PATCH 2/3] dt-bindings: display/msm/gpu: define reg-names " Krzysztof Kozlowski
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-23 12:00 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, linux-arm-msm, dri-devel,
freedreno, devicetree, linux-kernel
Cc: 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.
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 2/3] dt-bindings: display/msm/gpu: define reg-names in top-level
2024-06-23 12:00 [PATCH 1/3] dt-bindings: display/msm/gpu: constrain clocks in top-level Krzysztof Kozlowski
@ 2024-06-23 12:00 ` Krzysztof Kozlowski
2024-06-23 14:14 ` Conor Dooley
2024-06-23 12:00 ` [PATCH 3/3] dt-bindings: display/msm/gpu: constrain reg/reg-names per variant Krzysztof Kozlowski
2024-06-23 14:14 ` [PATCH 1/3] dt-bindings: display/msm/gpu: constrain clocks in top-level Conor Dooley
2 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-23 12:00 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, linux-arm-msm, dri-devel,
freedreno, devicetree, linux-kernel
Cc: 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.
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 3/3] dt-bindings: display/msm/gpu: constrain reg/reg-names per variant
2024-06-23 12:00 [PATCH 1/3] dt-bindings: display/msm/gpu: constrain clocks in top-level Krzysztof Kozlowski
2024-06-23 12:00 ` [PATCH 2/3] dt-bindings: display/msm/gpu: define reg-names " Krzysztof Kozlowski
@ 2024-06-23 12:00 ` Krzysztof Kozlowski
2024-06-23 14:13 ` Conor Dooley
2024-06-23 14:14 ` [PATCH 1/3] dt-bindings: display/msm/gpu: constrain clocks in top-level Conor Dooley
2 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-23 12:00 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, linux-arm-msm, dri-devel,
freedreno, devicetree, linux-kernel
Cc: Krzysztof Kozlowski
MMIO address space is known per each variant of Adreno GPU, so we can
constrain the reg/reg-names entries for each variant. There is no DTS
for A619, so that part is not accurate but could be corrected later.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
.../devicetree/bindings/display/msm/gpu.yaml | 87 +++++++++++++++++--
1 file changed, 79 insertions(+), 8 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/msm/gpu.yaml b/Documentation/devicetree/bindings/display/msm/gpu.yaml
index baea1946c65d..e83f13123fc9 100644
--- a/Documentation/devicetree/bindings/display/msm/gpu.yaml
+++ b/Documentation/devicetree/bindings/display/msm/gpu.yaml
@@ -130,6 +130,22 @@ required:
additionalProperties: false
allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ 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]$'
+ then:
+ properties:
+ reg:
+ minItems: 3
+
+ reg-names:
+ items:
+ - const: kgsl_3d0_reg_memory
+ - const: cx_mem
+ - const: cx_dbgc
+
- if:
properties:
compatible:
@@ -164,6 +180,13 @@ allOf:
minItems: 2
maxItems: 7
+ reg:
+ maxItems: 1
+
+ reg-names:
+ items:
+ - const: kgsl_3d0_reg_memory
+
required:
- clocks
- clock-names
@@ -196,11 +219,12 @@ allOf:
- const: xo
description: GPUCC clocksource clock
+ reg:
+ maxItems: 1
+
reg-names:
- minItems: 1
items:
- const: kgsl_3d0_reg_memory
- - const: cx_dbgc
required:
- clocks
@@ -217,12 +241,59 @@ allOf:
clocks: false
clock-names: false
- reg-names:
- minItems: 1
- items:
- - const: kgsl_3d0_reg_memory
- - const: cx_mem
- - const: cx_dbgc
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,adreno-640.1
+ - qcom,adreno-680.1
+ then:
+ properties:
+ reg:
+ maxItems: 1
+
+ reg-names:
+ items:
+ - const: kgsl_3d0_reg_memory
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,adreno-619.0
+ - qcom,adreno-630.2
+ then:
+ properties:
+ reg:
+ minItems: 2
+ maxItems: 2
+
+ reg-names:
+ items:
+ - const: kgsl_3d0_reg_memory
+ - const: cx_mem
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,adreno-618.0
+ - qcom,adreno-635.0
+ - qcom,adreno-690.0
+ - qcom,adreno-730.1
+ then:
+ properties:
+ reg:
+ minItems: 3
+
+ reg-names:
+ items:
+ - const: kgsl_3d0_reg_memory
+ - const: cx_mem
+ - const: cx_dbgc
examples:
- |
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] dt-bindings: display/msm/gpu: constrain reg/reg-names per variant
2024-06-23 12:00 ` [PATCH 3/3] dt-bindings: display/msm/gpu: constrain reg/reg-names per variant Krzysztof Kozlowski
@ 2024-06-23 14:13 ` Conor Dooley
2024-06-23 16:11 ` Krzysztof Kozlowski
0 siblings, 1 reply; 7+ messages in thread
From: Conor Dooley @ 2024-06-23 14:13 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
[-- Attachment #1: Type: text/plain, Size: 1287 bytes --]
On Sun, Jun 23, 2024 at 02:00:26PM +0200, Krzysztof Kozlowski wrote:
> MMIO address space is known per each variant of Adreno GPU, so we can
> constrain the reg/reg-names entries for each variant. There is no DTS
> for A619, so that part is not accurate but could be corrected later.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> .../devicetree/bindings/display/msm/gpu.yaml | 87 +++++++++++++++++--
> 1 file changed, 79 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/msm/gpu.yaml b/Documentation/devicetree/bindings/display/msm/gpu.yaml
> index baea1946c65d..e83f13123fc9 100644
> --- a/Documentation/devicetree/bindings/display/msm/gpu.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/gpu.yaml
> @@ -130,6 +130,22 @@ required:
> additionalProperties: false
>
> allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + 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]$'
Does the regex "^qcom,adreno-[0-9a-f]{8}$" not work in dt-schema, rather
than this repeat-a-number-of-times-I-cannot-grok that's happening here?
(I know you probably just copied this from above in the file...)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] dt-bindings: display/msm/gpu: define reg-names in top-level
2024-06-23 12:00 ` [PATCH 2/3] dt-bindings: display/msm/gpu: define reg-names " Krzysztof Kozlowski
@ 2024-06-23 14:14 ` Conor Dooley
0 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2024-06-23 14:14 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
[-- Attachment #1: Type: text/plain, Size: 377 bytes --]
On Sun, Jun 23, 2024 at 02:00:25PM +0200, Krzysztof Kozlowski wrote:
> 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.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] dt-bindings: display/msm/gpu: constrain clocks in top-level
2024-06-23 12:00 [PATCH 1/3] dt-bindings: display/msm/gpu: constrain clocks in top-level Krzysztof Kozlowski
2024-06-23 12:00 ` [PATCH 2/3] dt-bindings: display/msm/gpu: define reg-names " Krzysztof Kozlowski
2024-06-23 12:00 ` [PATCH 3/3] dt-bindings: display/msm/gpu: constrain reg/reg-names per variant Krzysztof Kozlowski
@ 2024-06-23 14:14 ` Conor Dooley
2 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2024-06-23 14:14 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
[-- Attachment #1: Type: text/plain, Size: 431 bytes --]
On Sun, Jun 23, 2024 at 02:00:24PM +0200, Krzysztof Kozlowski wrote:
> 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.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] dt-bindings: display/msm/gpu: constrain reg/reg-names per variant
2024-06-23 14:13 ` Conor Dooley
@ 2024-06-23 16:11 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-23 16:11 UTC (permalink / raw)
To: Conor Dooley
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
On 23/06/2024 16:13, Conor Dooley wrote:
> On Sun, Jun 23, 2024 at 02:00:26PM +0200, Krzysztof Kozlowski wrote:
>> MMIO address space is known per each variant of Adreno GPU, so we can
>> constrain the reg/reg-names entries for each variant. There is no DTS
>> for A619, so that part is not accurate but could be corrected later.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>> .../devicetree/bindings/display/msm/gpu.yaml | 87 +++++++++++++++++--
>> 1 file changed, 79 insertions(+), 8 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/display/msm/gpu.yaml b/Documentation/devicetree/bindings/display/msm/gpu.yaml
>> index baea1946c65d..e83f13123fc9 100644
>> --- a/Documentation/devicetree/bindings/display/msm/gpu.yaml
>> +++ b/Documentation/devicetree/bindings/display/msm/gpu.yaml
>> @@ -130,6 +130,22 @@ required:
>> additionalProperties: false
>>
>> allOf:
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + 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]$'
>
> Does the regex "^qcom,adreno-[0-9a-f]{8}$" not work in dt-schema, rather
> than this repeat-a-number-of-times-I-cannot-grok that's happening here?
> (I know you probably just copied this from above in the file...)
I copied to be consistent, but let me simplify original code and use it
also here.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-06-23 16:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-23 12:00 [PATCH 1/3] dt-bindings: display/msm/gpu: constrain clocks in top-level Krzysztof Kozlowski
2024-06-23 12:00 ` [PATCH 2/3] dt-bindings: display/msm/gpu: define reg-names " Krzysztof Kozlowski
2024-06-23 14:14 ` Conor Dooley
2024-06-23 12:00 ` [PATCH 3/3] dt-bindings: display/msm/gpu: constrain reg/reg-names per variant Krzysztof Kozlowski
2024-06-23 14:13 ` Conor Dooley
2024-06-23 16:11 ` Krzysztof Kozlowski
2024-06-23 14:14 ` [PATCH 1/3] dt-bindings: display/msm/gpu: constrain clocks in top-level Conor Dooley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).