mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 21:14:01 +08:00
set camera and gpu irq affinities (#2678)
* pin camera and gpu to core 2
* can't forget about 177
old-commit-hash: 05fe01e30b
This commit is contained in:
@@ -17,7 +17,9 @@ function two_init {
|
||||
# Wifi scan
|
||||
wpa_cli IFNAME=wlan0 SCAN
|
||||
|
||||
# Restrict Android and other system processes to the first two cores
|
||||
# *** shield cores 2-3 ***
|
||||
|
||||
# android gets two cores
|
||||
echo 0-1 > /dev/cpuset/background/cpus
|
||||
echo 0-1 > /dev/cpuset/system-background/cpus
|
||||
echo 0-1 > /dev/cpuset/foreground/cpus
|
||||
@@ -27,7 +29,8 @@ function two_init {
|
||||
# openpilot gets all the cores
|
||||
echo 0-3 > /dev/cpuset/app/cpus
|
||||
|
||||
# set up governors
|
||||
# *** set up governors ***
|
||||
|
||||
# +50mW offroad, +500mW onroad for 30% more RAM bandwidth
|
||||
echo "performance" > /sys/class/devfreq/soc:qcom,cpubw/governor
|
||||
echo 1056000 > /sys/class/devfreq/soc:qcom,m4m/max_freq
|
||||
@@ -43,6 +46,8 @@ function two_init {
|
||||
# /sys/class/devfreq/soc:qcom,mincpubw is the only one left at "powersave"
|
||||
# it seems to gain nothing but a wasted 500mW
|
||||
|
||||
# *** set up IRQ affinities ***
|
||||
|
||||
# Collect RIL and other possibly long-running I/O interrupts onto CPU 1
|
||||
echo 1 > /proc/irq/78/smp_affinity_list # qcom,smd-modem (LTE radio)
|
||||
echo 1 > /proc/irq/33/smp_affinity_list # ufshcd (flash storage)
|
||||
@@ -53,6 +58,13 @@ function two_init {
|
||||
[ -d "/proc/irq/733" ] && echo 3 > /proc/irq/733/smp_affinity_list # USB for LeEco
|
||||
[ -d "/proc/irq/736" ] && echo 3 > /proc/irq/736/smp_affinity_list # USB for OP3T
|
||||
|
||||
# GPU and camera get cpu 2
|
||||
CAM_IRQS="177 178 179 180 181 182 183 184 185 186 192"
|
||||
for irq in $CAM_IRQS; do
|
||||
echo 2 > /proc/irq/$irq/smp_affinity_list
|
||||
done
|
||||
echo 2 > /proc/irq/193/smp_affinity_list # GPU
|
||||
|
||||
# Check for NEOS update
|
||||
if [ $(< /VERSION) != "$REQUIRED_NEOS_VERSION" ]; then
|
||||
if [ -f "$DIR/scripts/continue.sh" ]; then
|
||||
|
||||
Reference in New Issue
Block a user