Repository navigation
arm64: dts: apple: t8142: request AVD performance via PMP report - #3836
Conversation
Add a PMP report entry for AVD on T8142 (soc-device record 19 / 0x13,
SOC-DEV-DVFS entry 0x40, level 2) and attach it as AVD's optional "perf"
power domain alongside ps_avd_sys ("core") on J813/J815 and J704.
Without a "perf" domain, AVD runs at the lowest SoC fabric state (0)
whenever CPUs and GPU are lightly loaded -- including 4K60 video playback
after the J813/J815 CLPC GPU busy-share ladder lowered light compositing
to DCS 1 / fabric 0 -- capping high-bitrate 4K60 H.264 decode below real
time (~44 fps on a 156 Mbps peak 4K60 stream on J813).
With pmp_report_avd wired as "perf", apple-avd's demand-gated PM
engages the PMP report only for demanding streams (>1080p, >=180 Mpx/s,
multi-stream, or queue backlog) and releases it back to 0 on idle:
- PMP acknowledges record 0x13 and votes SOC state 2 through its static
PMC voter agent (agent0 floor 0x00000020).
- Measured on J813 (M5 MacBook Air 13-inch, idle CPUs, 156 Mbps peak
4K60 H.264 via ffmpeg -hwaccel v4l2request):
- No perf domain (SOC 0): 44 fps (0.73x)
- Level 1 (SOC 1): 67 fps (1.11x)
- Level 2 (SOC 2): 99 fps (1.66x), bit-exact MD5 vs SW decode
- Level 3 (SOC 3): 100 fps (1.67x)
- Level 4 (SOC 4): 99 fps (1.66x); level 5 clamps to 4
- 4K60 HEVC decodes at 3.96x at level 2 (matching 4.02x at SOC 4 + DCS 7).
- 1080p30 real-time decode keeps pmp-avd off-0 (agent0 floor 0x00000000).
Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
RyanTheTide
left a comment
There was a problem hiding this comment.
Approved at cce70b4. This uses the same pattern as T8140 (avd perf = pmp_report_avd0, "core"/"perf" names, pmp report entry with power-domains = ps_avd_sys). pmp_report is enabled on J704 and on J813/J815 (j815.dts includes t8142-j813-avd.dtsi). report@13 does not clash with the other T8142 entries (J704 hdmi = @1a). apple,dvfs is a 2-cell value, as pmp-report.c parses it. The J813 row shows the vote engaging (0x20) only on demand and releasing to off-0 at idle. Decode output is bit-exact. Follow-up, not a blocker: J815/J704 live rows.
What: Wire
pmp_report_avd(report@13,SOC-DEV-DVFSentry0x40, level 2) as AVD's demand-gated"perf"power domain on T8142 (J813/J815 and J704) so 4K60 hardware video decode is no longer starved at SOC fabric state 0 when CPUs and GPU are lightly loaded (such as after #3710 lowered light desktop compositing to DCS 1 / fabric 0).Tested: J813 M5 MacBook Air 13-inch at
cce70b4d3c9a(7.3.0-aurora-j813-avd+): boots cleanly (0 failed units, 0 new kernel errors,s2idle [deep]); 156 Mbps peak 4K60 H.264 decode rises from 44 fps (0.73x) to 99 fps (1.65x, bit-exact MD5 vs SW decode) with PMP votingagent0 = 0x20during decode and releasing to0x00(pmp-avdoff-0) on idle; 1080p30 real-time decode keepspmp-avdoff-0; livempvplayback achieves 0 VO drops and 0 decoder drops acrossvo=gpu-next,vo=gpu, andvo=dmabuf-wayland.Risk: two-way door · M5 (T8142) Macs (J813, J815, J704)
Not yet: J815 and J704 live hardware runs (both share the T8142 SoC PMP/AVD layout and passed
dtbs_checkwith 0 warnings)Details
pmp_report(apple,t8142-pmp-v2-report) already coversSOC-DEV-DVFSentries0x37..0x46, andapple-avd(52d1efdec9d9) already demand-gates its optional"perf"power domain (engaging on>1080p,>=180 Mpx/s, multi-stream, or>=4queued frames, while leaving it off on single-stream 1080p30/60).soc-devicerecord 19 (0x13), DVFS ordinal 9 (SOC-DEV-DVFSentry0x37 + 9 = 0x40), withPMP-SOC(0x20) performance floor requests.pmp_report_avd: report@13withapple,dvfs = <0x40 2>andpower-domains = <&ps_avd_sys>lets the PMP acknowledge AVD and vote SOC state 2 (agent0 floor: 0x00000020) via its static PMC agent only while demanding streams are active.99 -> 101 fpsH.264,3.96x -> 4.02xHEVC), so no separate DCS floor is needed.Evidence
Exact-head J813 (
air5) verification atcce70b4d3c9a(7.3.0-aurora-j813-avd+)Linux air5 7.3.0-aurora-j813-avd+ #2 SMP PREEMPT aarch64,0failed systemd units,mem_sleep: s2idle [deep],apple-pmp-report 3803c0000.pmp-report: PMP running (status 0x1), requests 0x0, 0 new kernel errors.ffmpeg -hwaccel v4l2request -i ~/man_over_bord_small.mp4 -t 13 -f null -, 780 frames, 156 Mbps peak, idle CPUs):agent0during decodeperf)0x00000000(SOC 0)0.73xapple,dvfs = <0x40 1>0x00000010(SOC 1)1.11xapple,dvfs = <0x40 2>(cce70b4d3c9a)0x00000020(SOC 2)1.65x0x00000000/off-0apple,dvfs = <0x40 3>0x00000030(SOC 3)1.67xapple,dvfs = <0x40 4>0x00000040(SOC 4)1.66xapple,dvfs = <0x40 5>0x00000040(SOC 4)1.66xtestsrc23840x2160@60, 120 frames):3.96x(0.50 s) atapple,dvfs = <0x40 2>vs4.02x(0.49 s) at SOC 4 + DCS 7.HW=MD5=558f73951aa2a928708ca14716364ad8,SW=MD5=558f73951aa2a928708ca14716364ad8.ffmpeg -re -hwaccel v4l2request):avd_sys: on,pmp-avd: off-0, PMCagent0 floor: 0x00000000.mpvplayback on J813 (~/man_over_bord_small.mp4, 0–13 s, Apple M5 G17G C0 OpenGL / Wayland):vo=gpu-next --video-sync=display-resample --hwdec=v4l2request:vo_drop=0,dec_drop=0, wall13.22s(was 84–215 VO / 6–30 dec drops)vo=gpu --hwdec=v4l2request:vo_drop=0,dec_drop=0, wall13.35s(was 320 VO / 80 dec drops)vo=dmabuf-wayland --hwdec=v4l2request:vo_drop=0,dec_drop=0, wall13.28s(was 349 VO / 96 dec drops)Static, schema, and KUnit checks
./scripts/checkpatch.pl --strict -g HEAD:0 errors, 0 warnings, 0 checksCHECK_DTBS=y DT_SCHEMA_FILES="apple,avd.yaml:apple,t8140-pmp-report.yaml"ont8142-j813.dtb,t8142-j815.dtb,t8142-j704.dtb: 0 warningskunit.pyarm64 QEMU (apple-*, incl.apple-avd-pmandapple-pmp-report):519/519passed