Re: [PATCH] arm64: dts: rockchip: Fix vdd_gpu voltage constraints on PinePhone Pro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Heiko,

On 2024-11-10 21:08, Heiko Stübner wrote:
Am Sonntag, 10. November 2024, 19:44:31 CET schrieb Dragan Simic:
The regulator-{min,max}-microvolt values for the vdd_gpu regulator in the PinePhone Pro device dts file are too restrictive, which prevents the highest GPU OPP from being used, slowing the GPU down unnecessarily. Let's fix that by making the regulator-{min,max}-microvolt values less strict, using the voltage range that the Silergy SYR838 chip used for the vdd_gpu regulator is
actually capable of producing. [1][2]

This also eliminates the following error messages from the kernel log:

core: _opp_supported_by_regulators: OPP minuV: 1100000 maxuV: 1150000, not supported by regulator panfrost ff9a0000.gpu: _opp_add: OPP not supported by regulators (800000000)

These changes to the regulator-{min,max}-microvolt values make the PinePhone Pro device dts consistent with the dts files for other Rockchip RK3399-based boards and devices. It's possible to be more strict here, by specifying the regulator-{min,max}-microvolt values that don't go outside of what the GPU actually may use, as the consumer of the vdd_gpu regulator, but those changes
are left for a later directory-wide regulator cleanup.

With the Pinephone Pro using some sort of special-rk3399, how much of
"the soc variant cannot use the highest gpu opp" is in there, and just the
original implementation is wrong?

Good question, I already asked it myself.  I'm unaware of any kind of
GPU-OPP-related restrictions when it comes to the PinePhone-Pro-specific
RK3399S.  Furthermore, "the word on the street" is that the RK3399S can
work perfectly fine even at the couple of "full-fat" RK3399 CPU OPPs
that are not defined for the RK3399S, and the only result would be the
expected higher power consumption and a bit more heat generated.

This just reaffirms that no known GPU OPP restrictions exist.  Even
if they existed, enforcing them _primarily_ through the constraints of
the associated voltage regulator would be the wrong approach.  Instead,
the restrictions should be defined primarily through the per-SoC-variant
GPU OPPs, which are, to my best knowledge, not known to be existing for
the RK3399S SoC variant.

Did you run this on actual hardware?

I rushed a bit to submit the patch before being able to test in on the
actual hardware, but there's already one person willing to test the patch on their PinePhone Pro and provide their Tested-By. I see no reasons why it shouldn't work as expected, as explained above, which is why I decided
it's safe to submit the patch before detailed testing.

I'm very careful when it comes to changes like this one, but I'm quite
confident there should be no issues, just a nice performance boost. :)
I also checked and compared the schematics of the PinePhone Pro and
a couple of other Pine64 RK3399-based boards and devices, to make sure
there are no differences in the GPU regulators that would make the
PinePhone Pro an exception.  I saw no such differences.

Fixes: 78a21c7d5952 ("arm64: dts: rockchip: Add initial support for Pine64 PinePhone Pro")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Dragan Simic <dsimic@xxxxxxxxxxx>
---
 arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
index 1a44582a49fb..956d64f5b271 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
@@ -410,8 +410,8 @@ vdd_gpu: regulator@41 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&vsel2_pin>;
 		regulator-name = "vdd_gpu";
-		regulator-min-microvolt = <875000>;
-		regulator-max-microvolt = <975000>;
+		regulator-min-microvolt = <712500>;
+		regulator-max-microvolt = <1500000>;
 		regulator-ramp-delay = <1000>;
 		regulator-always-on;
 		regulator-boot-on;




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux