mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-08-24 01:33:53 +08:00
weston: treat all panels the same (#128)
* weston: treat all panels the same * fix linter
This commit is contained in:
@@ -15,9 +15,8 @@ TTYReset=yes
|
||||
TTYVHangup=yes
|
||||
TTYVTDisallocate=yes
|
||||
|
||||
# TODO: brightness setting doesn't work without this
|
||||
ExecStartPre=/bin/bash -c "[ -d /sys/firmware/devicetree/base/soc/qcom,mdss_mdp@ae00000/qcom,mdss_dsi_mate10_lite_video ] && \
|
||||
/usr/comma/modetest -M msm_drm -s 26:1080x2160-60 && \
|
||||
# TODO: DCS commands (e.g. brightness setting) don't work without this on tizi
|
||||
ExecStartPre=/bin/bash -c "/usr/comma/modetest -M msm_drm -s 26:1080x2160-60 && \
|
||||
sleep 1"
|
||||
|
||||
ExecStartPre=/bin/bash -c "mkdir -p $XDG_RUNTIME_DIR"
|
||||
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import time
|
||||
import subprocess
|
||||
|
||||
def run(cmd):
|
||||
subprocess.check_call(cmd, shell=True)
|
||||
|
||||
def timestamp_cmd(cmd):
|
||||
cnt = 0
|
||||
while True:
|
||||
cnt += 1
|
||||
print("try ", cnt)
|
||||
run("sudo chmod -R 770 /var/tmp/weston/")
|
||||
proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
t = time.monotonic()
|
||||
time.sleep(0.5)
|
||||
r = proc.poll()
|
||||
if r is not None:
|
||||
continue
|
||||
break
|
||||
print("r", r)
|
||||
return t
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
run("sudo systemctl stop weston")
|
||||
run("sudo rm -rf /var/tmp/weston/wayland-0")
|
||||
time.sleep(0.5)
|
||||
#run("sudo systemctl restart weston-ready")
|
||||
|
||||
run("sudo systemctl restart weston --no-block")
|
||||
st = time.monotonic()
|
||||
#ts = defaultdict()
|
||||
|
||||
cnt = 0
|
||||
while not os.path.exists("/var/tmp/weston/wayland-0"):
|
||||
time.sleep(0.1)
|
||||
cnt += 1
|
||||
t = time.monotonic()
|
||||
print(f"- socket at {t - st:.2f}s")
|
||||
|
||||
t = timestamp_cmd('/usr/comma/setup')
|
||||
print(f"- setup works {t - st:.2f}s")
|
||||
|
||||
t = timestamp_cmd('cd /data/openpilot/selfdrive/ui/ && ./spinner')
|
||||
print(f"- spinner works {t - st:.2f}s")
|
||||
Reference in New Issue
Block a user