-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Comma Device
committed
Feb 15, 2025
1 parent
c4ee645
commit 5ef3cd7
Showing
4 changed files
with
82 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
set -e | ||
set -x | ||
|
||
for cam-cpas crm_workq-cam_fd_worker crm_workq-cam_ife_worke crm_workq-cam_lrme_devi | ||
crm_workq-cam_lrme_hw_w | ||
qcom,cam170-cpas-cdm0 | ||
qcom,cam_virtual_cdm | ||
|
||
sudo su -c "echo 40 | tee /sys/devices/virtual/workqueue/*cam*/cpumask" | ||
echo 40 | sudo tee /sys/devices/virtual/workqueue/*cam*/cpumask | ||
sudo cat /sys/devices/virtual/workqueue/*cam*/cpumask | ||
|
||
for pid in $(ps -A | grep cam | awk '{print $1}'); do | ||
chrt -p $pid | ||
sudo chrt -f -p 1 $pid | ||
sudo taskset -pc 6 $pid || echo "failed on $pid" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env python3 | ||
import time | ||
from openpilot.system.manager.process_config import managed_processes | ||
from msgq.visionipc import VisionIpcClient, VisionStreamType, VisionBuf | ||
from openpilot.selfdrive.modeld.models.commonmodel_pyx import CLContext, MonitoringModelFrame | ||
|
||
cnt = 0 | ||
try: | ||
while True: | ||
""" | ||
cl_context = CLContext() | ||
vipc_client = VisionIpcClient("camerad", VisionStreamType.VISION_STREAM_DRIVER, True, cl_context) | ||
while not vipc_client.connect(False): | ||
time.sleep(0.1) | ||
print("cnnctDD") | ||
del vipc_client | ||
time.sleep(0.5) | ||
continue | ||
""" | ||
if (cnt % 5) == 0: | ||
managed_processes['modeld'].stop(block=True) | ||
managed_processes['modeld'].start() | ||
if (cnt % 3) == 0: | ||
managed_processes['dmonitoringmodeld'].stop(block=True) | ||
managed_processes['dmonitoringmodeld'].start() | ||
cnt += 1 | ||
time.sleep(1) | ||
except: | ||
managed_processes['modeld'].stop(block=True) | ||
managed_processes['dmonitoringmodeld'].stop(block=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters