public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Enable Mali G310 GPU support on i.MX952 board
@ 2026-03-31 10:12 Guangliu Ding
  2026-03-31 10:12 ` [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support Guangliu Ding
  2026-03-31 10:12 ` [PATCH 2/2] arm64: dts: imx952: Describe Mali G310 GPU Guangliu Ding
  0 siblings, 2 replies; 23+ messages in thread
From: Guangliu Ding @ 2026-03-31 10:12 UTC (permalink / raw)
  To: Daniel Almeida, Alice Ryhl, Boris Brezillon, Steven Price,
	Liviu Dudau, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: dri-devel, devicetree, linux-kernel, imx, linux-arm-kernel,
	Guangliu Ding, Jiyu Yang

This series enable Mali G310 GPU support on i.MX952 boards, the same GPU
IP as the instance on i.MX95 boards.

Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
---
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,
--  
Guangliu Ding <guangliu.ding@nxp.com>



^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-03-31 10:12 [PATCH 0/2] Enable Mali G310 GPU support on i.MX952 board Guangliu Ding
@ 2026-03-31 10:12 ` Guangliu Ding
  2026-03-31 14:31   ` Liviu Dudau
  2026-04-01  7:40   ` Krzysztof Kozlowski
  2026-03-31 10:12 ` [PATCH 2/2] arm64: dts: imx952: Describe Mali G310 GPU Guangliu Ding
  1 sibling, 2 replies; 23+ messages in thread
From: Guangliu Ding @ 2026-03-31 10:12 UTC (permalink / raw)
  To: Daniel Almeida, Alice Ryhl, Boris Brezillon, Steven Price,
	Liviu Dudau, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: dri-devel, devicetree, linux-kernel, imx, linux-arm-kernel,
	Guangliu Ding, Jiyu Yang

Add compatible string of Mali G310 GPU on i.MX952 board.

Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
---
 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.yaml
index 8eccd4338a2b..6a10843a26e2 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
@@ -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
 

-- 
2.34.1



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 2/2] arm64: dts: imx952: Describe Mali G310 GPU
  2026-03-31 10:12 [PATCH 0/2] Enable Mali G310 GPU support on i.MX952 board Guangliu Ding
  2026-03-31 10:12 ` [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support Guangliu Ding
@ 2026-03-31 10:12 ` Guangliu Ding
  1 sibling, 0 replies; 23+ messages in thread
From: Guangliu Ding @ 2026-03-31 10:12 UTC (permalink / raw)
  To: Daniel Almeida, Alice Ryhl, Boris Brezillon, Steven Price,
	Liviu Dudau, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: dri-devel, devicetree, linux-kernel, imx, linux-arm-kernel,
	Guangliu Ding, Jiyu Yang

Support Mali G310 GPU on i.MX952 board. Describe this GPU in the DT.
Include dummy GPU voltage regulator and OPP tables.

Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx952.dtsi | 36 +++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx952.dtsi b/arch/arm64/boot/dts/freescale/imx952.dtsi
index 91fe4916ac04..0bd3e7fc0674 100644
--- a/arch/arm64/boot/dts/freescale/imx952.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx952.dtsi
@@ -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>;
+		};
 	};
 };

-- 
2.34.1



