Enable Mali G310 GPU support on i.MX952 board
Subsystems (6)
cover Enable Mali G310 GPU support on i.MX952 board
This series enable Mali G310 GPU support on i.MX952 boards, the same GPU IP as the instance on i.MX95 boards.
---
Guangliu Ding (2):
dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
arm64: dts: imx952: Describe Mali G310 GPU
.../bindings/gpu/arm,mali-valhall-csf.yaml | 1 + arch/arm64/boot/dts/freescale/imx952.dtsi | 36 ++++++++++++++++++++++ 2 files changed, 37 insertions(+)
---
base-commit: 0138af2472dfdef0d56fc4697416eaa0ff2589bd
change-id: 20260331-master-7ec7ff0fe1b2
Best regards,
Signature · 1 line
Guangliu Ding <[email protected]>
PATCH 1/2 dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
Add compatible string of Mali G310 GPU on i.MX952 board.
--- Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml +1 -0
@@ -20,6 +20,7 @@ properties: - enum: - mediatek,mt8196-mali - nxp,imx95-mali # G310 + - nxp,imx952-mali # G310 - rockchip,rk3588-mali - const: arm,mali-valhall-csf # Mali Valhall GPU model/revision is fully discoverable
Signature · 1 line
2.34.1
PATCH 2/2 arm64: dts: imx952: Describe Mali G310 GPU
In reply to Guangliu DingSupport Mali G310 GPU on i.MX952 board. Describe this GPU in the DT. Include dummy GPU voltage regulator and OPP tables.
--- arch/arm64/boot/dts/freescale/imx952.dtsi | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
arch/arm64/boot/dts/freescale/imx952.dtsi +36 -0
@@ -318,6 +318,28 @@ usbphynop2: usbphynop2 { clock-names = "main_clk"; }; + gpu_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-500000000 { + opp-hz = /bits/ 64 <500000000>; + opp-hz-real = /bits/ 64 <500000000>; + opp-microvolt = <920000>; + }; + + opp-800000000 { + opp-hz = /bits/ 64 <800000000>; + opp-hz-real = /bits/ 64 <800000000>; + opp-microvolt = <920000>; + }; + + opp-1000000000 { + opp-hz = /bits/ 64 <1000000000>; + opp-hz-real = /bits/ 64 <1000000000>; + opp-microvolt = <920000>; + }; + }; + soc { compatible = "simple-bus"; #address-cells = <2>;
@@ -1262,5 +1284,19 @@ usbmisc2: usbmisc@4c200200 { reg = <0x0 0x4c200200 0x0 0x200>, <0x0 0x4c010014 0x0 0x4>; }; + + gpu: gpu@4d900000 { + compatible = "nxp,imx952-mali", "arm,mali-valhall-csf"; + reg = <0 0x4d900000 0 0x480000>; + interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 289 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "gpu", "job", "mmu"; + clocks = <&scmi_clk IMX952_CLK_GPU>; + clock-names = "core"; + power-domains = <&scmi_devpd IMX952_PD_GPU>; + operating-points-v2 = <&gpu_opp_table>; + dynamic-power-coefficient = <1013>; + }; }; };
Signature · 1 line
2.34.1
Liviu Dudau
maintainerRe: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
In reply to Guangliu DingQuoted 13 lines · Guangliu Ding
Add compatible string of Mali G310 GPU on i.MX952 board.
Signed-off-by Guangliu Ding <[email protected]>Reviewed-by Jiyu Yang <[email protected]>--- Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml +0
-0
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml properties: · line 23
Quoted 4 lines
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml +1
-0@@ -20,6 +20,7 @@ properties: - enum: - mediatek,mt8196-mali - nxp,imx95-mali # G310 + - nxp,imx952-mali # G310
Can you explain why this is needed? Can it not be covered by the existing compatible?
Best regards,
Liviu
Quoted 7 lines
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml +0
-0- rockchip,rk3588-mali - const: arm,mali-valhall-csf # Mali Valhall GPU model/revision is fully discoverableSignature · 2 lines
-- 2.34.1
Signature · 8 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
In reply to Guangliu DingQuoted 1 line · Guangliu Ding
Add compatible string of Mali G310 GPU on i.MX952 board.
We see this from the diff. Say something useful.
Quoted 3 lines
Signed-off-by Guangliu Ding <[email protected]>Reviewed-by Jiyu Yang <[email protected]>
And the review should tell you that. Did that review even happen? That's a v1 and a single liner patch, so how basics could be missed?
Best regards,
Krzysztof
RE: [EXT] Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
In reply to Liviu DudauHi Liviu
Thanks for your review. Please refer to my comments below:
Quoted 11 lines · Guangliu Ding
Review
Quoted 9 lines
Add compatible string of Mali G310 GPU on i.MX952 board.
Signed-off-by Guangliu Ding <[email protected]>Reviewed-by Jiyu Yang <[email protected]>--- Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0
b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
Quoted 11 lines
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml properties: · line 23
Quoted 8 lines
index
8eccd4338a2b..6a10843a26e2100644Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml +1
-0@@ -20,6 +20,7 @@ properties: - enum: - mediatek,mt8196-mali - nxp,imx95-mali # G310 + - nxp,imx952-mali # G310Can you explain why this is needed? Can it not be covered by the existing compatible?
There are functional differences in GPU module (GPUMIX) between i.MX95 and i.MX952. So they cannot be fully covered by a single existing compatible. On i.MX952, The GPU clock is controlled by hardware GPU auto clock-gating mechanism, while the GPU clock is managed explicitly by the driver on i.MX95. Because of these behavioral differences, separate compatible strings "nxp,imx95-mali" and "nxp,imx952-mali" are needed to allow the driver to handle the two variants independently and to keep room for future divergence.
Quoted 22 lines
Best regards,
LiviuDocumentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml properties: · line 25
Quoted 2 lines
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml +0
-0- rockchip,rk3588-mali - const: arm,mali-valhall-csf # Mali Valhall GPUmodel/revision is fully discoverable
Quoted 5 lines
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml +0
-1--2.34.1
--
====================| I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯
Re: [EXT] Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
Quoted 27 lines · Guangliu Ding
Hi Liviu
Thanks for your review. Please refer to my comments below:
Quoted 11 lines · Guangliu Ding
Review
Quoted 9 lines
Add compatible string of Mali G310 GPU on i.MX952 board.
Signed-off-by Guangliu Ding <[email protected]>Reviewed-by Jiyu Yang <[email protected]>--- Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0
b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yamlQuoted 11 lines
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml properties: · line 23
Quoted 8 lines
index
8eccd4338a2b..6a10843a26e2100644Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml +1
-0@@ -20,6 +20,7 @@ properties: - enum: - mediatek,mt8196-mali - nxp,imx95-mali # G310 + - nxp,imx952-mali # G310Can you explain why this is needed? Can it not be covered by the existing compatible?
Quoted 7 lines
There are functional differences in GPU module (GPUMIX) between i.MX95 and i.MX952. So they cannot be fully covered by a single existing compatible. On i.MX952, The GPU clock is controlled by hardware GPU auto clock-gating mechanism, while the GPU clock is managed explicitly by the driver on i.MX95. Because of these behavioral differences, separate compatible strings "nxp,imx95-mali" and "nxp,imx952-mali" are needed to allow the driver to handle the two variants independently and to keep room for future divergence.
That's pretty arguable statement considering there is no driver code using it, so basically this patchset admits openly devices are fully compatible.
Best regards,
Krzysztof
RE: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
In reply to Krzysztof KozlowskiHi Krzysztof
This is my first upstream contribution. I will improve the patch in v2.
Quoted 4 lines · Guangliu Ding
Quoted 1 line
Add compatible string of Mali G310 GPU on i.MX952 board.
We see this from the diff. Say something useful.
I will improve the description in v2.
Quoted 7 lines
Quoted 4 lines
Signed-off-by Guangliu Ding <[email protected]>Reviewed-by Jiyu Yang <[email protected]>And the review should tell you that. Did that review even happen? That's a v1 and a single liner patch, so how basics could be missed?
Yes, it's v1. I will remove the Reviewed-by tag in v2.
Quoted 3 lines
Best regards,
Krzysztof
Re: [EXT] Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
In reply to Guangliu DingQuoted 27 lines · Guangliu Ding
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Hi Liviu
Thanks for your review. Please refer to my comments below:
Quoted 11 lines · Guangliu Ding
Review
Quoted 9 lines
Add compatible string of Mali G310 GPU on i.MX952 board.
Signed-off-by Guangliu Ding <[email protected]>Reviewed-by Jiyu Yang <[email protected]>--- Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0
b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yamlQuoted 10 lines
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml properties: · line 23
Quoted 8 lines
index
8eccd4338a2b..6a10843a26e2100644Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml +1
-0@@ -20,6 +20,7 @@ properties: - enum: - mediatek,mt8196-mali - nxp,imx95-mali # G310 + - nxp,imx952-mali # G310Can you explain why this is needed? Can it not be covered by the existing compatible?
Quoted 7 lines
There are functional differences in GPU module (GPUMIX) between i.MX95 and i.MX952. So they cannot be fully covered by a single existing compatible. On i.MX952, The GPU clock is controlled by hardware GPU auto clock-gating mechanism, while the GPU clock is managed explicitly by the driver on i.MX95. Because of these behavioral differences, separate compatible strings "nxp,imx95-mali" and "nxp,imx952-mali" are needed to allow the driver to handle the two variants independently and to keep room for future divergence.
This information should be added in the commit message explaining why
the change is needed.
But then where is the driver code taking care of these diferences?
RE: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
Hi Daniel
Quoted 44 lines · Guangliu Ding
Quoted 32 lines
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Hi Liviu
Thanks for your review. Please refer to my comments below:
Quoted 13 lines · Guangliu Ding
Quoted 11 lines
Add compatible string of Mali G310 GPU on i.MX952 board.
Signed-off-by Guangliu Ding <[email protected]>Reviewed-by Jiyu Yang <[email protected]>--- Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml | 1 + 1 file changed, 1 insertion(+)diff --git
a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yamlQuoted 12 lines
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml properties: · line 23
Quoted 10 lines
index
8eccd4338a2b..6a10843a26e2100644
---a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml+++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yam +++ lDocumentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml +1
-0@@ -20,6 +20,7 @@ properties: - enum: - mediatek,mt8196-mali - nxp,imx95-mali # G310 + - nxp,imx952-mali # G310Can you explain why this is needed? Can it not be covered by the existing compatible?
Quoted 4 lines
There are functional differences in GPU module (GPUMIX) between i.MX95 and i.MX952. So they cannot be fully covered by a single existing compatible. On i.MX952, The GPU clock is controlled by hardware GPU auto clock-gating mechanism, while the GPU clock is managed explicitly by the
driver on i.MX95.
Quoted 3 lines
Because of these behavioral differences, separate compatible strings "nxp,imx95-mali" and "nxp,imx952-mali" are needed to allow the driver to handle the two variants independently and to keep room for future
divergence.
Quoted 7 lines
This information should be added in the commit message explaining why
the change is needed.
But then where is the driver code taking care of these diferences?
Yes. Currently the driver does not require "nxp,imx952-mali" string. However, when GPU ipa_counters are enabled to calculate the GPU busy_time/idle_time for GPU DVFS feature, they will conflict with the hardware GPU auto clock‑gating mechanism, causing GPU clock to remain always on.
In such cases, ipa_counters need to be disabled so that the GPU auto clock‑gating mechanism can operate normally, using "nxp,imx952-mali" string.
Liviu Dudau
maintainerRe: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
Quoted 54 lines · Guangliu Ding
Hi Daniel
Quoted 44 lines · Guangliu Ding
Quoted 32 lines
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Hi Liviu
Thanks for your review. Please refer to my comments below:
Quoted 13 lines · Guangliu Ding
Quoted 11 lines
Add compatible string of Mali G310 GPU on i.MX952 board.
Signed-off-by Guangliu Ding <[email protected]>Reviewed-by Jiyu Yang <[email protected]>--- Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml | 1 + 1 file changed, 1 insertion(+)diff --git
a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yamlQuoted 12 lines
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml properties: · line 23
Quoted 10 lines
index
8eccd4338a2b..6a10843a26e2100644
---a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml+++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yam +++ lDocumentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml +1
-0@@ -20,6 +20,7 @@ properties: - enum: - mediatek,mt8196-mali - nxp,imx95-mali # G310 + - nxp,imx952-mali # G310Can you explain why this is needed? Can it not be covered by the existing compatible?
Quoted 4 lines
There are functional differences in GPU module (GPUMIX) between i.MX95 and i.MX952. So they cannot be fully covered by a single existing compatible. On i.MX952, The GPU clock is controlled by hardware GPU auto clock-gating mechanism, while the GPU clock is managed explicitly by the
driver on i.MX95.
Quoted 3 lines
Because of these behavioral differences, separate compatible strings "nxp,imx95-mali" and "nxp,imx952-mali" are needed to allow the driver to handle the two variants independently and to keep room for future
divergence.
Quoted 7 lines
This information should be added in the commit message explaining why
the change is needed.
But then where is the driver code taking care of these diferences?
Quoted 6 lines
Yes. Currently the driver does not require "nxp,imx952-mali" string. However, when GPU
ipa_countersare enabled to calculate the GPU busy_time/idle_time for GPU DVFS feature, they will conflict with the hardware GPU auto clock‑gating mechanism, causing GPU clock to remain always on.
In such cases,ipa_countersneed to be disabled so that the GPU auto clock‑gating mechanism can operate normally, using "nxp,imx952-mali" string.
OK, I understand that you're following guidance from some other senior people on how to upstream patches so you've tried to create the smallest patchset to ensure that it gets reviewed and accepted, but in this case we need to see the other patches as well to decide if your approach is the right one and we do need a separate compatible string.
If enabling GPU ipa_counters causes the clocks to get stuck active, that feels like a hardware bug, so figuring out how to handle that is more important than adding a compatible string.
Either add the patch(es) that use the compatible to this series in v2, or put a comment in the commit message on where we can see the driver changes.
Best regards,
Liviu
Signature · 8 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯RE: Re: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
Hi Liviu
Quoted 79 lines · Guangliu Ding
Quoted 42 lines
Hi Daniel
Quoted 40 lines · Guangliu Ding
Quoted 39 lines
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification
]Hi Liviu
Thanks for your review. Please refer to my comments below:
Quoted 15 lines · Guangliu Ding
Quoted 8 lines
Add compatible string of Mali G310 GPU on i.MX952 board.
Signed-off-by Guangliu Ding <[email protected]>Reviewed-by Jiyu Yang <[email protected]>---
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
| 1
+Quoted 5 lines
1 file changed, 1 insertion(+)diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yam l
b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yamlQuoted 14 lines
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml properties: · line 23
Quoted 12 lines
index
8eccd4338a2b..6a10843a26e2100644
---
a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yam l
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf +++ .yam
+++ lDocumentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml +1
-0@@ -20,6 +20,7 @@ properties: - enum: - mediatek,mt8196-mali - nxp,imx95-mali # G310 + - nxp,imx952-mali # G310Can you explain why this is needed? Can it not be covered by the existing compatible?
There are functional differences in GPU module (GPUMIX) between i.MX95 and i.MX952. So they cannot be fully covered by a single existing
compatible.
Quoted 17 lines
Quoted 17 lines
Quoted 3 lines
On i.MX952, The GPU clock is controlled by hardware GPU auto clock-gating mechanism, while the GPU clock is managed explicitly by the
driver on i.MX95.
Quoted 4 lines
Because of these behavioral differences, separate compatible strings "nxp,imx95-mali" and "nxp,imx952-mali" are needed to allow the driver to handle the two variants independently and to keep room for future
divergence.
This information should be added in the commit message explaining why
the change is needed.
Quoted 7 lines
Quoted 2 lines
But then where is the driver code taking care of these diferences?
Yes. Currently the driver does not require "nxp,imx952-mali" string. However, when GPU
ipa_countersare enabled to calculate the GPU busy_time/idle_time for GPU DVFS feature, they will conflict with the hardware GPU auto clock‑gating mechanism, causing GPU clock to remainalways on.
Quoted 2 lines
In such cases,
ipa_countersneed to be disabled so that the GPU auto clock‑gating mechanism can operate normally, using "nxp,imx952-mali"string.
OK, I understand that you're following guidance from some other senior people on how to upstream patches so you've tried to create the smallest patchset to ensure that it gets reviewed and accepted, but in this case we need to see the other patches as well to decide if your approach is the right one and we do need a separate compatible string.
Quoted 7 lines
If enabling GPU
ipa_counterscauses the clocks to get stuck active, that feels like a hardware bug, so figuring out how to handle that is more important than adding a compatible string.Either add the patch(es) that use the compatible to this series in v2, or put a comment in the commit message on where we can see the driver changes.
According to discussions with the GPU vendor, this is a hardware limitation of Mali-G310 rather than a hardware bug, and it has been addressed in newer Mali GPU families.
In addition, ipa_counters are not enabled in the current Panthor driver. We observed this issue with the private Mali DDK where ipa_counters were enabled. Therefore, keeping the compatible string is necessary to allow for future divergence.
Quoted 12 lines
Best regards,
Liviu--
====================| I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯
Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
Quoted 11 lines · Guangliu Ding
Quoted 3 lines
Either add the patch(es) that use the compatible to this series in v2, or put a comment in the commit message on where we can see the driver changes.
According to discussions with the GPU vendor, this is a hardware limitation of Mali-G310 rather than a hardware bug, and it has been addressed in newer Mali GPU families.
In addition,
ipa_countersare not enabled in the current Panthor driver. We observed this issue with the private Mali DDK whereipa_counterswere enabled. Therefore, keeping the compatible string is necessary to allow for future divergence.
No one discusses here whether you need separate compatible string. writing bindings and all my talks are (e.g. DTS 101) are clearly expecting you.
We discuss only the lack of compatibility in terms of DT, how DT sees compatible devices.
And lack of driver code is clear indication that devices are compatible in terms how DT understands it. Feel encouraged to bring actual arguments in commit msgs in the future.
Best regards,
Krzysztof
RE: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
Hi Krzysztof
Quoted 22 lines · Guangliu Ding
Quoted 2 lines
Quoted 2 lines
Either add the patch(es) that use the compatible to this series in v2, or put a comment in the commit message on where we can see the
driver changes.
Quoted 8 lines
Quoted 1 line
According to discussions with the GPU vendor, this is a hardware limitation of Mali-G310 rather than a hardware bug, and it has been addressed in newer Mali GPU families.
In addition,
ipa_countersare not enabled in the current Panthor driver. We observed this issue with the private Mali DDK whereipa_counterswere enabled.
Quoted 1 line
Therefore, keeping the compatible string is necessary to allow for future
divergence.
No one discusses here whether you need separate compatible string. writing bindings and all my talks are (e.g. DTS 101) are clearly expecting you.
We discuss only the lack of compatibility in terms of DT, how DT sees compatible devices.
Quoted 6 lines
And lack of driver code is clear indication that devices are compatible in terms how DT understands it. Feel encouraged to bring actual arguments in commit msgs in the future.
Best regards,
Krzysztof
So the best approach is only reserve "arm,mali-valhall-csf" for now, since currently there is no need for an additional compatible entry from a DT compatibility perspective. We can introduce "nxp,imx952-mali" in future commits if hardware or driver differences actually require it, and include more detailed justification in the commit message. Right?
Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
Quoted 28 lines · Guangliu Ding
Hi Krzysztof
Quoted 26 lines · Guangliu Ding
Quoted 2 lines
Quoted 2 lines
Either add the patch(es) that use the compatible to this series in v2, or put a comment in the commit message on where we can see the
driver changes.
Quoted 8 lines
Quoted 1 line
According to discussions with the GPU vendor, this is a hardware limitation of Mali-G310 rather than a hardware bug, and it has been addressed in newer Mali GPU families.
In addition,
ipa_countersare not enabled in the current Panthor driver. We observed this issue with the private Mali DDK whereipa_counterswere enabled.
Quoted 1 line
Therefore, keeping the compatible string is necessary to allow for future
divergence.
No one discusses here whether you need separate compatible string. writing bindings and all my talks are (e.g. DTS 101) are clearly expecting you.
We discuss only the lack of compatibility in terms of DT, how DT sees compatible devices.
And lack of driver code is clear indication that devices are compatible in terms how DT understands it. Feel encouraged to bring actual arguments in commit msgs in the future.
Quoted 7 lines
Quoted 2 lines
Best regards,
KrzysztofSo the best approach is only reserve "arm,mali-valhall-csf" for now, since currently there is no need for an additional compatible entry from a DT compatibility perspective. We can introduce "nxp,imx952-mali" in future commits if hardware or driver differences actually require it, and include more detailed justification in the commit message. Right?
So does that mean you decided not to read writing bindings document?
Best regards,
Krzysztof
RE: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
Hi Krzysztof
Quoted 35 lines · Guangliu Ding
Quoted 22 lines
Hi Krzysztof
Quoted 20 lines · Guangliu Ding
Quoted 2 lines
Quoted 2 lines
Either add the patch(es) that use the compatible to this series in v2, or put a comment in the commit message on where we can see the
driver changes.
Quoted 9 lines
Quoted 1 line
According to discussions with the GPU vendor, this is a hardware limitation of Mali-G310 rather than a hardware bug, and it has been addressed in newer Mali GPU families.
In addition,
ipa_countersare not enabled in the current Panthor driver. We observed this issue with the private Mali DDK whereipa_counterswere enabled.
Quoted 2 lines
Therefore, keeping the compatible string is necessary to allow for future
divergence.
No one discusses here whether you need separate compatible string. writing bindings and all my talks are (e.g. DTS 101) are clearly expecting
you.
Quoted 11 lines
Quoted 10 lines
We discuss only the lack of compatibility in terms of DT, how DT sees compatible devices.
And lack of driver code is clear indication that devices are compatible in terms how DT understands it. Feel encouraged to bring actual arguments in commit msgs in the future.
Best regards,
Krzysztof
Quoted 8 lines
Quoted 2 lines
So the best approach is only reserve "arm,mali-valhall-csf" for now, since currently there is no need for an additional compatible entry from a DT
compatibility perspective.
Quoted 2 lines
We can introduce "nxp,imx952-mali" in future commits if hardware or driver differences actually require it, and include more detailed justification
in the commit message. Right?
So does that mean you decided not to read writing bindings document?
Actually, I followed the compatible string of gpu node in imx952.dtsi during code work since they share the same GPU IP.
gpu: gpu@4d900000 {
compatible = "nxp,imx95-mali", "arm,mali-valhall-csf"; > Is this line in writing bindings document that you want to mention about? Could you please share more suggestions about the patch optimization?
DO add new compatibles in case there are new features or bugs.
Quoted 2 lines
Best regards,
Krzysztof
Liviu Dudau
maintainerRe: Re: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
In reply to Guangliu DingQuoted 85 lines · Guangliu Ding
Hi Liviu
Quoted 83 lines · Guangliu Ding
Quoted 42 lines
Hi Daniel
Quoted 40 lines · Guangliu Ding
Quoted 39 lines
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification
]Hi Liviu
Thanks for your review. Please refer to my comments below:
Quoted 15 lines · Guangliu Ding
Quoted 8 lines
Add compatible string of Mali G310 GPU on i.MX952 board.
Signed-off-by Guangliu Ding <[email protected]>Reviewed-by Jiyu Yang <[email protected]>---
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
| 1
+Quoted 5 lines
1 file changed, 1 insertion(+)diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yam l
b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yamlQuoted 14 lines
Review properties: · line 23
Quoted 12 lines
index
8eccd4338a2b..6a10843a26e2100644
---
a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yam l
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf +++ .yam
+++ l(quoted diff) +1
-0@@ -20,6 +20,7 @@ properties: - enum: - mediatek,mt8196-mali - nxp,imx95-mali # G310 + - nxp,imx952-mali # G310Can you explain why this is needed? Can it not be covered by the existing compatible?
There are functional differences in GPU module (GPUMIX) between i.MX95 and i.MX952. So they cannot be fully covered by a single existing
compatible.
Quoted 17 lines
Quoted 17 lines
Quoted 3 lines
On i.MX952, The GPU clock is controlled by hardware GPU auto clock-gating mechanism, while the GPU clock is managed explicitly by the
driver on i.MX95.
Quoted 4 lines
Because of these behavioral differences, separate compatible strings "nxp,imx95-mali" and "nxp,imx952-mali" are needed to allow the driver to handle the two variants independently and to keep room for future
divergence.
This information should be added in the commit message explaining why
the change is needed.
Quoted 7 lines
Quoted 2 lines
But then where is the driver code taking care of these diferences?
Yes. Currently the driver does not require "nxp,imx952-mali" string. However, when GPU
ipa_countersare enabled to calculate the GPU busy_time/idle_time for GPU DVFS feature, they will conflict with the hardware GPU auto clock‑gating mechanism, causing GPU clock to remainalways on.
Quoted 2 lines
In such cases,
ipa_countersneed to be disabled so that the GPU auto clock‑gating mechanism can operate normally, using "nxp,imx952-mali"string.
OK, I understand that you're following guidance from some other senior people on how to upstream patches so you've tried to create the smallest patchset to ensure that it gets reviewed and accepted, but in this case we need to see the other patches as well to decide if your approach is the right one and we do need a separate compatible string.
If enabling GPU
ipa_counterscauses the clocks to get stuck active, that feels like a hardware bug, so figuring out how to handle that is more important than adding a compatible string.
Quoted 7 lines
Quoted 3 lines
Either add the patch(es) that use the compatible to this series in v2, or put a comment in the commit message on where we can see the driver changes.
According to discussions with the GPU vendor, this is a hardware limitation of Mali-G310 rather than a hardware bug, and it has been addressed in newer Mali GPU families.
I represent the said GPU vendor and I think I know what you're talking about, but you're taking the wrong approach. All G310s have a problem where in order to enable access to the ipa_counters the automatic clock gating gets disabled. So the solution that needs to be implemented when we add support for IPA_COUNTERs will apply to all GPUs, not just MX952.
Quoted 4 lines
In addition,
ipa_countersare not enabled in the current Panthor driver. We observed this issue with the private Mali DDK whereipa_counterswere enabled. Therefore, keeping the compatible string is necessary to allow for future divergence.
This is not an MX952 issue only. You might be aware of it on your SoC, but it's not just for it.
Best regards,
Liviu
Signature · 8 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯RE: Re: Re: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
Hi Liviu
Quoted 107 lines · Guangliu Ding
Quoted 83 lines
Hi Liviu
Quoted 81 lines · Guangliu Ding
Quoted 51 lines
Hi Daniel
Quoted 49 lines · Guangliu Ding
Quoted 48 lines
[You don't often get email from [email protected]. Learn why this is important at
https://aka.ms/LearnAboutSenderIdentification
]Hi Liviu
Thanks for your review. Please refer to my comments below:
Quoted 19 lines · Guangliu Ding
Quoted 10 lines
Add compatible string of Mali G310 GPU on i.MX952 board.
Signed-off-by Guangliu Ding <[email protected]>Reviewed-by Jiyu Yang <[email protected]>---
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
| 1
+Quoted 6 lines
1 file changed, 1 insertion(+)diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf .yam
lb/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf. yaml
Quoted 16 lines
Quoted 10 lines
index
8eccd4338a2b..6a10843a26e2100644
---
a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf .yam
l
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall +++ -csf
+++ .yam
+++ lReview properties: · line 23
Quoted 4 lines
(quoted diff) +1
-0@@ -20,6 +20,7 @@ properties: - enum: - mediatek,mt8196-mali - nxp,imx95-mali # G310 + - nxp,imx952-mali # G310Can you explain why this is needed? Can it not be covered by the existing compatible?
There are functional differences in GPU module (GPUMIX) between
i.MX95 and i.MX952. So they cannot be fully covered by a single existingcompatible.
Quoted 17 lines
Quoted 17 lines
Quoted 3 lines
On i.MX952, The GPU clock is controlled by hardware GPU auto clock-gating mechanism, while the GPU clock is managed explicitly by the
driver on i.MX95.
Quoted 4 lines
Because of these behavioral differences, separate compatible strings "nxp,imx95-mali" and "nxp,imx952-mali" are needed to allow the driver to handle the two variants independently and to keep room for future
divergence.
This information should be added in the commit message explaining why
the change is needed.
Quoted 8 lines
Quoted 2 lines
But then where is the driver code taking care of these diferences?
Yes. Currently the driver does not require "nxp,imx952-mali" string. However, when GPU
ipa_countersare enabled to calculate the GPU busy_time/idle_time for GPU DVFS feature, they will conflict with the hardware GPU auto clock‑gating mechanism, causing GPU clock to remainalways on.
Quoted 2 lines
In such cases,
ipa_countersneed to be disabled so that the GPU auto clock‑gating mechanism can operate normally, using"nxp,imx952-mali"
Quoted 7 lines
Quoted 7 lines
string.
OK, I understand that you're following guidance from some other senior people on how to upstream patches so you've tried to create the smallest patchset to ensure that it gets reviewed and accepted, but in this case we need to see the other patches as well to decide if your approach is the right one and we do need a separate compatible
string.
Quoted 7 lines
Quoted 7 lines
If enabling GPU
ipa_counterscauses the clocks to get stuck active, that feels like a hardware bug, so figuring out how to handle that is more important than adding a compatible string.Either add the patch(es) that use the compatible to this series in v2, or put a comment in the commit message on where we can see the
driver changes.
Quoted 5 lines
Quoted 1 line
According to discussions with the GPU vendor, this is a hardware limitation of Mali-G310 rather than a hardware bug, and it has been addressed in newer Mali GPU families.
Quoted 5 lines
I represent the said GPU vendor and I think I know what you're talking about, but you're taking the wrong approach. All G310s have a problem where in order to enable access to the
ipa_countersthe automatic clock gating gets disabled. So the solution that needs to be implemented when we add support forIPA_COUNTERswill apply to all GPUs, not just MX952.
Yes. We have bring-up G310 (V2) GPU on both i.MX95 and i.MX952. And auto clock gating mechanism is firstly introduced in i.MX952 (not supported on i.MX95). According to your update, solution needs to be implemented to all GPUs which support auto clock gating mechanism after IPA_COUNTERs are supported in the driver, right? What's your suggestions for 952 gpu dtb node?
Quoted 23 lines
Quoted 4 lines
In addition,
ipa_countersare not enabled in the current Panthor driver. We observed this issue with the private Mali DDK whereipa_counterswere enabled.
Quoted 1 line
Therefore, keeping the compatible string is necessary to allow for future
divergence.
This is not an MX952 issue only. You might be aware of it on your SoC, but it's not just for it.
Best regards,
Liviu--
====================| I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯
Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
In reply to Guangliu DingQuoted 20 lines · Guangliu Ding
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
We discuss only the lack of compatibility in terms of DT, how DT sees compatible devices.
And lack of driver code is clear indication that devices are compatible in terms how DT understands it. Feel encouraged to bring actual arguments in commit msgs in the future.
Best regards,
KrzysztofQuoted 8 lines
Quoted 2 lines
So the best approach is only reserve "arm,mali-valhall-csf" for now, since currently there is no need for an additional compatible entry from a DT
compatibility perspective.
Quoted 2 lines
We can introduce "nxp,imx952-mali" in future commits if hardware or driver differences actually require it, and include more detailed justification
in the commit message. Right?
So does that mean you decided not to read writing bindings document?
Quoted 8 lines
Actually, I followed the compatible string of gpu node in
imx952.dtsiduring code work since they share the same GPU IP.gpu: gpu@4d900000 { compatible = "nxp,imx95-mali", "arm,mali-valhall-csf"; >Is this line in writing bindings document that you want to mention about? Could you please share more suggestions about the patch optimization?
DO add new compatibles in case there are new features or bugs.
Please read entire file. I feel like you avoid doing this and just ask me to give you shortcut.
There is more than one point from that trivial writing bindings file which applies here.
Best regards,
Krzysztof
Liviu Dudau
maintainerRe: Re: Re: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
In reply to Guangliu DingQuoted 115 lines · Guangliu Ding
Hi Liviu
Quoted 107 lines · Guangliu Ding
Quoted 83 lines
Hi Liviu
Quoted 81 lines · Guangliu Ding
Quoted 51 lines
Hi Daniel
Quoted 49 lines · Guangliu Ding
Quoted 48 lines
[You don't often get email from [email protected]. Learn why this is important at
https://aka.ms/LearnAboutSenderIdentification
]Hi Liviu
Thanks for your review. Please refer to my comments below:
Quoted 19 lines · Guangliu Ding
Quoted 10 lines
Add compatible string of Mali G310 GPU on i.MX952 board.
Signed-off-by Guangliu Ding <[email protected]>Reviewed-by Jiyu Yang <[email protected]>---
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
| 1
+Quoted 6 lines
1 file changed, 1 insertion(+)diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf .yam
lb/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf. yaml
Quoted 16 lines
Quoted 10 lines
index
8eccd4338a2b..6a10843a26e2100644
---
a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf .yam
l
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall +++ -csf
+++ .yam
+++ lReview properties: · line 23
Quoted 4 lines
(quoted diff) +1
-0@@ -20,6 +20,7 @@ properties: - enum: - mediatek,mt8196-mali - nxp,imx95-mali # G310 + - nxp,imx952-mali # G310Can you explain why this is needed? Can it not be covered by the existing compatible?
There are functional differences in GPU module (GPUMIX) between
i.MX95 and i.MX952. So they cannot be fully covered by a single existingcompatible.
Quoted 17 lines
Quoted 17 lines
Quoted 3 lines
On i.MX952, The GPU clock is controlled by hardware GPU auto clock-gating mechanism, while the GPU clock is managed explicitly by the
driver on i.MX95.
Quoted 4 lines
Because of these behavioral differences, separate compatible strings "nxp,imx95-mali" and "nxp,imx952-mali" are needed to allow the driver to handle the two variants independently and to keep room for future
divergence.
This information should be added in the commit message explaining why
the change is needed.
Quoted 8 lines
Quoted 2 lines
But then where is the driver code taking care of these diferences?
Yes. Currently the driver does not require "nxp,imx952-mali" string. However, when GPU
ipa_countersare enabled to calculate the GPU busy_time/idle_time for GPU DVFS feature, they will conflict with the hardware GPU auto clock‑gating mechanism, causing GPU clock to remainalways on.
Quoted 2 lines
In such cases,
ipa_countersneed to be disabled so that the GPU auto clock‑gating mechanism can operate normally, using"nxp,imx952-mali"
Quoted 7 lines
Quoted 7 lines
string.
OK, I understand that you're following guidance from some other senior people on how to upstream patches so you've tried to create the smallest patchset to ensure that it gets reviewed and accepted, but in this case we need to see the other patches as well to decide if your approach is the right one and we do need a separate compatible
string.
Quoted 7 lines
Quoted 7 lines
If enabling GPU
ipa_counterscauses the clocks to get stuck active, that feels like a hardware bug, so figuring out how to handle that is more important than adding a compatible string.Either add the patch(es) that use the compatible to this series in v2, or put a comment in the commit message on where we can see the
driver changes.
Quoted 5 lines
Quoted 1 line
According to discussions with the GPU vendor, this is a hardware limitation of Mali-G310 rather than a hardware bug, and it has been addressed in newer Mali GPU families.
Quoted 5 lines
I represent the said GPU vendor and I think I know what you're talking about, but you're taking the wrong approach. All G310s have a problem where in order to enable access to the
ipa_countersthe automatic clock gating gets disabled. So the solution that needs to be implemented when we add support forIPA_COUNTERswill apply to all GPUs, not just MX952.
Quoted 4 lines
Yes. We have bring-up G310 (V2) GPU on both i.MX95 and i.MX952. And auto clock gating mechanism is firstly introduced in i.MX952 (not supported on i.MX95). According to your update, solution needs to be implemented to all GPUs which support auto clock gating mechanism after
IPA_COUNTERsare supported in the driver, right?
A solution is needed, yes.
Quoted 1 line
What's your suggestions for 952 gpu dtb node?
There is no IPA_COUNTER use in Panthor at the moment. Unless your DVFS controller uses that, I would suggest that we don't introduce a compatible for 952 until the time we add support for reading the counters.
It helps if you think in terms of what is already in upstream, rather than mixing with the tests that uses kbase code. Does your hardware need extra code in upstream in order to function? If so, where is that code? If not, then let's not introduce the compatible until we are absolutely sure we need it because we have code specific to that SoC. For everything else we will implement an architecture fix if needed.
Best regards,
Liviu
Signature · 8 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯RE: [EXT] Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
In reply to Krzysztof KozlowskiHi Krzysztof
Thank you for the helpful guidance.
After going through the writing binding file and the corresponding driver/dts code, I have a few updates to share:
Quoted 33 lines · Guangliu Ding
Quoted 22 lines
Quoted 14 lines
Quoted 8 lines
Quoted 8 lines
We discuss only the lack of compatibility in terms of DT, how DT sees compatible devices.
And lack of driver code is clear indication that devices are compatible in terms how DT understands it. Feel encouraged to bring actual arguments in commit msgs in the future.
Quoted 6 lines
Quoted 2 lines
Best regards,
KrzysztofSo the best approach is only reserve "arm,mali-valhall-csf" for now, since currently there is no need for an additional compatible entry from a DT
Quoted 7 lines
compatibility perspective.
Quoted 3 lines
We can introduce "nxp,imx952-mali" in future commits if hardware or driver differences actually require it, and include more detailed justification
in the commit message. Right?
So does that mean you decided not to read writing bindings document?
Quoted 8 lines
Actually, I followed the compatible string of gpu node in
imx952.dtsiduring code work since they share the same GPU IP.gpu: gpu@4d900000 { compatible = "nxp,imx95-mali", "arm,mali-valhall-csf"; >Is this line in writing bindings document that you want to mention about? Could you please share more suggestions about the patch optimization?
DO add new compatibles in case there are new features orbugs.
Quoted 8 lines
Please read entire file. I feel like you avoid doing this and just ask me to give you shortcut.
There is more than one point from that trivial writing bindings file which applies here.
Best regards,
Krzysztof
DO use fallback compatibles when devices are the same as or a superset of prior implementations. Under this rule, the following compatible string is correct since the GPU on i.MX952 is fully compatible with the GPU on i.MX95 now.
compatible = "nxp,imx95-mali", "arm,mali-valhall-csf";
DO add new compatibles in case there are new features or bugs. Under this rule, the new compatible string is required to support new feature and the old one must be kept if the GPU auto clock gating mechanism on i.MX952 needs additional fixes after ipa_counters are enabled in the driver. compatible = "nxp,imx952-mali", "nxp,imx95-mali", "arm,mali-valhall-csf";
RE: Re: Re: Re: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
In reply to Liviu DudauHi Liviu
Thanks a lot for your sharing.
Quoted 139 lines · Guangliu Ding
Quoted 19 lines
Hi Liviu
Quoted 17 lines · Guangliu Ding
Quoted 16 lines
Hi Liviu
Quoted 14 lines · Guangliu Ding
Quoted 13 lines
Hi Daniel
Quoted 11 lines · Guangliu Ding
Quoted 10 lines
[You don't often get email from [email protected]. Learn why this is important at
https://aka.ms/LearnAboutSenderIdentification
]Hi Liviu
Thanks for your review. Please refer to my comments below:
Quoted 1 line
On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding
Quoted 96 lines · wrote:
Quoted 96 lines
Quoted 63 lines
Quoted 63 lines
Quoted 38 lines
Quoted 38 lines
Quoted 38 lines
Quoted 38 lines
Quoted 11 lines
Add compatible string of Mali G310 GPU on i.MX952 board.
Signed-off-by Guangliu Ding <[email protected]>Reviewed-by Jiyu Yang <[email protected]>---
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.y
aml
| 1
+Quoted 7 lines
1 file changed, 1 insertion(+)diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-valhall -csf
.yam
lb/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf. yaml
Quoted 12 lines
index
8eccd4338a2b..6a10843a26e2100644
---
a/Documentation/devicetree/bindings/gpu/arm,mali-valhall -csf
.yam
l
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-val +++ hall
+++ -csf
+++ .yam
+++ lReview properties: · line 23
Quoted 4 lines
(quoted diff) +1
-0@@ -20,6 +20,7 @@ properties: - enum: - mediatek,mt8196-mali - nxp,imx95-mali # G310 + - nxp,imx952-mali # G310Can you explain why this is needed? Can it not be covered by the existing compatible?
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
There are functional differences in GPU module (GPUMIX) between
i.MX95 and i.MX952. So they cannot be fully covered by a single existingcompatible.
Quoted 20 lines
Quoted 19 lines
Quoted 3 lines
On i.MX952, The GPU clock is controlled by hardware GPU auto clock-gating mechanism, while the GPU clock is managed explicitly by the
driver on i.MX95.
Quoted 4 lines
Because of these behavioral differences, separate compatible strings "nxp,imx95-mali" and "nxp,imx952-mali" are needed to allow the driver to handle the two variants independently and to keep room for future
divergence.
This information should be added in the commit message explaining why
the change is needed.
But then where is the driver code taking care of these diferences?
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Yes. Currently the driver does not require "nxp,imx952-mali" string. However, when GPU
ipa_countersare enabled to calculate the GPU busy_time/idle_time for GPU DVFS feature, they will conflict with the hardware GPU auto clock‑gating mechanism, causing GPU clock to remainalways on.
Quoted 2 lines
In such cases,
ipa_countersneed to be disabled so that the GPU auto clock‑gating mechanism can operate normally, using"nxp,imx952-mali"
Quoted 8 lines
Quoted 8 lines
string.
OK, I understand that you're following guidance from some other senior people on how to upstream patches so you've tried to create the smallest patchset to ensure that it gets reviewed and accepted, but in this case we need to see the other patches as well to decide if your approach is the right one and we do need a separate compatible
string.
Quoted 8 lines
Quoted 8 lines
If enabling GPU
ipa_counterscauses the clocks to get stuck active, that feels like a hardware bug, so figuring out how to handle that is more important than adding a compatible string.Either add the patch(es) that use the compatible to this series in v2, or put a comment in the commit message on where we can see the
driver changes.
Quoted 5 lines
Quoted 1 line
According to discussions with the GPU vendor, this is a hardware limitation of Mali-G310 rather than a hardware bug, and it has been addressed in newer Mali GPU families.
Quoted 5 lines
Quoted 5 lines
I represent the said GPU vendor and I think I know what you're talking about, but you're taking the wrong approach. All G310s have a problem where in order to enable access to the
ipa_countersthe automatic clock gating gets disabled. So the solution that needs to be implemented when we add support forIPA_COUNTERswill apply to allGPUs, not just MX952.
Quoted 3 lines
Yes. We have bring-up G310 (V2) GPU on both i.MX95 and i.MX952. And auto clock gating mechanism is firstly introduced in i.MX952 (not supported
on i.MX95).
Quoted 2 lines
According to your update, solution needs to be implemented to all GPUs which support auto clock gating mechanism after
IPA_COUNTERsaresupported in the driver, right?
A solution is needed, yes.
Quoted 1 line
What's your suggestions for 952 gpu dtb node?
There is no
IPA_COUNTERuse in Panthor at the moment. Unless your DVFS controller uses that, I would suggest that we don't introduce a compatible for 952 until the time we add support for reading the counters.
Quoted 7 lines
It helps if you think in terms of what is already in upstream, rather than mixing with the tests that uses kbase code. Does your hardware need extra code in upstream in order to function? If so, where is that code? If not, then let's not introduce the compatible until we are absolutely sure we need it because we have code specific to that SoC. For everything else we will implement an architecture fix if needed.
Got it. The following compatible string is the correct choice since the GPU on i.MX952 is fully compatible with the GPU on i.MX95 now. compatible = "nxp,imx95-mali", "arm,mali-valhall-csf";
I will not mix tests with kbase code in the following upstream patches for panthor driver.
Quoted 12 lines
Best regards,
Liviu--
====================| I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯
Liviu Dudau
maintainerRe: Re: Re: Re: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
Quoted 151 lines · Guangliu Ding
Hi Liviu
Thanks a lot for your sharing.
Quoted 139 lines · Guangliu Ding
Quoted 19 lines
Hi Liviu
Quoted 17 lines · Guangliu Ding
Quoted 16 lines
Hi Liviu
Quoted 14 lines · Guangliu Ding
Quoted 13 lines
Hi Daniel
Quoted 11 lines · Guangliu Ding
Quoted 10 lines
[You don't often get email from [email protected]. Learn why this is important at
https://aka.ms/LearnAboutSenderIdentification
]Hi Liviu
Thanks for your review. Please refer to my comments below:
Quoted 1 line
On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding
Quoted 96 lines · wrote:
Quoted 96 lines
Quoted 63 lines
Quoted 63 lines
Quoted 38 lines
Quoted 38 lines
Quoted 38 lines
Quoted 38 lines
Quoted 11 lines
Add compatible string of Mali G310 GPU on i.MX952 board.
Signed-off-by Guangliu Ding <[email protected]>Reviewed-by Jiyu Yang <[email protected]>---
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.y
aml
| 1
+Quoted 7 lines
1 file changed, 1 insertion(+)diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-valhall -csf
.yam
lb/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf. yaml
Quoted 12 lines
index
8eccd4338a2b..6a10843a26e2100644
---
a/Documentation/devicetree/bindings/gpu/arm,mali-valhall -csf
.yam
l
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-val +++ hall
+++ -csf
+++ .yam
+++ lReview properties: · line 23
Quoted 4 lines
(quoted diff) +1
-0@@ -20,6 +20,7 @@ properties: - enum: - mediatek,mt8196-mali - nxp,imx95-mali # G310 + - nxp,imx952-mali # G310Can you explain why this is needed? Can it not be covered by the existing compatible?
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
There are functional differences in GPU module (GPUMIX) between
i.MX95 and i.MX952. So they cannot be fully covered by a single existingcompatible.
Quoted 20 lines
Quoted 19 lines
Quoted 3 lines
On i.MX952, The GPU clock is controlled by hardware GPU auto clock-gating mechanism, while the GPU clock is managed explicitly by the
driver on i.MX95.
Quoted 4 lines
Because of these behavioral differences, separate compatible strings "nxp,imx95-mali" and "nxp,imx952-mali" are needed to allow the driver to handle the two variants independently and to keep room for future
divergence.
This information should be added in the commit message explaining why
the change is needed.
But then where is the driver code taking care of these diferences?
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Yes. Currently the driver does not require "nxp,imx952-mali" string. However, when GPU
ipa_countersare enabled to calculate the GPU busy_time/idle_time for GPU DVFS feature, they will conflict with the hardware GPU auto clock‑gating mechanism, causing GPU clock to remainalways on.
Quoted 2 lines
In such cases,
ipa_countersneed to be disabled so that the GPU auto clock‑gating mechanism can operate normally, using"nxp,imx952-mali"
Quoted 8 lines
Quoted 8 lines
string.
OK, I understand that you're following guidance from some other senior people on how to upstream patches so you've tried to create the smallest patchset to ensure that it gets reviewed and accepted, but in this case we need to see the other patches as well to decide if your approach is the right one and we do need a separate compatible
string.
Quoted 8 lines
Quoted 8 lines
If enabling GPU
ipa_counterscauses the clocks to get stuck active, that feels like a hardware bug, so figuring out how to handle that is more important than adding a compatible string.Either add the patch(es) that use the compatible to this series in v2, or put a comment in the commit message on where we can see the
driver changes.
Quoted 5 lines
Quoted 1 line
According to discussions with the GPU vendor, this is a hardware limitation of Mali-G310 rather than a hardware bug, and it has been addressed in newer Mali GPU families.
Quoted 5 lines
Quoted 5 lines
I represent the said GPU vendor and I think I know what you're talking about, but you're taking the wrong approach. All G310s have a problem where in order to enable access to the
ipa_countersthe automatic clock gating gets disabled. So the solution that needs to be implemented when we add support forIPA_COUNTERswill apply to allGPUs, not just MX952.
Quoted 3 lines
Yes. We have bring-up G310 (V2) GPU on both i.MX95 and i.MX952. And auto clock gating mechanism is firstly introduced in i.MX952 (not supported
on i.MX95).
Quoted 2 lines
According to your update, solution needs to be implemented to all GPUs which support auto clock gating mechanism after
IPA_COUNTERsaresupported in the driver, right?
A solution is needed, yes.
Quoted 1 line
What's your suggestions for 952 gpu dtb node?
There is no
IPA_COUNTERuse in Panthor at the moment. Unless your DVFS controller uses that, I would suggest that we don't introduce a compatible for 952 until the time we add support for reading the counters.Quoted 7 lines
It helps if you think in terms of what is already in upstream, rather than mixing with the tests that uses kbase code. Does your hardware need extra code in upstream in order to function? If so, where is that code? If not, then let's not introduce the compatible until we are absolutely sure we need it because we have code specific to that SoC. For everything else we will implement an architecture fix if needed.
Quoted 5 lines
Got it. The following compatible string is the correct choice since the GPU on i.MX952 is fully compatible with the GPU on i.MX95 now. compatible = "nxp,imx95-mali", "arm,mali-valhall-csf";
I will not mix tests with kbase code in the following upstream patches for panthor driver.
OK. I think if you drop patch 2/3 from your series you can send a v3.
Best regards,
Liviu
Signature · 8 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