Jump to content

panfrost on RK3288 and GPU on 600MHz problems


m][sko

Recommended Posts

I am testing RK3288 with ubuntu 20.04 (gnome) btw NICE

And I have some problems with panfrost and I am looking for anybody with RK3288 device that can confirm or not same behavior.

Problem is that when I switch GPU to 600MHz

sudo bash -c 'echo "userspace" > /sys/class/drm/card1/device/devfreq/ffa30000.gpu/governor'

sudo bash -c 'echo "600000000" > /sys/class/drm/card1/device/devfreq/ffa30000.gpu/userspace/set_freq'

 

and when I run glmark2-es2 or glmark2-es2-wayland

I start to see https://pastebin.com/NuYqHdxH  in kernel.log

 

So I made bugreport(https://gitlab.freedesktop.org/mesa/mesa/-/issues/2693) for panfrost and they think that problem is in low voltage on gpu

as everything is fine on 400MHz

 

So anybody can try?

just build ubuntu 20.04 for your RK3288 device

sudo BETA=yes EXPERT=yes ./compile.sh

server build should be fine

and then apt install ubuntu-desktop

ubuntu 20.04 has almost latest mesa so everything work just fine

Link to comment
Share on other sites

2 hours ago, NicoD said:

Are you monitoring the voltage of your board? What board do you use?
How about other clocks like 500MHz?
What kernel are you using? Good luck.

My board is some HDMI dongle like device with RK3288

but is is powered from micro usb

Kernel version: 5.5.11

I didn't modify  kernel dts files

so I didn't add 500Mhz :)

 

Link to comment
Share on other sites

On 3/29/2020 at 1:05 PM, jock said:

I can take a look, but did you use armbian with some hand-compiled things or another image of sort?

PURE ARMBIAN :)

sudo BETA=yes EXPERT=yes ./compile.sh

and choose your RK3288 board :)

and as OS choose ubuntu 20.04

and then server

and then instal gnome

apt install ubuntu-desktop

everything should run out of the box :)

 

for the first time we should have working ubuntu gnome with gpu accleration on many boards

lima and panfrost is working JUST fine :)

Link to comment
Share on other sites

I resume the thread, because had the chance to verify the same condition. Panfrost with GPU @600Mhz is having issues on my setup too on recent 5.6 kernel.

I don't think it is due to low voltage, since the voltage in the opp table is the official one and also I extensively checked in the past against proprietary mali stack and never had any issue.

Turning 600 Mhz OPP entry into 500 Mhz results in a good behaviour by Panfrost. 500 Mhz was removed some time ago due to clock rework by @Myy, but currently seems to work pretty fine. Maybe it could be reintroduced?

Link to comment
Share on other sites

I was wondering the last day I touched the GPU frequencies.

I never touched that. CPU frequencies, yes. GPU frequencies, no.

All my patches are available on RockMyy .

 

The removal of the 500 MHZ GPU frequencies were done on the mainline kernel here : https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/rk3288.dtsi?id=75481833c6dbab4c29d15452f6b4337c16f5407b

 

That's a pretty heavy-handed patch, I agree (Some Chromebooks are broken so let's remove the functionality for everyone).

I don't know if it's possible to patch frequencies within a sub-DTS file.

Something like (untested) :

@gpu_opp_table {
	opp-500000000 {
		opp-hz = /bits/ 64 <500000000>;
		opp-microvolt = <1200000>;
	};
};

I'll give it a try when possible.

Link to comment
Share on other sites

https://github.com/rockchip-linux/kernel/blob/develop-4.4/arch/arm/boot/dts/rk3288cg-opp.dtsi

 

is the vendor opps for the rk3288-C (Tinker/chromebook version)

 

If it isn't a "C", then it wouldn't have 600 MHz Mali or faster than 1.6 GHz CPU according to Rockchip (I don't know about the "W")

 

@Myy  Wow, that patch is garbage, I didn't even notice that.  It's worse than you are summarizing:

 

"NPLL is necessary for 500 MHz, ancient krusty kernel suxors and doesn't have this OPP, so in case someone hypothetically someday maybe in theory thinks about possibly re-purposing the NPLL like the ancient kernel did, make mainline suck too for everyone."

 

Yikes.

 

I don't see any reason to not reintroduce that OPP for Armbian use, as far as I know this purely hypothetical situation has not taken place.

Link to comment
Share on other sites

Sooo, I tried to fix the issue, using a 5.8-rc3 kernel... While the frequencies are back, there's some heavy glitches with Panfrost drivers and I don't know if that's due to kernel changes (entirely plausible) or if that's due to the patch.

I'll try test a 5.8-rc3 kernel without this patch, just to check who's the culprit.

 

Meanwhile, here's a patch that brings 500Mhz frequencies back for Mali GPU on RK3288 boards : https://gist.github.com/Miouyouyou/0dad9c4a321349166bbc9d49ffec315a

From 73258d32daf3a661281bb5c77c5e2e06c7ff714e Mon Sep 17 00:00:00 2001
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
Date: Fri, 3 Jul 2020 02:02:18 +0200
Subject: [PATCH] arm: dtsi: rk3288: add GPU 500 Mhz OPP again

Undoing the very bizarre mainline kernel patch,
75481833c6dbab4c29d15452f6b4337c16f5407b
which main purpose is to sync some 3.14 kernels hacks to
mainline kernels, for reasons that only matter for a few Chromebooks,
and shove it down the throat of every RK3288 user.

If you need to avoid the GPU going to 500 Mhz on Chromebooks,
remove the OPP entry inside the DTS that actually matters to RK3288
Chromebooks.

Meanwhile, the 600 Mhz operating point can prove to be unstable on
some RK3288 boards, while 500 Mhz works fine.
https://forum.armbian.com/topic/13515-panfrost-on-rk3288-and-gpu-on-600mhz-problems/

Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
---
 arch/arm/boot/dts/rk3288.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index a66412547..ef7457f79 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -1312,6 +1312,10 @@ opp-400000000 {
                        opp-hz = /bits/ 64 <400000000>;
                        opp-microvolt = <1100000>;
                };
+               opp-500000000 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <1200000>;
+               };
                opp-600000000 {
                        opp-hz = /bits/ 64 <600000000>;
                        opp-microvolt = <1250000>;
-- 
2.27.0

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines