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

GPU voltage control #52

Open
spezi77 opened this issue Jul 16, 2016 · 5 comments
Open

GPU voltage control #52

spezi77 opened this issue Jul 16, 2016 · 5 comments

Comments

@spezi77
Copy link
Contributor

spezi77 commented Jul 16, 2016

This feature is currently only supported by Synapse. Would be nice to have it in KA-mod as well.

see:
https://github.com/apbaxel/UKM/blob/UKM-Enhanced/data/UKM/config.json.generate.gpu

@JoeSchubert
Copy link
Owner

JoeSchubert commented Jul 29, 2016

Looks like the only part of that which is pertinent is:

            `if [ -f "/sys/devices/system/cpu/cpu0/cpufreq/gpu_mv_table" ]; then
                $BB echo '{ SPane:{
                    title:"GPU Voltages"
                }},'
                    while read UVOLT UNIT; do
                    VOLTAGE=$(($VOLTAGE+1));
                        $BB echo '{ SSeekBar:{
                            default:'$UVOLT',
                            title:"Voltage '${VOLTAGE}'",
                            action:"voltage gpuvolt '${VOLTAGE}'",
                            unit:"' ${UNIT}'",'
                            if [ "$UVOLT" -ge "900000" ]; then
                                $BB echo 'min:900000, max:1200000, step:5000 }},'
                            else
                                $BB echo 'min:900, max:1200, step:5 }},'
                            fi;
                    done < /sys/devices/system/cpu/cpu0/cpufreq/gpu_mv_table
            fi`

I'll see if I can't add it. Though, I'm not entirely sure exactly how I'm going to get it going reliably for all devices.

Also, I don't even know of any kernels that actually use this... and I'd also need an example of the sysfs node that this references.

@spezi77
Copy link
Contributor Author

spezi77 commented Aug 1, 2016

Sorry for my late reply. I can provide an example of the sysfs node until the weekend. I have merged 'GPU voltage control' into my 'Revival kernel' for mako. ;)

Basically it is a nice addition for Snapdragon/adreno based devices with custom kernel. There are a few custom kernels out there with this feature, but I can't remember exactly which ones.

@JoeSchubert
Copy link
Owner

No worries. If you can provide the examples, I'll try to add it.

@spezi77
Copy link
Contributor Author

spezi77 commented Aug 21, 2016

When I make an ouput of the sysfs node I get a vector with these defaults:
shell@:/ $ cat /sys/devices/system/cpu/cpu0/cpufreq/gpu_mv_table
945 mV
1050 mV
1150 mV

Do you need the max and min values, as well? I need to look into the source code to figure out..

@spezi77
Copy link
Contributor Author

spezi77 commented Aug 21, 2016

Here we go. I couldn't find where they define the steps. So I assume that it can be defined as we need it (e.g.: 5mV).

#define GPU_MIN_VDD 900
#define GPU_MAX_VDD 1200

spezi77/hellspawn-N4@cb1e9e4

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