aboutsummaryrefslogtreecommitdiff
path: root/scripts/vpu-clock-watchdog.initd
diff options
context:
space:
mode:
authorNick Moore <nicholasvmoore@gmail.com>2026-11-17 08:13:59 -0600
committerNick Moore <nicholasvmoore@gmail.com>2026-11-17 08:14:12 -0600
commit8a4e71cb0f3dda9c3c9f981f825302ce69616719 (patch)
treee1dd11ef23cea3cbd1d50a933c1dd11054407580 /scripts/vpu-clock-watchdog.initd
RK3328 VPU clock fix: DTS patch, CRU tool, boot-pin units, watchdog, write-ups
Out-of-box RK3328 BSP kernels boot the video decoder clocks at 100 MHz and the mpp driver's auto-frequency path never fires, capping 4K HEVC decode at 33.8 fps (57% of datasheet spec). Consumer-node clock assignment at 400 MHz restores the driver's own declared advanced rate: 70.2 fps decode, 40.8 fps dec->RGA. Includes a no-rebuild boot-pin alternative (OpenRC + systemd) and a repin watchdog.
Diffstat (limited to 'scripts/vpu-clock-watchdog.initd')
-rw-r--r--scripts/vpu-clock-watchdog.initd25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/vpu-clock-watchdog.initd b/scripts/vpu-clock-watchdog.initd
new file mode 100644
index 0000000..0375c9c
--- /dev/null
+++ b/scripts/vpu-clock-watchdog.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# /etc/init.d/vpu-clock-watchdog — background repin loop for RK3328 VPU
+# decoder/RGA clocks (companion to vpu-clocks.initd; both need
+# /usr/local/bin/cru from scripts/cru.c compiled on the board).
+#
+# Optional: only needed as belt-and-braces for the venc driver's
+# session-start clock re-application or future mpp driver changes. The
+# boot-time pin (vpu-clocks.initd) or the DTS patch alone already cover
+# the measured fix.
+
+description="Watchdog repinning RK3328 VPU decoder/RGA clocks to 400 MHz"
+
+command="/usr/local/bin/vpu-clock-watchdog.sh"
+command_background="yes"
+pidfile="/run/vpu-clock-watchdog.pid"
+output_log="/var/log/vpu-clock-watchdog.log"
+error_log="/var/log/vpu-clock-watchdog.log"
+
+depend() {
+ after vpu-clocks
+}
+
+start_pre() {
+ [ -x "$command" ] || return 1
+}