Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mali GPU control (ged_ski driver and mali power policy) #123

Open
7Soldier opened this issue Jan 26, 2022 · 1 comment
Open

Mali GPU control (ged_ski driver and mali power policy) #123

7Soldier opened this issue Jan 26, 2022 · 1 comment

Comments

@7Soldier
Copy link

7Soldier commented Jan 26, 2022

Hello sir, can you please add Mali GPU control?

  1. Description:
    Custom driver ged_ski ported from some samsung devices for control mali gpu frequencies (supported in ex kernel manager and franco kernel manager) and control governor. It also contains data about the current frequency, frequency table, load and temperature.
    In the same section, add gpu power policy (a kind of analogue of the governor on mali).

  2. Information:
    Commit of this driver - LinkBoi00-Development/android_kernel_xiaomi_cannon@f33722c
    Available governors - default (not using)
    Governor - default (not using)
    Available power policy - coarse_demand, always_on (always on - gpu freq always working, coarse demand - gpu freq enables depends on load)
    Available frequencies - in table on sysfs

  3. SysFS paths:
    gpu power policy - /sys/devices/platform/xxxxxxxx.mali/power_policy (in my case xxxxxxxx is 13040000, numbers only) (rw)
    gpu available governor - /sys/kernel/gpu/gpu_available_governor (ro) (not using)
    gpu governor - /sys/kernel/gpu/gpu_governor (rw) (not using)
    gpu min freq - /sys/kernel/gpu/gpu_min_clock (rw)
    gpu max freq - /sys/kernel/gpu/gpu_max_clock (rw)
    gpu freq table - /sys/kernel/gpu/gpu_freq_table (ro)
    gpu hardware model - /sys/kernel/gpu/gpu_model (ro)
    gpu load - /sys/kernel/gpu/gpu_load (ro)
    gpu temperature - /sys/kernel/gpu/gpu_tmu (ro)

  4. Content of SysFS paths:
    gpu power policy - "[coarse_demand] always_on"
    gpu available governor - "Default" (not using)
    gpu governor - "Default" (not using)
    gpu min freq - "270000" (in KHz, in some mods of this drivers using Mhz format)
    gpu max freq - "806000" (in KHz, in some mods of this drivers using Mhz format)
    gpu freq table - "806000 792000 778000 763000 749000 735000 720000 706000 691000 677000 663000 648000 634000 620000 595000 570000 545000 520000 495000 470000 445000 420000 395000 370000 345000 320000 295000 270000" (in KHz, in some mods of this drivers using Mhz format)
    gpu hardware model - "Mali-G76 MC4"
    gpu load - "0 %" (changing number depends on load)
    gpu temperature - "37981" (in °C, but i think it should be 37,981°C)

  5. How to write new value:
    echo "(policy_name)" > /sys/devices/platform/xxxxxxxx.mali/power_policy (in my case xxxxxxxx is 13040000, numbers only) (for example policy name - "always_on") (string)
    echo "Default" > /sys/kernel/gpu/gpu_governor (string)
    echo xxxxxx > /sys/kernel/gpu/gpu_min_clock (for example xxxxxx is 806000) (integer in KHz)
    echo xxxxxx > /sys/kernel/gpu/gpu_max_clock (for example xxxxxx is 270000) (integer in KHz)

This is all information.
If you need something other write me.

@sunilpaulmathew
Copy link
Contributor

@7Soldier
Firstly, thanks a lot for this issue.
This will be a significant big job. I really do not have that much time to invest immediately. So, I'll postponed it for future. Anyone, who has time and interest are welcome to make a PR.
Secondly, I really don't know finding anything good from kernel commits. So, I only need sysFs paths and min/max values (that you already provided; Thanks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants