arm64: dts: allwinner: a64: set GPU clock to 432 MHz
Subsystems (2)
PATCH 1/1 arm64: dts: allwinner: a64: set GPU clock to 432 MHz
That's what BSP kernel sets it to and it seems to work fine.
--- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +3 -0
@@ -976,6 +976,9 @@ mali: gpu@1c40000 { clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>; clock-names = "bus", "core"; resets = <&ccu RST_BUS_GPU>; + + assigned-clocks = <&ccu CLK_GPU>; + assigned-clock-rates = <432000000>; }; gic: interrupt-controller@1c81000 {
Signature · 1 line
2.24.0
Hi,
Quoted 12 lines · Vasily Khoruzhick
That's what BSP kernel sets it to and it seems to work fine.
Signed-off-by Vasily Khoruzhick <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0
-0
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi mali: gpu@1c40000 { · line 982
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +3
-0@@ -976,6 +976,9 @@ mali: gpu@1c40000 { clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>; clock-names = "bus", "core"; resets = <&ccu RST_BUS_GPU>; + + assigned-clocks = <&ccu CLK_GPU>; + assigned-clock-rates = <432000000>; };
This doesn't really guarantee anything. If the GPU needs to remain at that rate, it should be set in the driver. I just saw that you did send a PR in github, I just merged it.
Maxime
Quoted 11 lines · Maxime Ripard
Hi,
Quoted 7 lines · Vasily Khoruzhick
That's what BSP kernel sets it to and it seems to work fine.
Signed-off-by Vasily Khoruzhick <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 3 +++ 1 file changed, 3 insertions(+)
Quoted 16 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi mali: gpu@1c40000 { · line 982
Quoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +3
-0@@ -976,6 +976,9 @@ mali: gpu@1c40000 { clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>; clock-names = "bus", "core"; resets = <&ccu RST_BUS_GPU>; + + assigned-clocks = <&ccu CLK_GPU>; + assigned-clock-rates = <432000000>; };This doesn't really guarantee anything. If the GPU needs to remain at that rate, it should be set in the driver. I just saw that you did send a PR in github, I just merged it.
Lima doesn't set GPU frequency at all since it's different for different SoCs and we don't support operation points nor frequency scaling yet.
So this change effectively sets GPU frequency to 432MHz on A64 when using lima.
Quoted 2 lines
Maxime
Quoted 26 lines · Vasily Khoruzhick
Quoted 8 lines · Maxime Ripard
Quoted 7 lines · Vasily Khoruzhick
That's what BSP kernel sets it to and it seems to work fine.
Signed-off-by Vasily Khoruzhick <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 3 +++ 1 file changed, 3 insertions(+)Quoted 16 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi mali: gpu@1c40000 { · line 982
Quoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +3
-0@@ -976,6 +976,9 @@ mali: gpu@1c40000 { clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>; clock-names = "bus", "core"; resets = <&ccu RST_BUS_GPU>; + + assigned-clocks = <&ccu CLK_GPU>; + assigned-clock-rates = <432000000>; };This doesn't really guarantee anything. If the GPU needs to remain at that rate, it should be set in the driver. I just saw that you did send a PR in github, I just merged it.
Quoted 3 lines
Lima doesn't set GPU frequency at all since it's different for different SoCs and we don't support operation points nor frequency scaling yet.
You don't really need frequency scaling though, you just need to set it to any of the OPP. And if that's still too complicated, the binding mandates to associate a vendor compatible, so you can base the information on that.
Quoted 2 lines
So this change effectively sets GPU frequency to 432MHz on A64 when using lima.
Right before the driver is probed. For all you now, that frequency can be changed to anything else at the very next operation and you'd end up in the exact same situation than the one you're trying to fix.
Maxime
Quoted 27 lines · Maxime Ripard
Quoted 26 lines · Vasily Khoruzhick
Quoted 24 lines · Maxime Ripard
Quoted 12 lines · Vasily Khoruzhick
That's what BSP kernel sets it to and it seems to work fine.
Signed-off-by Vasily Khoruzhick <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 3 +++ 1 file changed, 3 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +0
-0arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi mali: gpu@1c40000 { · line 982
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +3
-0@@ -976,6 +976,9 @@ mali: gpu@1c40000 { clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>; clock-names = "bus", "core"; resets = <&ccu RST_BUS_GPU>; + + assigned-clocks = <&ccu CLK_GPU>; + assigned-clock-rates = <432000000>; };This doesn't really guarantee anything. If the GPU needs to remain at that rate, it should be set in the driver. I just saw that you did send a PR in github, I just merged it.
Quoted 8 lines
Quoted 3 lines
Lima doesn't set GPU frequency at all since it's different for different SoCs and we don't support operation points nor frequency scaling yet.
You don't really need frequency scaling though, you just need to set it to any of the OPP. And if that's still too complicated, the binding mandates to associate a vendor compatible, so you can base the information on that.
Right, even just wiring up minimal OPP support with the userspace governor would be really useful for SoCs like RK3328, where the GPU PLL defaults to something pathetic, but the most useful upper frequencies typically require regulator adjustment as well.
Robin.
Quoted 14 lines
Quoted 2 lines
So this change effectively sets GPU frequency to 432MHz on A64 when using lima.
Right before the driver is probed. For all you now, that frequency can be changed to anything else at the very next operation and you'd end up in the exact same situation than the one you're trying to fix.
Maxime
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel