Compare commits

...
3 Commits
Author SHA1 Message Date
BFE EngineeringandClaude Haiku 5.5 ccf9359e31 Revert CPLL 900 MHz pin: render check missed [skip ci]
Decision pass 3 (2026-11-06) says that any miss in the .52 30-minute UI
check reverts the CPLL change to 1000 MHz and returns the item to the
orchestrator. The check ran on 2026-11-11 with flare-edge 201f74f9c
(candidate, pins feb66fd) against 4923dc4cc (baseline, pre-change pin).
The two flare-edge commits differ only in the vendor/warden-sdk pin.
Recomputed from the four 30-minute CSVs (two runs per image):

- render_ms mean: 12.33 and 12.48 ms (candidate) against 12.70 and
  12.79 ms (baseline): better.
- render_max top-10 mean: 56.44 and 56.32 ms against 50.11 and 55.20 ms:
  worse in both runs.
- frames above 50 ms: 7 and 8 against 4 and 6: worse.
- worst frame: 69.47 and 78.00 ms against 59.85 and 76.32 ms: worse.
- dmesg: 34 lines before and 34 after each run, so no new DDR, AXI,
  VOP or RGA lines.

The tail metrics miss the decision's "no worse" rule. This commit
restores the upstream cru assigned-clocks in
patches/20-arch-dts-bindings.patch (PLL_CPLL 1000 MHz, no 50, 100 or
30 MHz pins) and removes the static clock-plan check added by feb66fd.
The bench helpers from 97903d5 stay. Panels .52 to .56 already run the
pre-change clock (dclk_vop 31250000 Hz, read 2026-11-13), so no bench
revert is needed.

Re-apply feb66fd to test the 900 MHz plan again if the orchestrator
accepts the tail tradeoff.

Refs bfe-core1106-sdk#43
Refs flare-edge#3204 (GIC 121 leg still open)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qGNpGNtFT7nhShpH56
2026-11-13 20:09:56 -06:00
BFE EngineeringandClaude Haiku 5.5 97903d55f4 VOP pixel clock: bench helpers for the 30 MHz proof [skip ci]
Panel-side helpers for the bfe-core1106-sdk#43 bench proof on panels
.52 to .56 (2026-11-11): the clock and eth0 check (vopcheck.sh), the
30-minute UI stats workload (uirun.sh), the GIC 121 frame-start count
(gic121.sh) and the run summary (summarize.py). The helpers read
clk_summary and the DRM mode; they add no build or kernel change.

Refs bfe-core1106-sdk#43. Image built from flare-edge 201f74f9c, which
pins this branch at feb66fd.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdKQBPu4qHGnopkHjchmwz
2026-11-11 11:52:46 -06:00
BFE EngineeringandClaude Haiku 5.5 feb66fd863 Linux VOP pixel clock: CPLL 900 MHz pins the 30 MHz mode [skip ci]
dclk_vop_src is a composite with a 5-bit divider, so from the 1000 MHz
Linux CPLL the nearest reachable rate to 30 MHz is 31.25 MHz. The panel
then refreshed at 50.9 Hz, not the 48.87 Hz of the mode. U-Boot retunes
CPLL to 960 MHz, which gives an exact 30 MHz but breaks the 50 MHz GMAC
RMII reference (no exact divider at 960).

At CPLL 900 MHz, /30 gives exactly 30 MHz, /18 exactly 50 MHz (GMAC)
and /9 exactly 100 MHz (APB, PWM, watchdog). The cru node sets PLL_CPLL
to 900 MHz and pins CLK_50M_SRC, CLK_100M_SRC and DCLK_VOP_SRC right
after it. aclk_ddr_root falls from 500 to 450 MHz and clk_250m_src from
250 to 225 MHz; no driver change.

tests/vop-dclk/check-vop-dclk.py reads the clock plan from the patch
series (list order, PLL table, IDs, exact dividers, hunk line counts);
run-check-vop-dclk-tests.sh breaks one thing per case.

Fixes #43
Refs flare-edge#3204

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdKQBPu4qHGnopkHjchmwz
2026-11-10 00:36:43 -06:00
5 changed files with 124 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
# VOP pixel clock bench helpers (bfe-core1106-sdk#43)
Helpers for the bench proof of the CPLL 900 MHz clock plan. They run on a Warden panel
(busybox sh), read-only except for the UI workload, and need the panel's warden-ui test
hook (FIFO `/tmp/warden-ui.ctl`).
- `vopcheck.sh candidate|baseline`: reads clk_summary and the eth0 carrier. Candidate expects
pll_cpll 900000000, dclk_vop 30000000, clk_50m_src 50000000, clk_100m_src 100000000,
aclk_ddr_root 450000000 and clk_250m_src 225000000. Baseline expects pll_cpll 1000000000 and
dclk_vop 31250000. Exit 0 when all rows pass.
- `uirun.sh LABEL SECONDS`: fixed UI workload (wake, nav, two scrolls, home), one `stats` read
after each action. Writes `/tmp/vop-ui-LABEL.csv` and `.log` on the panel.
- `gic121.sh`: VOP frame-start count (GIC 121) in three-second windows, with INTR_EN0 and
DSP_CTRL0 read only. `WINDOWS=n` sets the number of windows.
- `summarize.py FILE...`: render_ms and render_max_ms statistics for each CSV
(`python3 -I summarize.py`).
Run a helper with `sh /tmp/<name>.sh` after copying it to the panel. Hold the panel's bench
lock for the whole run (`bench-lock run --class SOAK` for a workload).
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
# gic121.sh: VOP frame-start count (GIC 121) over three 3 s windows, read-only (no UI verbs, INTR_EN0 untouched).
cnt() { awk '/GIC-0 121 /{s=0; for(i=2;i<=NF;i++){ if($i ~ /^[0-9]+$/){s+=$i} else break }; print s; exit}' /proc/interrupts; }
bl=$(cat /sys/class/backlight/*/bl_power 2>/dev/null | head -1); br=$(cat /sys/class/backlight/*/brightness 2>/dev/null | head -1)
echo "backlight bl_power=$bl brightness=$br"
echo "INTR_EN0=$(devmem 0xff990034 2>/dev/null) DSP_CTRL0=$(devmem 0xff990020 2>/dev/null)"
i=1
while [ $i -le ${WINDOWS:-3} ]; do
c1=$(cnt); t1=$(cut -d' ' -f1 /proc/uptime); sleep 3; c2=$(cnt); t2=$(cut -d' ' -f1 /proc/uptime)
echo "window $i: count=$((c2-c1)) span=$(awk -v a=$t1 -v b=$t2 'BEGIN{printf "%.3f", b-a}') s rate=$(awk -v d=$((c2-c1)) -v a=$t1 -v b=$t2 'BEGIN{printf "%.2f", d/(b-a)}')/s"
i=$((i+1))
done
echo "GIC121DONE"
+42
View File
@@ -0,0 +1,42 @@
"""Summarize one UI-run CSV: stats samples per action and overall (python3 -I summarize.py FILE...)."""
import csv
import statistics
import sys
def num(v):
try:
return float(v)
except (TypeError, ValueError):
return None
def summarize(path):
rows = list(csv.DictReader(open(path, encoding="ascii")))
ok = [r for r in rows if num(r["render_ms"]) is not None and num(r["render_max_ms"]) is not None]
busy = [r for r in ok if (num(r["fps"]) or 0) > 0]
rmax = [num(r["render_max_ms"]) for r in ok]
rms = [num(r["render_ms"]) for r in busy]
fps = [num(r["fps"]) for r in busy]
out = {
"file": path,
"samples": len(rows),
"parsed": len(ok),
"busy_windows": len(busy),
"fps_mean": round(statistics.mean(fps), 2) if fps else None,
"render_ms_mean_busy": round(statistics.mean(rms), 3) if rms else None,
"render_ms_p95_busy": round(sorted(rms)[int(0.95 * (len(rms) - 1))], 3) if rms else None,
"render_max_ms_max": round(max(rmax), 2) if rmax else None,
"render_max_ms_p95": round(sorted(rmax)[int(0.95 * (len(rmax) - 1))], 2) if rmax else None,
"render_max_ms_mean": round(statistics.mean(rmax), 3) if rmax else None,
}
per = {}
for r in ok:
per.setdefault(r["action"], []).append(num(r["render_max_ms"]))
out["render_max_by_action"] = {a: round(max(v), 2) for a, v in per.items()}
return out
if __name__ == "__main__":
for p in sys.argv[1:]:
print(summarize(p))
+27
View File
@@ -0,0 +1,27 @@
#!/bin/sh
# uirun.sh LABEL SECONDS: fixed UI workload for SECONDS. Each action is followed by one stats read.
LABEL=$1; DUR=$2
OUT=/tmp/vop-ui-$LABEL.csv; LOG=/tmp/vop-ui-$LABEL.log
ui() { rm -f /tmp/warden-ui.dbg; printf '%s\n' "$1" > /tmp/warden-ui.ctl; n=0; while [ ! -s /tmp/warden-ui.dbg ] && [ $n -lt 100 ]; do sleep 0.05; n=$((n+1)); done; cat /tmp/warden-ui.dbg 2>/dev/null; }
key() { printf '%s\n' "$1" | awk -F': ' -v k="$2" '$1==k {print $2; exit}' | awk '{print $1}' | tr -d '%'; }
pid0=$(pidof warden-ui 2>/dev/null); echo "start uptime=$(cut -d' ' -f1 /proc/uptime) warden-ui=$pid0" > $LOG
dmesg | grep -i -E 'ddr|axi|vop|rga|error|fail|underflow|oops|bug|warn|timeout' | wc -l > /tmp/vop-dmesg-$LABEL.before
echo "uptime_s,action,reply1,page,cpu,fps,render_ms,render_max_ms,idle,memavail_kb" > $OUT
start=$(cut -d' ' -f1 /proc/uptime); cycles=0
while :; do
now=$(cut -d' ' -f1 /proc/uptime)
done_=$(awk -v a=$start -v b=$now -v d=$DUR 'BEGIN{print (b-a>=d)?1:0}')
[ "$done_" = 1 ] && break
for act in "wake" "nav settings/system" "scroll 360 300 300" "scroll 360 300 -300" "home"; do
r1=$(ui "$act" | head -1 | tr ',' ';')
sleep 1.2
s=$(ui stats)
page=$(key "$s" page); cpu=$(key "$s" cpu); fps=$(key "$s" fps); rms=$(key "$s" render); rmax=$(key "$s" render_max); idle=$(key "$s" idle); mem=$(key "$s" memavail)
echo "$(cut -d' ' -f1 /proc/uptime),$act,$r1,$page,$cpu,$fps,$rms,$rmax,$idle,$mem" >> $OUT
sleep 0.3
done
cycles=$((cycles+1)); sleep 1
done
echo "end uptime=$(cut -d' ' -f1 /proc/uptime) warden-ui=$(pidof warden-ui 2>/dev/null) cycles=$cycles" >> $LOG
dmesg | grep -i -E 'ddr|axi|vop|rga|error|fail|underflow|oops|bug|warn|timeout' | wc -l > /tmp/vop-dmesg-$LABEL.after
echo "DONE $LABEL" >> $LOG
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
# vopcheck.sh MODE (candidate|baseline): read-only clock plan and eth0 check on a bench panel.
MODE=${1:-candidate}
CS=/sys/kernel/debug/clk/clk_summary
rate() { awk -v n="$1" '$1==n {print $5; exit}' $CS; }
fail=0
chk() { if [ "$3" = "$2" ]; then echo "PASS $1 = $3"; else echo "FAIL $1 = $3 (want $2)"; fail=1; fi; }
if [ "$MODE" = candidate ]; then
chk pll_cpll 900000000 "$(rate pll_cpll)"
chk dclk_vop_src 30000000 "$(rate dclk_vop_src)"
chk dclk_vop 30000000 "$(rate dclk_vop)"
chk clk_50m_src 50000000 "$(rate clk_50m_src)"
chk clk_100m_src 100000000 "$(rate clk_100m_src)"
chk aclk_ddr_root 450000000 "$(rate aclk_ddr_root)"
chk clk_250m_src 225000000 "$(rate clk_250m_src)"
else
chk pll_cpll 1000000000 "$(rate pll_cpll)"
chk dclk_vop 31250000 "$(rate dclk_vop)"
fi
carrier=$(cat /sys/class/net/eth0/carrier 2>/dev/null)
if [ "$carrier" = 1 ]; then echo "PASS eth0 carrier=1 speed=$(cat /sys/class/net/eth0/speed 2>/dev/null)"; else echo "FAIL eth0 carrier=$carrier"; fail=1; fi
echo "VOPCHECK mode=$MODE release=$(sed -n 's/.*GIT_COMMIT=\([^ ]*\).*/\1/p' /etc/warden-release) rc=$fail"
exit $fail