From 8a4e71cb0f3dda9c3c9f981f825302ce69616719 Mon Sep 17 00:00:00 2001 From: Nick Moore Date: Tue, 17 Nov 2026 08:13:59 -0600 Subject: 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. --- scripts/vpu-clock-watchdog.initd | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 scripts/vpu-clock-watchdog.initd (limited to 'scripts/vpu-clock-watchdog.initd') 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 +} -- cgit v1.3