mirror of https://github.com/commaai/openpilot.git
pandad: move to core 3 (#32402)
* move to core 3 * core is fully offlined now * move to init --------- Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
parent
7381872a54
commit
7b09285817
|
@ -12,7 +12,7 @@ int main(int argc, char *argv[]) {
|
|||
int err;
|
||||
err = util::set_realtime_priority(54);
|
||||
assert(err == 0);
|
||||
err = util::set_core_affinity({4});
|
||||
err = util::set_core_affinity({3});
|
||||
assert(err == 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -380,22 +380,18 @@ class Tici(HardwareBase):
|
|||
# *** CPU config ***
|
||||
|
||||
# offline big cluster, leave core 4 online for pandad
|
||||
for i in range(5, 8):
|
||||
for i in range(4, 8):
|
||||
val = '0' if powersave_enabled else '1'
|
||||
sudo_write(val, f'/sys/devices/system/cpu/cpu{i}/online')
|
||||
|
||||
for n in ('0', '4'):
|
||||
if powersave_enabled and n == '4':
|
||||
continue
|
||||
gov = 'ondemand' if powersave_enabled else 'performance'
|
||||
sudo_write(gov, f'/sys/devices/system/cpu/cpufreq/policy{n}/scaling_governor')
|
||||
|
||||
# *** IRQ config ***
|
||||
|
||||
# pandad core
|
||||
affine_irq(4, "spi_geni") # SPI
|
||||
affine_irq(4, "xhci-hcd:usb3") # aux panda USB (or potentially anything else on USB)
|
||||
if "tici" in self.get_device_type():
|
||||
affine_irq(4, "xhci-hcd:usb1") # internal panda USB (also modem)
|
||||
|
||||
# GPU
|
||||
affine_irq(5, "kgsl-3d0")
|
||||
|
||||
|
@ -453,6 +449,18 @@ class Tici(HardwareBase):
|
|||
sudo_write("N", "/sys/kernel/debug/msm_vidc/clock_scaling")
|
||||
sudo_write("Y", "/sys/kernel/debug/msm_vidc/disable_thermal_mitigation")
|
||||
|
||||
# pandad core
|
||||
affine_irq(3, "spi_geni") # SPI
|
||||
if "tici" in self.get_device_type():
|
||||
affine_irq(3, "xhci-hcd:usb3") # aux panda USB (or potentially anything else on USB)
|
||||
affine_irq(3, "xhci-hcd:usb1") # internal panda USB (also modem)
|
||||
try:
|
||||
pid = subprocess.check_output(["pgrep", "-f", "spi0"], encoding='utf8').strip()
|
||||
subprocess.call(["sudo", "chrt", "-f", "-p", "1", pid])
|
||||
subprocess.call(["sudo", "taskset", "-pc", "3", pid])
|
||||
except subprocess.CalledProcessException as e:
|
||||
print(str(e))
|
||||
|
||||
def configure_modem(self):
|
||||
sim_id = self.get_sim_info().get('sim_id', '')
|
||||
|
||||
|
|
Loading…
Reference in New Issue