Vim 3 looks to be using G52 MP2 not MP4?

Checking the file ‘/sys/class/misc/mali0/device/gpuinfo’ shows:
‘Mali-G52 2 cores r0p0 0x7212’

Running clinfo shows:
‘Max compute units 2
Max clock frequency 750MHz’

Running Ubuntu 20.04.1 with 4.9.241 Kernal on emmc

Checking the Vim 3 specs shows G52 MP4, wondering if its an issue with the software or hardware.

Check this topic.

MP4 does not mean 4 cores.

2 Likes

Thanks. I should have done more research.
It is possible to change the max frequency up or down from 750?

@JoshuaPeddle you can do something like this:

echo 600000000 > /sys/devices/platform/soc/ffe40000.gpu/devfreq/ffe40000.gpu/min_freq
echo 600000000 > /sys/devices/platform/soc/ffe40000.gpu/devfreq/ffe40000.gpu/max_freq

this was on the mainline kernel, I believe the names change slightly with the BSP kernel…

1 Like

Thanks, I’ll take a look and post the results for anyone else looking.

1 Like

Hi,

I am using the default os (Android) and kernel with khadas vim3.

Its mali G52 is dvfs capable?
If yes, where I can set its frequency? I cannot find the devfreq for its mali driver.

@Ehsan I am not sure about the fbdev driver or android, you can try using kernel aduitor for system management (I use it for underclocking my VIM3’s CPU), but in mainline now with the panfrost driver you can try something like:

echo 600000000 > /sys/devices/platform/soc/ffe40000.gpu/devfreq/ffe40000.gpu/max_freq

please note that the possible frequencies are:

124999998 
249999996 
285714281 
399999994 
499999992 
666666656 
799999987

cheers!

1 Like

Thank you for your reply.

I checked it but there is no such directory (I search all directories).

I find two related directories:
/sys/class/misc/mali0/device/
/sys/devices/platform/ffe40000.bifrost/

In both of them these items exist:
core_mask dvfs_period js_scheduling_period lp_mem_pool_size misc pm_poweroff reset_timeout uevent
driver gpuinfo js_timeouts mem_pool_max_size modalias power soft_job_timeout
driver_override js_ctx_scheduling_mode lp_mem_pool_max_size mem_pool_size of_node power_policy subsystem

I cannot find “devfreq” among the items above.
when I use cat command over power policy here is the result:
#cat power_policy
[coarse_demand] always_on

Another directory which I find is “/sys/class/mpgpu/” includes these items:
cur_freq domain_stat gpu_err max_freq min_freq mpgpucmd scale_mode util_cl util_gl utilization

I can change min_freq with echo n > min_freq (n is a number between 0-4 corresponds to 285,400,500,666,800 respectively)
and see cur_freq with cat cur_freq, but I cannot change max_freq. Also, I did not any policy or …
before I work with the board which has devfreq and I was able to set policy or frequency.

Do you have any idea? May I should compile kernel GPU with enabling devfreq or something.

I am not really sure what can be done, maybe take some tips from @clort76
he might have something in mind for you :slightly_smiling_face:

Dear @clort76 would you please let me know if you know about gpu dvfs.

Best,
Ehsan

Ehsan’s 4.9 kernel seems to have different info in /sys/devices and /sys/class from my Linux Khadas 5.10.0-rc6

I didn’t know what gpu dvfs is, websearch says dynamic voltage and frequency scaling. I run mine at 800mhz and friend overclocks to 1ghz. I think for good graphics performance you need a newer kernel with panfrost drivers.

Also, Amlogic a311d specs say mali g52 mp4.

[edit]
i set to high speed with
echo 799999987 > /sys/devices/platform/soc/ffe40000.gpu/devfreq/ffe40000.gpu/max_freq
echo 799999987 > /sys/devices/platform/soc/ffe40000.gpu/devfreq/ffe40000.gpu/min_freq

2 Likes