^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-03-31 10:12 ` [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support Guangliu Ding
@ 2026-03-31 14:31   ` Liviu Dudau
  2026-04-01  8:48     ` [EXT] " Guangliu Ding
  2026-04-01  7:40   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 23+ messages in thread
From: Liviu Dudau @ 2026-03-31 14:31 UTC (permalink / raw)
  To: Guangliu Ding
  Cc: Daniel Almeida, Alice Ryhl, Boris Brezillon, Steven Price,
	David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	dri-devel, devicetree, linux-kernel, imx, linux-arm-kernel,
	Jiyu Yang

On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding wrote:
> Add compatible string of Mali G310 GPU on i.MX952 board.
> 
> Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
> Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
> ---
>  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.yaml
> index 8eccd4338a2b..6a10843a26e2 100644
> --- a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
> @@ -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

>                - rockchip,rk3588-mali
>            - const: arm,mali-valhall-csf   # Mali Valhall GPU model/revision is fully discoverable
>  
> 
> -- 
> 2.34.1
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-03-31 10:12 ` [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support Guangliu Ding
  2026-03-31 14:31   ` Liviu Dudau
@ 2026-04-01  7:40   ` Krzysztof Kozlowski
  2026-04-01  9:11     ` Guangliu Ding
  1 sibling, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-01  7:40 UTC (permalink / raw)
  To: Guangliu Ding
  Cc: Daniel Almeida, Alice Ryhl, Boris Brezillon, Steven Price,
	Liviu Dudau, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dri-devel, devicetree,
	linux-kernel, imx, linux-arm-kernel, Jiyu Yang

On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding wrote:
> Add compatible string of Mali G310 GPU on i.MX952 board.

We see this from the diff. Say something useful.

> 
> Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
> Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>

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



^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: [EXT] Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-03-31 14:31   ` Liviu Dudau
@ 2026-04-01  8:48     ` Guangliu Ding
  2026-04-01  8:56       ` Krzysztof Kozlowski
  2026-04-01  9:19       ` Daniel Baluta
  0 siblings, 2 replies; 23+ messages in thread
From: Guangliu Ding @ 2026-04-01  8:48 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: Daniel Almeida, Alice Ryhl, Boris Brezillon, Steven Price,
	David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

Hi Liviu

Thanks for your review. Please refer to my comments below:

> On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding wrote:
> > Add compatible string of Mali G310 GPU on i.MX952 board.
> >
> > Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
> > Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
> > ---
> >  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.yaml
> > index 8eccd4338a2b..6a10843a26e2 100644
> > --- a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
> > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
> > @@ -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?

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.

> 
> Best regards,
> Liviu
> 
> >                - rockchip,rk3588-mali
> >            - const: arm,mali-valhall-csf   # Mali Valhall GPU
> model/revision is fully discoverable
> >
> >
> > --
> > 2.34.1
> >
> 
> --
> ====================
> | I would like to |
> | fix the world,  |
> | but they're not |
> | giving me the   |
>  \ source code!  /
>   ---------------
>     ¯\_(ツ)_/¯

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [EXT] Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01  8:48     ` [EXT] " Guangliu Ding
@ 2026-04-01  8:56       ` Krzysztof Kozlowski
  2026-04-01  9:19       ` Daniel Baluta
  1 sibling, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-01  8:56 UTC (permalink / raw)
  To: Guangliu Ding, Liviu Dudau
  Cc: Daniel Almeida, Alice Ryhl, Boris Brezillon, Steven Price,
	David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

On 01/04/2026 10:48, Guangliu Ding wrote:
> Hi Liviu
> 
> Thanks for your review. Please refer to my comments below:
> 
>> On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding wrote:
>>> Add compatible string of Mali G310 GPU on i.MX952 board.
>>>
>>> Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
>>> Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
>>> ---
>>>  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.yaml
>>> index 8eccd4338a2b..6a10843a26e2 100644
>>> --- a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
>>> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
>>> @@ -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?
> 
> 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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01  7:40   ` Krzysztof Kozlowski
@ 2026-04-01  9:11     ` Guangliu Ding
  0 siblings, 0 replies; 23+ messages in thread
From: Guangliu Ding @ 2026-04-01  9:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Daniel Almeida, Alice Ryhl, Boris Brezillon, Steven Price,
	Liviu Dudau, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

Hi Krzysztof

This is my first upstream contribution. I will improve the patch in v2.

> On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding wrote:
> > 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.

> 
> >
> > Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
> > Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
> 
> 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.

> 
> Best regards,
> Krzysztof



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [EXT] Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01  8:48     ` [EXT] " Guangliu Ding
  2026-04-01  8:56       ` Krzysztof Kozlowski
@ 2026-04-01  9:19       ` Daniel Baluta
  2026-04-01  9:43         ` Guangliu Ding
  1 sibling, 1 reply; 23+ messages in thread
From: Daniel Baluta @ 2026-04-01  9:19 UTC (permalink / raw)
  To: Guangliu Ding, Liviu Dudau
  Cc: Daniel Almeida, Alice Ryhl, Boris Brezillon, Steven Price,
	David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

On 4/1/26 11:48, Guangliu Ding wrote:
> [You don't often get email from guangliu.ding@nxp.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Hi Liviu
>
> Thanks for your review. Please refer to my comments below:
>
>> On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding wrote:
>>> Add compatible string of Mali G310 GPU on i.MX952 board.
>>>
>>> Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
>>> Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
>>> ---
>>>  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.yaml
>>> index 8eccd4338a2b..6a10843a26e2 100644
>>> --- a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
>>> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
>>> @@ -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?
> 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?




^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01  9:19       ` Daniel Baluta
@ 2026-04-01  9:43         ` Guangliu Ding
  2026-04-01 10:13           ` Liviu Dudau
  0 siblings, 1 reply; 23+ messages in thread
From: Guangliu Ding @ 2026-04-01  9:43 UTC (permalink / raw)
  To: Daniel Baluta (OSS), Liviu Dudau
  Cc: Daniel Almeida, Alice Ryhl, Boris Brezillon, Steven Price,
	David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

Hi Daniel

> On 4/1/26 11:48, Guangliu Ding wrote:
> > [You don't often get email from guangliu.ding@nxp.com. Learn why this
> > is important at https://aka.ms/LearnAboutSenderIdentification ]
> >
> > Hi Liviu
> >
> > Thanks for your review. Please refer to my comments below:
> >
> >> On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding wrote:
> >>> Add compatible string of Mali G310 GPU on i.MX952 board.
> >>>
> >>> Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
> >>> Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
> >>> ---
> >>>  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.yaml
> >>> index 8eccd4338a2b..6a10843a26e2 100644
> >>> ---
> >>> a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
> >>> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yam
> >>> +++ l
> >>> @@ -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?
> > 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?
> 

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.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01  9:43         ` Guangliu Ding
@ 2026-04-01 10:13           ` Liviu Dudau
  2026-04-01 10:31             ` Guangliu Ding
  0 siblings, 1 reply; 23+ messages in thread
From: Liviu Dudau @ 2026-04-01 10:13 UTC (permalink / raw)
  To: Guangliu Ding
  Cc: Daniel Baluta (OSS), Daniel Almeida, Alice Ryhl, Boris Brezillon,
	Steven Price, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

On Wed, Apr 01, 2026 at 09:43:12AM +0000, Guangliu Ding wrote:
> Hi Daniel
> 
> > On 4/1/26 11:48, Guangliu Ding wrote:
> > > [You don't often get email from guangliu.ding@nxp.com. Learn why this
> > > is important at https://aka.ms/LearnAboutSenderIdentification ]
> > >
> > > Hi Liviu
> > >
> > > Thanks for your review. Please refer to my comments below:
> > >
> > >> On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding wrote:
> > >>> Add compatible string of Mali G310 GPU on i.MX952 board.
> > >>>
> > >>> Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
> > >>> Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
> > >>> ---
> > >>>  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.yaml
> > >>> index 8eccd4338a2b..6a10843a26e2 100644
> > >>> ---
> > >>> a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
> > >>> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yam
> > >>> +++ l
> > >>> @@ -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?
> > > 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?
> > 
> 
> 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.

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

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯


^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Re: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01 10:13           ` Liviu Dudau
@ 2026-04-01 10:31             ` Guangliu Ding
  2026-04-01 10:38               ` Krzysztof Kozlowski
  2026-04-01 15:26               ` Liviu Dudau
  0 siblings, 2 replies; 23+ messages in thread
From: Guangliu Ding @ 2026-04-01 10:31 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: Daniel Baluta (OSS), Daniel Almeida, Alice Ryhl, Boris Brezillon,
	Steven Price, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

Hi Liviu

> On Wed, Apr 01, 2026 at 09:43:12AM +0000, Guangliu Ding wrote:
> > Hi Daniel
> >
> > > On 4/1/26 11:48, Guangliu Ding wrote:
> > > > [You don't often get email from guangliu.ding@nxp.com. Learn why
> > > > this is important at https://aka.ms/LearnAboutSenderIdentification
> > > > ]
> > > >
> > > > Hi Liviu
> > > >
> > > > Thanks for your review. Please refer to my comments below:
> > > >
> > > >> On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding wrote:
> > > >>> Add compatible string of Mali G310 GPU on i.MX952 board.
> > > >>>
> > > >>> Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
> > > >>> Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
> > > >>> ---
> > > >>>  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.yam
> > > >>> l
> > > >> b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
> > > >>> index 8eccd4338a2b..6a10843a26e2 100644
> > > >>> ---
> > > >>> a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yam
> > > >>> l
> > > >>> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf
> > > >>> +++ .yam
> > > >>> +++ l
> > > >>> @@ -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?
> > > > 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?
> > >
> >
> > 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.
> 
> 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.
> 

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.

> Best regards,
> Liviu
> 
> --
> ====================
> | I would like to |
> | fix the world,  |
> | but they're not |
> | giving me the   |
>  \ source code!  /
>   ---------------
>     ¯\_(ツ)_/¯

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01 10:31             ` Guangliu Ding
@ 2026-04-01 10:38               ` Krzysztof Kozlowski
  2026-04-01 11:01                 ` Guangliu Ding
  2026-04-01 15:26               ` Liviu Dudau
  1 sibling, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-01 10:38 UTC (permalink / raw)
  To: Guangliu Ding, Liviu Dudau
  Cc: Daniel Baluta (OSS), Daniel Almeida, Alice Ryhl, Boris Brezillon,
	Steven Price, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

On 01/04/2026 12:31, Guangliu Ding wrote:
>> 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.

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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01 10:38               ` Krzysztof Kozlowski
@ 2026-04-01 11:01                 ` Guangliu Ding
  2026-04-01 11:03                   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 23+ messages in thread
From: Guangliu Ding @ 2026-04-01 11:01 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Liviu Dudau
  Cc: Daniel Baluta (OSS), Daniel Almeida, Alice Ryhl, Boris Brezillon,
	Steven Price, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

Hi Krzysztof

> On 01/04/2026 12:31, Guangliu Ding wrote:
> >> 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.
> 
> 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

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?


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01 11:01                 ` Guangliu Ding
@ 2026-04-01 11:03                   ` Krzysztof Kozlowski
  2026-04-01 11:27                     ` Guangliu Ding
  0 siblings, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-01 11:03 UTC (permalink / raw)
  To: Guangliu Ding, Liviu Dudau
  Cc: Daniel Baluta (OSS), Daniel Almeida, Alice Ryhl, Boris Brezillon,
	Steven Price, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

On 01/04/2026 13:01, Guangliu Ding wrote:
> Hi Krzysztof
> 
>> On 01/04/2026 12:31, Guangliu Ding wrote:
>>>> 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.
>>
>> 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
> 
> 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?

So does that mean you decided not to read writing bindings document?

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01 11:03                   ` Krzysztof Kozlowski
@ 2026-04-01 11:27                     ` Guangliu Ding
  2026-04-01 16:07                       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 23+ messages in thread
From: Guangliu Ding @ 2026-04-01 11:27 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Liviu Dudau
  Cc: Daniel Baluta (OSS), Daniel Almeida, Alice Ryhl, Boris Brezillon,
	Steven Price, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

Hi Krzysztof

> On 01/04/2026 13:01, Guangliu Ding wrote:
> > Hi Krzysztof
> >
> >> On 01/04/2026 12:31, Guangliu Ding wrote:
> >>>> 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.
> >>
> >> 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
> >
> > 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?
> 
> 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.

> Best regards,
> Krzysztof

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Re: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01 10:31             ` Guangliu Ding
  2026-04-01 10:38               ` Krzysztof Kozlowski
@ 2026-04-01 15:26               ` Liviu Dudau
  2026-04-01 15:59                 ` Guangliu Ding
  1 sibling, 1 reply; 23+ messages in thread
From: Liviu Dudau @ 2026-04-01 15:26 UTC (permalink / raw)
  To: Guangliu Ding
  Cc: Daniel Baluta (OSS), Daniel Almeida, Alice Ryhl, Boris Brezillon,
	Steven Price, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

On Wed, Apr 01, 2026 at 10:31:01AM +0000, Guangliu Ding wrote:
> Hi Liviu
> 
> > On Wed, Apr 01, 2026 at 09:43:12AM +0000, Guangliu Ding wrote:
> > > Hi Daniel
> > >
> > > > On 4/1/26 11:48, Guangliu Ding wrote:
> > > > > [You don't often get email from guangliu.ding@nxp.com. Learn why
> > > > > this is important at https://aka.ms/LearnAboutSenderIdentification
> > > > > ]
> > > > >
> > > > > Hi Liviu
> > > > >
> > > > > Thanks for your review. Please refer to my comments below:
> > > > >
> > > > >> On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding wrote:
> > > > >>> Add compatible string of Mali G310 GPU on i.MX952 board.
> > > > >>>
> > > > >>> Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
> > > > >>> Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
> > > > >>> ---
> > > > >>>  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.yam
> > > > >>> l
> > > > >> b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
> > > > >>> index 8eccd4338a2b..6a10843a26e2 100644
> > > > >>> ---
> > > > >>> a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yam
> > > > >>> l
> > > > >>> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf
> > > > >>> +++ .yam
> > > > >>> +++ l
> > > > >>> @@ -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?
> > > > > 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?
> > > >
> > >
> > > 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.
> > 
> > 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.
> > 
> 
> 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.

> 
> 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.

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!  /
  ---------------
    ¯\_(ツ)_/¯


^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Re: Re: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01 15:26               ` Liviu Dudau
@ 2026-04-01 15:59                 ` Guangliu Ding
  2026-04-01 17:20                   ` Liviu Dudau
  0 siblings, 1 reply; 23+ messages in thread
From: Guangliu Ding @ 2026-04-01 15:59 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: Daniel Baluta (OSS), Daniel Almeida, Alice Ryhl, Boris Brezillon,
	Steven Price, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

Hi Liviu

> On Wed, Apr 01, 2026 at 10:31:01AM +0000, Guangliu Ding wrote:
> > Hi Liviu
> >
> > > On Wed, Apr 01, 2026 at 09:43:12AM +0000, Guangliu Ding wrote:
> > > > Hi Daniel
> > > >
> > > > > On 4/1/26 11:48, Guangliu Ding wrote:
> > > > > > [You don't often get email from guangliu.ding@nxp.com. Learn
> > > > > > why this is important at
> > > > > > https://aka.ms/LearnAboutSenderIdentification
> > > > > > ]
> > > > > >
> > > > > > Hi Liviu
> > > > > >
> > > > > > Thanks for your review. Please refer to my comments below:
> > > > > >
> > > > > >> On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding wrote:
> > > > > >>> Add compatible string of Mali G310 GPU on i.MX952 board.
> > > > > >>>
> > > > > >>> Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
> > > > > >>> Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
> > > > > >>> ---
> > > > > >>>
> > > > > >>> Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.y
> > > > > >>> aml
> > > > > >>> | 1
> > > > > >>> +
> > > > > >>>  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.
> > > > > >> yaml
> > > > > >>> index 8eccd4338a2b..6a10843a26e2 100644
> > > > > >>> ---
> > > > > >>> a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf
> > > > > >>> .yam
> > > > > >>> l
> > > > > >>> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall
> > > > > >>> +++ -csf
> > > > > >>> +++ .yam
> > > > > >>> +++ l
> > > > > >>> @@ -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?
> > > > > > 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?
> > > > >
> > > >
> > > > 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.
> > >
> > > 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.
> > >
> >
> > 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.

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?
> 
> >
> > 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.
> 
> 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!  /
>   ---------------
>     ¯\_(ツ)_/¯

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01 11:27                     ` Guangliu Ding
@ 2026-04-01 16:07                       ` Krzysztof Kozlowski
  2026-04-01 17:52                         ` [EXT] " Guangliu Ding
  0 siblings, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-01 16:07 UTC (permalink / raw)
  To: Guangliu Ding, Liviu Dudau
  Cc: Daniel Baluta (OSS), Daniel Almeida, Alice Ryhl, Boris Brezillon,
	Steven Price, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

On 01/04/2026 13:27, Guangliu Ding wrote:
>>>>
>>>> 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
>>>
>>> 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?
>>
>> 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.

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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Re: Re: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01 15:59                 ` Guangliu Ding
@ 2026-04-01 17:20                   ` Liviu Dudau
  2026-04-01 18:03                     ` Guangliu Ding
  0 siblings, 1 reply; 23+ messages in thread
From: Liviu Dudau @ 2026-04-01 17:20 UTC (permalink / raw)
  To: Guangliu Ding
  Cc: Daniel Baluta (OSS), Daniel Almeida, Alice Ryhl, Boris Brezillon,
	Steven Price, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

On Wed, Apr 01, 2026 at 03:59:23PM +0000, Guangliu Ding wrote:
> Hi Liviu
> 
> > On Wed, Apr 01, 2026 at 10:31:01AM +0000, Guangliu Ding wrote:
> > > Hi Liviu
> > >
> > > > On Wed, Apr 01, 2026 at 09:43:12AM +0000, Guangliu Ding wrote:
> > > > > Hi Daniel
> > > > >
> > > > > > On 4/1/26 11:48, Guangliu Ding wrote:
> > > > > > > [You don't often get email from guangliu.ding@nxp.com. Learn
> > > > > > > why this is important at
> > > > > > > https://aka.ms/LearnAboutSenderIdentification
> > > > > > > ]
> > > > > > >
> > > > > > > Hi Liviu
> > > > > > >
> > > > > > > Thanks for your review. Please refer to my comments below:
> > > > > > >
> > > > > > >> On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding wrote:
> > > > > > >>> Add compatible string of Mali G310 GPU on i.MX952 board.
> > > > > > >>>
> > > > > > >>> Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
> > > > > > >>> Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
> > > > > > >>> ---
> > > > > > >>>
> > > > > > >>> Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.y
> > > > > > >>> aml
> > > > > > >>> | 1
> > > > > > >>> +
> > > > > > >>>  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.
> > > > > > >> yaml
> > > > > > >>> index 8eccd4338a2b..6a10843a26e2 100644
> > > > > > >>> ---
> > > > > > >>> a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf
> > > > > > >>> .yam
> > > > > > >>> l
> > > > > > >>> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall
> > > > > > >>> +++ -csf
> > > > > > >>> +++ .yam
> > > > > > >>> +++ l
> > > > > > >>> @@ -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?
> > > > > > > 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?
> > > > > >
> > > > >
> > > > > 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.
> > > >
> > > > 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.
> > > >
> > >
> > > 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.
> 
> 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?

A solution is needed, yes.

> 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

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯


^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: [EXT] Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01 16:07                       ` Krzysztof Kozlowski
@ 2026-04-01 17:52                         ` Guangliu Ding
  0 siblings, 0 replies; 23+ messages in thread
From: Guangliu Ding @ 2026-04-01 17:52 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Liviu Dudau
  Cc: Daniel Baluta (OSS), Daniel Almeida, Alice Ryhl, Boris Brezillon,
	Steven Price, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

Hi 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:

> On 01/04/2026 13:27, Guangliu Ding wrote:
> >>>>
> >>>> 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
> >>>
> >>> 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?
> >>
> >> 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.
> 
> 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";

^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Re: Re: Re: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01 17:20                   ` Liviu Dudau
@ 2026-04-01 18:03                     ` Guangliu Ding
  2026-04-02 15:14                       ` Liviu Dudau
  0 siblings, 1 reply; 23+ messages in thread
From: Guangliu Ding @ 2026-04-01 18:03 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: Daniel Baluta (OSS), Daniel Almeida, Alice Ryhl, Boris Brezillon,
	Steven Price, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

Hi Liviu

Thanks a lot for your sharing.

> On Wed, Apr 01, 2026 at 03:59:23PM +0000, Guangliu Ding wrote:
> > Hi Liviu
> >
> > > On Wed, Apr 01, 2026 at 10:31:01AM +0000, Guangliu Ding wrote:
> > > > Hi Liviu
> > > >
> > > > > On Wed, Apr 01, 2026 at 09:43:12AM +0000, Guangliu Ding wrote:
> > > > > > Hi Daniel
> > > > > >
> > > > > > > On 4/1/26 11:48, Guangliu Ding wrote:
> > > > > > > > [You don't often get email from guangliu.ding@nxp.com.
> > > > > > > > Learn why this is important at
> > > > > > > > https://aka.ms/LearnAboutSenderIdentification
> > > > > > > > ]
> > > > > > > >
> > > > > > > > Hi Liviu
> > > > > > > >
> > > > > > > > Thanks for your review. Please refer to my comments below:
> > > > > > > >
> > > > > > > >> On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding
> wrote:
> > > > > > > >>> Add compatible string of Mali G310 GPU on i.MX952 board.
> > > > > > > >>>
> > > > > > > >>> Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
> > > > > > > >>> Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
> > > > > > > >>> ---
> > > > > > > >>>
> > > > > > > >>> Documentation/devicetree/bindings/gpu/arm,mali-valhall-c
> > > > > > > >>> sf.y
> > > > > > > >>> aml
> > > > > > > >>> | 1
> > > > > > > >>> +
> > > > > > > >>>  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.
> > > > > > > >> yaml
> > > > > > > >>> index 8eccd4338a2b..6a10843a26e2 100644
> > > > > > > >>> ---
> > > > > > > >>> a/Documentation/devicetree/bindings/gpu/arm,mali-valhall
> > > > > > > >>> -csf
> > > > > > > >>> .yam
> > > > > > > >>> l
> > > > > > > >>> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-val
> > > > > > > >>> +++ hall
> > > > > > > >>> +++ -csf
> > > > > > > >>> +++ .yam
> > > > > > > >>> +++ l
> > > > > > > >>> @@ -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?
> > > > > > > > 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?
> > > > > > >
> > > > > >
> > > > > > 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.
> > > > >
> > > > > 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.
> > > > >
> > > >
> > > > 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.
> >
> > 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?
> 
> A solution is needed, yes.
> 
> > 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.
> 

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.

> Best regards,
> Liviu
> 
> --
> ====================
> | I would like to |
> | fix the world,  |
> | but they're not |
> | giving me the   |
>  \ source code!  /
>   ---------------
>     ¯\_(ツ)_/¯

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Re: Re: Re: Re: [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
  2026-04-01 18:03                     ` Guangliu Ding
@ 2026-04-02 15:14                       ` Liviu Dudau
  0 siblings, 0 replies; 23+ messages in thread
From: Liviu Dudau @ 2026-04-02 15:14 UTC (permalink / raw)
  To: Guangliu Ding
  Cc: Daniel Baluta (OSS), Daniel Almeida, Alice Ryhl, Boris Brezillon,
	Steven Price, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, Jiyu Yang

On Wed, Apr 01, 2026 at 06:03:28PM +0000, Guangliu Ding wrote:
> Hi Liviu
> 
> Thanks a lot for your sharing.
> 
> > On Wed, Apr 01, 2026 at 03:59:23PM +0000, Guangliu Ding wrote:
> > > Hi Liviu
> > >
> > > > On Wed, Apr 01, 2026 at 10:31:01AM +0000, Guangliu Ding wrote:
> > > > > Hi Liviu
> > > > >
> > > > > > On Wed, Apr 01, 2026 at 09:43:12AM +0000, Guangliu Ding wrote:
> > > > > > > Hi Daniel
> > > > > > >
> > > > > > > > On 4/1/26 11:48, Guangliu Ding wrote:
> > > > > > > > > [You don't often get email from guangliu.ding@nxp.com.
> > > > > > > > > Learn why this is important at
> > > > > > > > > https://aka.ms/LearnAboutSenderIdentification
> > > > > > > > > ]
> > > > > > > > >
> > > > > > > > > Hi Liviu
> > > > > > > > >
> > > > > > > > > Thanks for your review. Please refer to my comments below:
> > > > > > > > >
> > > > > > > > >> On Tue, Mar 31, 2026 at 06:12:38PM +0800, Guangliu Ding
> > wrote:
> > > > > > > > >>> Add compatible string of Mali G310 GPU on i.MX952 board.
> > > > > > > > >>>
> > > > > > > > >>> Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
> > > > > > > > >>> Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
> > > > > > > > >>> ---
> > > > > > > > >>>
> > > > > > > > >>> Documentation/devicetree/bindings/gpu/arm,mali-valhall-c
> > > > > > > > >>> sf.y
> > > > > > > > >>> aml
> > > > > > > > >>> | 1
> > > > > > > > >>> +
> > > > > > > > >>>  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.
> > > > > > > > >> yaml
> > > > > > > > >>> index 8eccd4338a2b..6a10843a26e2 100644
> > > > > > > > >>> ---
> > > > > > > > >>> a/Documentation/devicetree/bindings/gpu/arm,mali-valhall
> > > > > > > > >>> -csf
> > > > > > > > >>> .yam
> > > > > > > > >>> l
> > > > > > > > >>> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-val
> > > > > > > > >>> +++ hall
> > > > > > > > >>> +++ -csf
> > > > > > > > >>> +++ .yam
> > > > > > > > >>> +++ l
> > > > > > > > >>> @@ -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?
> > > > > > > > > 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?
> > > > > > > >
> > > > > > >
> > > > > > > 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.
> > > > > >
> > > > > > 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.
> > > > > >
> > > > >
> > > > > 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.
> > >
> > > 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?
> > 
> > A solution is needed, yes.
> > 
> > > 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.
> > 
> 
> 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

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2026-04-02 15:15 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31 10:12 [PATCH 0/2] Enable Mali G310 GPU support on i.MX952 board Guangliu Ding
2026-03-31 10:12 ` [PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support Guangliu Ding
2026-03-31 14:31   ` Liviu Dudau
2026-04-01  8:48     ` [EXT] " Guangliu Ding
2026-04-01  8:56       ` Krzysztof Kozlowski
2026-04-01  9:19       ` Daniel Baluta
2026-04-01  9:43         ` Guangliu Ding
2026-04-01 10:13           ` Liviu Dudau
2026-04-01 10:31             ` Guangliu Ding
2026-04-01 10:38               ` Krzysztof Kozlowski
2026-04-01 11:01                 ` Guangliu Ding
2026-04-01 11:03                   ` Krzysztof Kozlowski
2026-04-01 11:27                     ` Guangliu Ding
2026-04-01 16:07                       ` Krzysztof Kozlowski
2026-04-01 17:52                         ` [EXT] " Guangliu Ding
2026-04-01 15:26               ` Liviu Dudau
2026-04-01 15:59                 ` Guangliu Ding
2026-04-01 17:20                   ` Liviu Dudau
2026-04-01 18:03                     ` Guangliu Ding
2026-04-02 15:14                       ` Liviu Dudau
2026-04-01  7:40   ` Krzysztof Kozlowski
2026-04-01  9:11     ` Guangliu Ding
2026-03-31 10:12 ` [PATCH 2/2] arm64: dts: imx952: Describe Mali G310 GPU Guangliu Ding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox