Skip to content

Commit

Permalink
tici: higher cpu freq while offroad (commaai#23151)
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh authored and twilsonco committed Feb 13, 2022
1 parent 4c6fcb5 commit 66ff854
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion selfdrive/hardware/tici/hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,12 @@ def set_power_save(self, powersave_enabled):
os.system(f"sudo su -c 'echo {val} > /sys/devices/system/cpu/cpu{i}/online'")

for n in ('0', '4'):
gov = 'powersave' if powersave_enabled else 'performance'
gov = 'userspace' if powersave_enabled else 'performance'
os.system(f"sudo su -c 'echo {gov} > /sys/devices/system/cpu/cpufreq/policy{n}/scaling_governor'")

if powersave_enabled:
os.system(f"sudo su -c 'echo 979200 > /sys/devices/system/cpu/cpufreq/policy{n}/scaling_setspeed'")

def get_gpu_usage_percent(self):
try:
used, total = open('/sys/class/kgsl/kgsl-3d0/gpubusy').read().strip().split()
Expand Down

0 comments on commit 66ff854

Please sign in to comment.