arm64: dts: imx95: Use GPU_CGC as core clock for GPU
Subsystems (2)
PATCH 1/1 arm64: dts: imx95: Use GPU_CGC as core clock for GPU
The i.MX95 imx-sm introduced new GPU_CGC clock since imx-sm commit ca5e078833fa ("SM-128: Add clock management via CCM LPCG direct control") which are downstream clock of GPU clock. These new GPU_CGC clock gate the existing GPU clock. Currently, without clk_ignore_unused on kernel command line, those new GPU_CGC clock are unused and the kernel will disable them. This has no impact on i.MX95 A0/A1, but does prevent GPU register access from working at all on i.MX95 B0. The GPU_CGC clock are present on both i.MX95 A0/A1/B0, therefore update the DT such, that the GPU core clock are the GPU_CGC clock. When the panthor driver enables the GPU core clock, it enables both the GPU_CGC as well as its parent GPU clock.
---
Cc: Conor Dooley <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Frank Li <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Rain Yang <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
--- arch/arm64/boot/dts/freescale/imx95-clock.h | 1 + arch/arm64/boot/dts/freescale/imx95.dtsi | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx95-clock.h +1 -0
@@ -183,5 +183,6 @@#define IMX95_CLK_SEL_A55P (IMX95_CCM_NUM_CLK_SRC + 123 + 7)#define IMX95_CLK_SEL_DRAM (IMX95_CCM_NUM_CLK_SRC + 123 + 8)#define IMX95_CLK_SEL_TEMPSENSE (IMX95_CCM_NUM_CLK_SRC + 123 + 9) +#define IMX95_CLK_GPU_CGC (IMX95_CCM_NUM_CLK_SRC + 123 + 10)#endif /* __CLOCK_IMX95_H */
arch/arm64/boot/dts/freescale/imx95.dtsi +1 -1
@@ -2874,7 +2874,7 @@ netc_emdio: mdio@0,0 { gpu: gpu@4d900000 { compatible = "nxp,imx95-mali", "arm,mali-valhall-csf"; reg = <0 0x4d900000 0 0x480000>; - clocks = <&scmi_clk IMX95_CLK_GPU>, <&scmi_clk IMX95_CLK_GPUAPB>; + clocks = <&scmi_clk IMX95_CLK_GPU_CGC>, <&scmi_clk IMX95_CLK_GPUAPB>; clock-names = "core", "coregroup"; interrupts = <GIC_SPI 289 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>,
Signature · 1 line
2.51.0
Quoted 60 lines · Marek Vasut
The i.MX95 imx-sm introduced new
GPU_CGCclock since imx-sm commitca5e078833fa("SM-128: Add clock management via CCM LPCG direct control") which are downstream clock of GPU clock. These newGPU_CGCclock gate the existing GPU clock. Currently, withoutclk_ignore_unusedon kernel command line, those newGPU_CGCclock are unused and the kernel will disable them. This has no impact on i.MX95 A0/A1, but does prevent GPU register access from working at all on i.MX95 B0. TheGPU_CGCclock are present on both i.MX95 A0/A1/B0, therefore update the DT such, that the GPU core clock are theGPU_CGCclock. When the panthor driver enables the GPU core clock, it enables both theGPU_CGCas well as its parent GPU clock.Fixes 67934f248e64 ("arm64: dts: imx95: Describe Mali G310 GPU")Signed-off-by Marek Vasut <[email protected]>---
Cc: Conor Dooley <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Frank Li <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Rain Yang <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---arch/arm64/boot/dts/freescale/imx95-clock.h| 1 +arch/arm64/boot/dts/freescale/imx95.dtsi| 2 +-2 files changed, 2 insertions(+), 1 deletion(-)arch/arm64/boot/dts/freescale/imx95-clock.h +1
-0@@ -183,5 +183,6 @@#define IMX95_CLK_SEL_A55P (IMX95_CCM_NUM_CLK_SRC + 123 + 7)#define IMX95_CLK_SEL_DRAM (IMX95_CCM_NUM_CLK_SRC + 123 + 8)#define IMX95_CLK_SEL_TEMPSENSE (IMX95_CCM_NUM_CLK_SRC + 123 + 9) +#define IMX95_CLK_GPU_CGC (IMX95_CCM_NUM_CLK_SRC + 123 + 10)#endif /* __CLOCK_IMX95_H */ arch/arm64/boot/dts/freescale/imx95.dtsi +1
-1@@ -2874,7 +2874,7 @@ netc_emdio: mdio@0,0 { gpu: gpu@4d900000 { compatible = "nxp,imx95-mali", "arm,mali-valhall-csf"; reg = <0 0x4d900000 0 0x480000>; - clocks = <&scmi_clk IMX95_CLK_GPU>, <&scmi_clk IMX95_CLK_GPUAPB>; + clocks = <&scmi_clk IMX95_CLK_GPU_CGC>, <&scmi_clk IMX95_CLK_GPUAPB>; clock-names = "core", "coregroup"; interrupts = <GIC_SPI 289 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>,Signature · 1 line
2.51.0
Hi Marek,
Thanks for integrating this downstream patch. Please note that CLK_GPUAPB and CLK_GPU are always-on, so the commit message should be amended accordingly.
Additionally, the IMX95_CLK_GPUAPB handle shall be removed, as there is no valid OPP entry in the frequency table, this also helps minimize differences between downstream and upstream, reducing maintenance effort.
On 12/3/25 3:48 AM, Rain Yang wrote:
Hello Rain,
Quoted 29 lines
Quoted 27 lines
arch/arm64/boot/dts/freescale/imx95-clock.h +1
-0@@ -183,5 +183,6 @@#define IMX95_CLK_SEL_A55P (IMX95_CCM_NUM_CLK_SRC + 123 + 7)#define IMX95_CLK_SEL_DRAM (IMX95_CCM_NUM_CLK_SRC + 123 + 8)#define IMX95_CLK_SEL_TEMPSENSE (IMX95_CCM_NUM_CLK_SRC + 123 + 9) +#define IMX95_CLK_GPU_CGC (IMX95_CCM_NUM_CLK_SRC + 123 + 10)#endif /* __CLOCK_IMX95_H */ arch/arm64/boot/dts/freescale/imx95.dtsi +1
-1@@ -2874,7 +2874,7 @@ netc_emdio: mdio@0,0 { gpu: gpu@4d900000 { compatible = "nxp,imx95-mali", "arm,mali-valhall-csf"; reg = <0 0x4d900000 0 0x480000>; - clocks = <&scmi_clk IMX95_CLK_GPU>, <&scmi_clk IMX95_CLK_GPUAPB>; + clocks = <&scmi_clk IMX95_CLK_GPU_CGC>, <&scmi_clk IMX95_CLK_GPUAPB>; clock-names = "core", "coregroup"; interrupts = <GIC_SPI 289 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>,Signature · 1 line
2.51.0Hi Marek,
Quoted 1 line
Thanks for integrating this downstream patch.
Which downstream patch do you refer to ?
Quoted 2 lines
Please note that
CLK_GPUAPBandCLK_GPUare always-on, so the commit message should be amended accordingly.
The GPU clock do not seem to be always-on, neither do the GPUAPB . It seems the SM can turn those clock off perfectly well.
Quoted 3 lines
Additionally, the
IMX95_CLK_GPUAPBhandle shall be removed, as there is no valid OPP entry in the frequency table, this also helps minimize differences between downstream and upstream, reducing maintenance effort.
Downstream kernel forks are not relevant to this discussion, upstream your content and then you won't have to spend maintenance effort on downstream stuff.
Quoted 43 lines · Marek Vasut
On 12/3/25 3:48 AM, Rain Yang wrote:
Hello Rain,
Quoted 29 lines
Quoted 27 lines
arch/arm64/boot/dts/freescale/imx95-clock.h +1
-0@@ -183,5 +183,6 @@#define IMX95_CLK_SEL_A55P (IMX95_CCM_NUM_CLK_SRC + 123 + 7)#define IMX95_CLK_SEL_DRAM (IMX95_CCM_NUM_CLK_SRC + 123 + 8)#define IMX95_CLK_SEL_TEMPSENSE (IMX95_CCM_NUM_CLK_SRC + 123 + 9) +#define IMX95_CLK_GPU_CGC (IMX95_CCM_NUM_CLK_SRC + 123 + 10)#endif /* __CLOCK_IMX95_H */ arch/arm64/boot/dts/freescale/imx95.dtsi +1
-1@@ -2874,7 +2874,7 @@ netc_emdio: mdio@0,0 { gpu: gpu@4d900000 { compatible = "nxp,imx95-mali", "arm,mali-valhall-csf"; reg = <0 0x4d900000 0 0x480000>; - clocks = <&scmi_clk IMX95_CLK_GPU>, <&scmi_clk IMX95_CLK_GPUAPB>; + clocks = <&scmi_clk IMX95_CLK_GPU_CGC>, <&scmi_clk IMX95_CLK_GPUAPB>; clock-names = "core", "coregroup"; interrupts = <GIC_SPI 289 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>,Signature · 1 line
2.51.0Hi Marek,
Quoted 1 line
Thanks for integrating this downstream patch.
Which downstream patch do you refer to ?
Quoted 2 lines
Please note that
CLK_GPUAPBandCLK_GPUare always-on, so the commit message should be amended accordingly.The GPU clock do not seem to be always-on, neither do the GPUAPB . It seems the SM can turn those clock off perfectly well.
Quoted 7 lines
Quoted 3 lines
Additionally, the
IMX95_CLK_GPUAPBhandle shall be removed, as there is no valid OPP entry in the frequency table, this also helps minimize differences between downstream and upstream, reducing maintenance effort.Downstream kernel forks are not relevant to this discussion, upstream your content and then you won't have to spend maintenance effort on downstream stuff.
This patch [1] was the reference point. For the Linux working environment, CLK_GPU and CLK_GPUAPB are always-on, while CLK_GPU_CGC can be gated off.
Regarding the IMX95_CLK_GPUAPB handle, my suggestion was based on the absence of its frequency in any OPP entry within the frequency table. Removing it could simplify the OPP handling logic and reduce unnecessary complexity.
[1] https://github.com/nxp-imx/linux-imx/commit/695f2bdc57b869ca5189313e4b5fa7eb5a12f622
On 12/3/25 10:28 AM, Rain Yang wrote:
Hello Rain,
Quoted 14 lines
Quoted 14 lines
Quoted 1 line
Thanks for integrating this downstream patch.
Which downstream patch do you refer to ?
Quoted 2 lines
Please note that
CLK_GPUAPBandCLK_GPUare always-on, so the commit message should be amended accordingly.The GPU clock do not seem to be always-on, neither do the GPUAPB . It seems the SM can turn those clock off perfectly well.
Quoted 3 lines
Additionally, the
IMX95_CLK_GPUAPBhandle shall be removed, as there is no valid OPP entry in the frequency table, this also helps minimize differences between downstream and upstream, reducing maintenance effort.
Quoted 5 lines
Quoted 3 lines
Downstream kernel forks are not relevant to this discussion, upstream your content and then you won't have to spend maintenance effort on downstream stuff.
This patch [1] was the reference point.
Sigh ... I was not aware of that one.
Maybe next time, it would be good to upstream these changes directly ?
Quoted 6 lines
For the Linux working environment,
CLK_GPUandCLK_GPUAPBare always-on, whileCLK_GPU_CGCcan be gated off.Regarding the
IMX95_CLK_GPUAPBhandle, my suggestion was based on the absence of its frequency in any OPP entry within the frequency table. Removing it could simplify the OPP handling logic and reduce unnecessary complexity.
If the clock can be disabled by SM, Linux has to make sure they are NOT disabled, so they must be described in DT, right ?
Quoted 1 line
[1] https://github.com/nxp-imx/linux-imx/commit/695f2bdc57b869ca5189313e4b5fa7eb5a12f622
Signature · 2 lines
Best regards, Marek Vasut
Quoted 31 lines · Marek Vasut
On 12/3/25 10:28 AM, Rain Yang wrote:
Hello Rain,
Quoted 14 lines
Quoted 14 lines
Quoted 1 line
Thanks for integrating this downstream patch.
Which downstream patch do you refer to ?
Quoted 2 lines
Please note that
CLK_GPUAPBandCLK_GPUare always-on, so the commit message should be amended accordingly.The GPU clock do not seem to be always-on, neither do the GPUAPB . It seems the SM can turn those clock off perfectly well.
Quoted 3 lines
Additionally, the
IMX95_CLK_GPUAPBhandle shall be removed, as there is no valid OPP entry in the frequency table, this also helps minimize differences between downstream and upstream, reducing maintenance effort.Quoted 5 lines
Quoted 3 lines
Downstream kernel forks are not relevant to this discussion, upstream your content and then you won't have to spend maintenance effort on downstream stuff.
This patch [1] was the reference point.
Sigh ... I was not aware of that one.
Maybe next time, it would be good to upstream these changes directly ?
Quoted 3 lines
For the Linux working environment,
CLK_GPUandCLK_GPUAPBare always-on, whileCLK_GPU_CGCcan be gated off.
Quoted 8 lines
Quoted 3 lines
Regarding the
IMX95_CLK_GPUAPBhandle, my suggestion was based on the absence of its frequency in any OPP entry within the frequency table. Removing it could simplify the OPP handling logic and reduce unnecessary complexity.If the clock can be disabled by SM, Linux has to make sure they are NOT disabled, so they must be described in DT, right ?
Currently, only CLK_GPU_CGC shall be described in the Device Tree[1], as it can be gated. The other clocks (CLK_GPU and CLK_GPUAPB) are always-on in the Linux environment, so describing any of them in DT is not necessary and would not be proper in this context.
Quoted 5 lines
Signature · 3 lines
-- Best regards, Marek Vasut
On 12/4/25 4:01 AM, Rain Yang wrote:
[...]
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
For the Linux working environment,
CLK_GPUandCLK_GPUAPBare always-on, whileCLK_GPU_CGCcan be gated off.Regarding the
IMX95_CLK_GPUAPBhandle, my suggestion was based on the absence of its frequency in any OPP entry within the frequency table. Removing it could simplify the OPP handling logic and reduce unnecessary complexity.
Quoted 7 lines
Quoted 4 lines
If the clock can be disabled by SM, Linux has to make sure they are NOT disabled, so they must be described in DT, right ?
Currently, only
CLK_GPU_CGCshall be described in the Device Tree[1], as it can be gated. The other clocks (CLK_GPUandCLK_GPUAPB) are always-on in the Linux environment, so describing any of them in DT is not necessary and would not be proper in this context.
Since this discussion is in fact unrelated to this bugfix, I would propose to fork the discussion into a separate patch. Can you please submit a patch for the GPUAPB clock ? Note that I believe GPUAPB clock have to be described in DT, if only because DT is a hardware description, and to make sure the GPUAPB clock are correctly enabled by the driver.
Quoted 18 lines · Marek Vasut
On 12/4/25 4:01 AM, Rain Yang wrote:
[...]
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
For the Linux working environment,
CLK_GPUandCLK_GPUAPBare always-on, whileCLK_GPU_CGCcan be gated off.Regarding the
IMX95_CLK_GPUAPBhandle, my suggestion was based on the absence of its frequency in any OPP entry within the frequency table. Removing it could simplify the OPP handling logic and reduce unnecessary complexity.Quoted 7 lines
Quoted 4 lines
If the clock can be disabled by SM, Linux has to make sure they are NOT disabled, so they must be described in DT, right ?
Currently, only
CLK_GPU_CGCshall be described in the Device Tree[1], as it can be gated. The other clocks (CLK_GPUandCLK_GPUAPB) are always-on in the Linux environment, so describing any of them in DT is not necessary and would not be proper in this context.
Quoted 5 lines
Since this discussion is in fact unrelated to this bugfix, I would propose to fork the discussion into a separate patch. Can you please submit a patch for the GPUAPB clock ? Note that I believe GPUAPB clock have to be described in DT, if only because DT is a hardware description, and to make sure the GPUAPB clock are correctly enabled by the driver.
Okay, I’ll submit a patch later.
The commit message should reflect that only CLK_GPU_CGC is enabled.
Quoted 19 lines · Rain Yang
Quoted 18 lines · Marek Vasut
On 12/4/25 4:01 AM, Rain Yang wrote:
[...]
Quoted 14 lines
Quoted 11 lines
Quoted 6 lines
For the Linux working environment,
CLK_GPUandCLK_GPUAPBare always-on, whileCLK_GPU_CGCcan be gated off.Regarding the
IMX95_CLK_GPUAPBhandle, my suggestion was based on the absence of its frequency in any OPP entry within the frequency table. Removing it could simplify the OPP handling logic and reduce unnecessary complexity.If the clock can be disabled by SM, Linux has to make sure they are NOT disabled, so they must be described in DT, right ?
Currently, only
CLK_GPU_CGCshall be described in the Device Tree[1], as it can be gated. The other clocks (CLK_GPUandCLK_GPUAPB) are always-on in the Linux environment, so describing any of them in DT is not necessary and would not be proper in this context.
Quoted 8 lines
Quoted 5 lines
Since this discussion is in fact unrelated to this bugfix, I would propose to fork the discussion into a separate patch. Can you please submit a patch for the GPUAPB clock ? Note that I believe GPUAPB clock have to be described in DT, if only because DT is a hardware description, and to make sure the GPUAPB clock are correctly enabled by the driver.
Okay, I’ll submit a patch later.
The commit message should reflect that onlyCLK_GPU_CGCis enabled.
The commit message , and this change , is unrelated to GPUAPB clock.
Quoted 26 lines · Marek Vasut
Quoted 25 lines · Rain Yang
Quoted 23 lines · Marek Vasut
On 12/4/25 4:01 AM, Rain Yang wrote:
[...]
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
For the Linux working environment,
CLK_GPUandCLK_GPUAPBare always-on, whileCLK_GPU_CGCcan be gated off.Regarding the
IMX95_CLK_GPUAPBhandle, my suggestion was based on the absence of its frequency in any OPP entry within the frequency table. Removing it could simplify the OPP handling logic and reduce unnecessary complexity.Quoted 7 lines
Quoted 4 lines
If the clock can be disabled by SM, Linux has to make sure they are NOT disabled, so they must be described in DT, right ?
Currently, only
CLK_GPU_CGCshall be described in the Device Tree[1], as it can be gated. The other clocks (CLK_GPUandCLK_GPUAPB) are always-on in the Linux environment, so describing any of them in DT is not necessary and would not be proper in this context.Since this discussion is in fact unrelated to this bugfix, I would propose to fork the discussion into a separate patch. Can you please submit a patch for the GPUAPB clock ? Note that I believe GPUAPB clock have to be described in DT, if only because DT is a hardware description, and to make sure the GPUAPB clock are correctly enabled by the driver.
Quoted 4 lines
Quoted 2 lines
Okay, I’ll submit a patch later.
The commit message should reflect that onlyCLK_GPU_CGCis enabled.The commit message , and this change , is unrelated to GPUAPB clock.
The commit message is ambiguous. Could you clarify which parent clock you are referring to, and whether it can be enabled by CLK_GPU_CGC? If it was CLK_GPU, CLK_GPU_CGC can't be able to control it.
Quoted 7 lines · Rain Yang
Quoted 4 lines
Quoted 2 lines
Okay, I’ll submit a patch later.
The commit message should reflect that onlyCLK_GPU_CGCis enabled.The commit message , and this change , is unrelated to GPUAPB clock.
The commit message is ambiguous. Could you clarify which parent clock you are referring to, and whether it can be enabled by
CLK_GPU_CGC? If it wasCLK_GPU,CLK_GPU_CGCcan't be able to control it.
The commit message clearly states "These new GPU_CGC clock
gate the existing GPU clock." and "GPU_CGC as well as its parent GPU clock." , I don't perceive any ambiguity, sorry.
Frankly, the whole GPUAPB discussion is entirely unrelated and it only stalls application of this bugfix and keeps upstream broken. This is not helping.
So unless there is anything in particular that is on-topic and prevents this patch from being applied, it would be good to apply it, otherwise the GPU on MX95 in mainline Linux is not working.
Quoted 14 lines · Marek Vasut
Quoted 7 lines · Rain Yang
Quoted 4 lines
Quoted 2 lines
Okay, I’ll submit a patch later.
The commit message should reflect that onlyCLK_GPU_CGCis enabled.The commit message , and this change , is unrelated to GPUAPB clock.
The commit message is ambiguous. Could you clarify which parent clock you are referring to, and whether it can be enabled by
CLK_GPU_CGC? If it wasCLK_GPU,CLK_GPU_CGCcan't be able to control it.The commit message clearly states "These new
GPU_CGCclock
gate the existing GPU clock." and "GPU_CGCas well as its parent GPU clock." , I don't perceive any ambiguity, sorry.
Quoted 6 lines
Frankly, the whole GPUAPB discussion is entirely unrelated and it only stalls application of this bugfix and keeps upstream broken. This is not helping.
So unless there is anything in particular that is on-topic and prevents this patch from being applied, it would be good to apply it, otherwise the GPU on MX95 in mainline Linux is not working.
Hi Marek,
I’m not opposed to this patch being merged into mainline, but the commit message needs to be accurate. the parent CLK_GPU cannot be enabled or disabled externally. The last sentence should clearly state:
When the panthor driver enables the GPU core clock, it enables the GPU_CGC.
This ensures the description reflects the actual hardware behavior and avoids confusion for future maintainers.
Thanks for addressing this issue — once the commit message is corrected, I’m fine with this going in.
Quoted 18 lines · Rain Yang
Quoted 17 lines · Marek Vasut
Quoted 7 lines · Rain Yang
Quoted 4 lines
Quoted 2 lines
Okay, I’ll submit a patch later.
The commit message should reflect that onlyCLK_GPU_CGCis enabled.The commit message , and this change , is unrelated to GPUAPB clock.
The commit message is ambiguous. Could you clarify which parent clock you are referring to, and whether it can be enabled by
CLK_GPU_CGC? If it wasCLK_GPU,CLK_GPU_CGCcan't be able to control it.The commit message clearly states "These new
GPU_CGCclock
gate the existing GPU clock." and "GPU_CGCas well as its parent GPU clock." , I don't perceive any ambiguity, sorry.Frankly, the whole GPUAPB discussion is entirely unrelated and it only stalls application of this bugfix and keeps upstream broken. This is not helping.
Quoted 8 lines
Quoted 3 lines
So unless there is anything in particular that is on-topic and prevents this patch from being applied, it would be good to apply it, otherwise the GPU on MX95 in mainline Linux is not working.
Hi Marek,
I’m not opposed to this patch being merged into mainline, but the commit message needs to be accurate. the parent
CLK_GPUcannot be enabled or disabled externally. The last sentence should clearly state:
Look here, this is what you can do with the MX95 SM:
"
Quoted 1 line
$ clock.r
...
083: gpuapb = on, 133333333Hz 084: gpu = on, 800000000Hz
...
174: gpu_cgc = on, 800000000Hz
Quoted 5 lines
$ clock.w gpu_cgc off $ clock.w gpu off $ clock.w gpuapb off$ clock.r
...
083: gpuapb = off, 133333333Hz 084: gpu = off, 800000000Hz
...
174: gpu_cgc = off, 800000000Hz
"
Notice how all clock are disabled, including GPU clock.
That does not agree with your statement.
Quoted 1 line
When the panthor driver enables the GPU core clock, it enables the
GPU_CGC.
It also enables all disabled parent clock in the process, which includes the GPU clock.
Quoted 4 lines
This ensures the description reflects the actual hardware behavior and avoids confusion for future maintainers.
Thanks for addressing this issue — once the commit message is corrected, I’m fine with this going in.
See above.
Quoted 59 lines · Marek Vasut
Quoted 18 lines · Rain Yang
Quoted 17 lines · Marek Vasut
Quoted 7 lines · Rain Yang
Quoted 4 lines
Quoted 2 lines
Okay, I’ll submit a patch later.
The commit message should reflect that onlyCLK_GPU_CGCis enabled.The commit message , and this change , is unrelated to GPUAPB clock.
The commit message is ambiguous. Could you clarify which parent clock you are referring to, and whether it can be enabled by
CLK_GPU_CGC? If it wasCLK_GPU,CLK_GPU_CGCcan't be able to control it.The commit message clearly states "These new
GPU_CGCclock
gate the existing GPU clock." and "GPU_CGCas well as its parent GPU clock." , I don't perceive any ambiguity, sorry.Frankly, the whole GPUAPB discussion is entirely unrelated and it only stalls application of this bugfix and keeps upstream broken. This is not helping.
Quoted 8 lines
Quoted 3 lines
So unless there is anything in particular that is on-topic and prevents this patch from being applied, it would be good to apply it, otherwise the GPU on MX95 in mainline Linux is not working.
Hi Marek,
I’m not opposed to this patch being merged into mainline, but the commit message needs to be accurate. the parent
CLK_GPUcannot be enabled or disabled externally. The last sentence should clearly state:Look here, this is what you can do with the MX95 SM:
"
Quoted 1 line
$ clock.r...
083: gpuapb = on, 133333333Hz 084: gpu = on, 800000000Hz...
174:gpu_cgc= on, 800000000HzQuoted 5 lines
$ clock.w gpu_cgc off $ clock.w gpu off $ clock.w gpuapb off$ clock.r...
083: gpuapb = off, 133333333Hz 084: gpu = off, 800000000Hz...
174:gpu_cgc= off, 800000000Hz
"Notice how all clock are disabled, including GPU clock.
That does not agree with your statement.
Quoted 1 line
When the panthor driver enables the GPU core clock, it enables the
GPU_CGC.It also enables all disabled parent clock in the process, which includes the GPU clock.
Quoted 6 lines
Quoted 4 lines
This ensures the description reflects the actual hardware behavior and avoids confusion for future maintainers.
Thanks for addressing this issue — once the commit message is corrected, I’m fine with this going in.See above.
Hi Marek,
Based on the instructions you gave, I’d put it this way, even though the CLK_GPU clock can only be controlled internally.
I’m fine with your patch now.
Quoted 65 lines · Rain Yang
Quoted 64 lines · Marek Vasut
Quoted 18 lines · Rain Yang
Quoted 17 lines · Marek Vasut
Quoted 7 lines · Rain Yang
Quoted 4 lines
Quoted 2 lines
Okay, I’ll submit a patch later.
The commit message should reflect that onlyCLK_GPU_CGCis enabled.The commit message , and this change , is unrelated to GPUAPB clock.
The commit message is ambiguous. Could you clarify which parent clock you are referring to, and whether it can be enabled by
CLK_GPU_CGC? If it wasCLK_GPU,CLK_GPU_CGCcan't be able to control it.The commit message clearly states "These new
GPU_CGCclock
gate the existing GPU clock." and "GPU_CGCas well as its parent GPU clock." , I don't perceive any ambiguity, sorry.Frankly, the whole GPUAPB discussion is entirely unrelated and it only stalls application of this bugfix and keeps upstream broken. This is not helping.
Quoted 8 lines
Quoted 3 lines
So unless there is anything in particular that is on-topic and prevents this patch from being applied, it would be good to apply it, otherwise the GPU on MX95 in mainline Linux is not working.
Hi Marek,
I’m not opposed to this patch being merged into mainline, but the commit message needs to be accurate. the parent
CLK_GPUcannot be enabled or disabled externally. The last sentence should clearly state:Look here, this is what you can do with the MX95 SM:
"
Quoted 1 line
$ clock.r...
083: gpuapb = on, 133333333Hz 084: gpu = on, 800000000Hz...
174:gpu_cgc= on, 800000000HzQuoted 5 lines
$ clock.w gpu_cgc off $ clock.w gpu off $ clock.w gpuapb off$ clock.r...
083: gpuapb = off, 133333333Hz 084: gpu = off, 800000000Hz...
174:gpu_cgc= off, 800000000Hz
"Notice how all clock are disabled, including GPU clock.
That does not agree with your statement.
Quoted 1 line
When the panthor driver enables the GPU core clock, it enables the
GPU_CGC.It also enables all disabled parent clock in the process, which includes the GPU clock.
Quoted 4 lines
This ensures the description reflects the actual hardware behavior and avoids confusion for future maintainers.
Thanks for addressing this issue — once the commit message is corrected, I’m fine with this going in.
Quoted 7 lines
Quoted 1 line
See above.
Hi Marek,
Based on the instructions you gave, I’d put it this way, even though theCLK_GPUclock can only be controlled internally.I’m fine with your patch now.
Thank you
Shawn Guo
AppliedQuoted 12 lines · Marek Vasut
The i.MX95 imx-sm introduced new
GPU_CGCclock since imx-sm commitca5e078833fa("SM-128: Add clock management via CCM LPCG direct control") which are downstream clock of GPU clock. These newGPU_CGCclock gate the existing GPU clock. Currently, withoutclk_ignore_unusedon kernel command line, those newGPU_CGCclock are unused and the kernel will disable them. This has no impact on i.MX95 A0/A1, but does prevent GPU register access from working at all on i.MX95 B0. TheGPU_CGCclock are present on both i.MX95 A0/A1/B0, therefore update the DT such, that the GPU core clock are theGPU_CGCclock. When the panthor driver enables the GPU core clock, it enables both theGPU_CGCas well as its parent GPU clock.
Quoted 2 lines
Fixes 67934f248e64 ("arm64: dts: imx95: Describe Mali G310 GPU")Signed-off-by Marek Vasut <[email protected]>
Applied, thanks!