diff options
| author | Nick Moore <nicholasvmoore@gmail.com> | 2026-11-17 08:20:45 -0600 |
|---|---|---|
| committer | Nick Moore <nicholasvmoore@gmail.com> | 2026-11-17 08:20:45 -0600 |
| commit | 0a34d7a34ab82ee2185385bea16f1028d4036b87 (patch) | |
| tree | fd98f30e6c128a8a440b2eec54732204efdb6548 /0001-arm64-dts-rockchip-pin-RK3328-rkvdec-RGA-clocks-at-the-mpp-advanced-rate.patch | |
| parent | ad3cdfa4ec0948a511d62f7119972814559100a7 (diff) | |
patch: replace hand-written diff with git format-patch output (PR #399 provenance); note Rockchip PRHEADmain
Diffstat (limited to '0001-arm64-dts-rockchip-pin-RK3328-rkvdec-RGA-clocks-at-the-mpp-advanced-rate.patch')
| -rw-r--r-- | 0001-arm64-dts-rockchip-pin-RK3328-rkvdec-RGA-clocks-at-the-mpp-advanced-rate.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/0001-arm64-dts-rockchip-pin-RK3328-rkvdec-RGA-clocks-at-the-mpp-advanced-rate.patch b/0001-arm64-dts-rockchip-pin-RK3328-rkvdec-RGA-clocks-at-the-mpp-advanced-rate.patch new file mode 100644 index 0000000..19c0d00 --- /dev/null +++ b/0001-arm64-dts-rockchip-pin-RK3328-rkvdec-RGA-clocks-at-the-mpp-advanced-rate.patch @@ -0,0 +1,68 @@ +From 06532e55c4984fa40919d492afe996f6bfc77a51 Mon Sep 17 00:00:00 2001 +From: Nick Moore <nicholasvmoore@gmail.com> +Date: Tue, 17 Nov 2026 08:19:07 -0600 +Subject: [PATCH] arm64: dts: rockchip: pin RK3328 rkvdec/RGA clocks at the mpp + advanced rate + +The rk3328.dtsi CRU assigned-clock-rates boot the video decoder +interfaces at 100 MHz (ACLK_RKVDEC_PRE, SCLK_VDEC_CABAC, +SCLK_VDEC_CORE) and the RGA at 100 MHz. On the Rockchip 6.12 BSP (rkr) +mpp stack the rkvdec auto-frequency path never fires on RK3328: +/proc/mpp_service/rkvdec/{aclk,clk_core,clk_cabac,clk_hevc_cabac} +report real_rate_hz of 0, idle and under full load, so the driver's +rockchip,normal-rates (300 MHz) and rockchip,advanced-rates (400 MHz) +are never applied and decode runs at the 100 MHz boot pin - 33.8 fps +4K HEVC vs 70.2 fps with the clocks at 400 MHz (117% of the 60 fps +datasheet spec, RK3328 datasheet v1.4). + +Fix by assigning the clocks on the consumer nodes at the advanced +rate. Consumer-node assignments execute at device probe, after the CRU +has raised CPLL to 1.2 GHz, so the rate resolves exactly (1200/3) and +CCF selects the CPLL parent. The venc (H.264 encoder) side is left +alone: the venc driver self-manages its clocks (runtime-resume -> +300 MHz default, idle -> 50 MHz reduce rate) via working CCF writes. + +Measured on Rock Pi E (RK3328, kernel 6.12.81-rkr12, 2160p50 HEVC +11.6 Mbps test stream): + + clocks decode 4K HEVC dec->RGA->null + boot pins (100/50 MHz) 33.79 fps 31.55 fps + decoder + RGA @ 400 MHz 70.21 fps 40.84 fps + +RGA note: the clk_rga mux can rest on GPLL (reset default), leaving it +at 491.52/3 = 163.84 MHz even after a divider change. Assigning +SCLK_RGA at boot forces the CPLL parent; measured dec->RGA->null went +31.4 -> 40.8 fps. + +Signed-off-by: Nick Moore <nicholasvmoore@gmail.com> +--- + arch/arm64/boot/dts/rockchip/rk3328.dtsi | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi +index ccbbd5f..4ff019e 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi +@@ -1066,6 +1066,10 @@ + operating-points-v2 = <&rkvdec_opp_table>; + #cooling-cells = <2>; + devfreq = <&dmc>; ++ assigned-clocks = <&cru ACLK_RKVDEC_PRE>, <&cru SCLK_VDEC_CORE>, ++ <&cru SCLK_VDEC_CABAC>; ++ assigned-clock-rates = <400000000>, <400000000>, ++ <400000000>; + status = "disabled"; + + vcodec_power_model: vcodec_power_model { +@@ -1215,6 +1219,8 @@ + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA>; + clock-names = "aclk_rga", "hclk_rga", "clk_rga"; ++ assigned-clocks = <&cru ACLK_RGA_PRE>, <&cru SCLK_RGA>; ++ assigned-clock-rates = <400000000>, <400000000>; + status = "disabled"; + }; + +-- +2.56.1 + |
