Repository navigation
T8112: enable PMP with CPU memory floor and display clock scaling - #3789
Conversation
…ength The T8112 PMP sends UPDATE_IOREG for three of its registered entries shortly after it starts and expects CONFIRM_IOREG to carry the registered entry length (8), as on T8132. Set confirm_ioreg_len on HW_CFG_T8112 so the driver replies with each entry's registered length. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
On T8112, pmp_report and its child entries (including apple,always-on disp0) probe before apple_pmp starts the PMP firmware. Set defer_requests on apple_pmp_offsets_t8112 so requests stay in the shadow word until PMP-STATUS reports running, then flush together and wait for SOC-DEV-PS-ACK. Also handle defer_requests reports in apple_pmp_report_wait_ready() so display drivers carrying apple,pmp-report can poll until the running PMP has flushed deferred requests and acknowledged their display bit, returning -ENODEV immediately when the PMP node was not handed over by the boot loader. Add a KUnit case covering the deferred wait_ready states. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…sent Allow any DCP node carrying apple,pmp-report to wait for PMP acknowledgment of its display request before starting the coprocessor and set dcp->pmp_display_acked once acknowledged, lifting the provider-clock mode limit when the PMP is running and scales the display clock. Preserve the existing hard-fail behavior for T8122/J613 external DCPs; on other DCPs, return -EPROBE_DEFER if the report driver has not probed yet, return 0 immediately on -ENODEV (PMP not handed over by the boot loader), and warn while continuing with the provider-clock cap intact if the acknowledgment times out. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…evice In the T8112 PMP soc-device table, records 2 and 3 are SOC-AON and SOC-REST, placing EACC0 at 4, PACC0 at 5, AGX at 6, ANE0 at 7, ISP at 8, DISP at 9, DISPEXT at 10, AVE at 11, AVD at 12, MSR at 13, JPEG at 14, SCODEC at 15, LTR at 16, and DISPDFR at 17 (0x11). The pmp_report child nodes from pmp_report_gfx through pmp_report_scodec were off by -2 (0x4..0xd instead of 0x6..0xf), so enabling the PMP sent DISP and DISPEXT requests to ANE0 and ISP instead of bits 9 and 10, causing high-rate DCP mode sets to time out while the PMP treated the display blocks as off. Update all ten report entries to their actual soc-device indices. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…y ack Enable the PMP on T8112 (APPLE_USE_PMP), link pmp_report to the PMP node with the demand-driven CPU memory floor (top DCS class 0x25 level 4, top fabric class 0x21 level 2), and point both dcp and dcpext at their pmp_report entries via apple,pmp-report so each waits for PMP display acknowledgment and lifts the provider-clock cap once the PMP is scaling the display clock. With the PMP running, the CPU memory floor restores full P/E-core DRAM bandwidth and the PMP dynamically scales the display clock for high-refresh external modes. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
The T8112 report indices match the intended device entries. Startup defers requests until PMP is running, and display clock scaling is admitted only after both the request and its acknowledgement are visible. The J473 mode, bandwidth and soak row covers the proposed tree. Relevant hosted checks and a second T8112 board row are still pending.
Withdrawing my approval after reproducing two host-test regressions at 098b53c. Both pass on the tested base 6f3b2a3. The graph extractor omits the new apple_pmp_report_defer_ready() helper. The supplier fixture also lacks defer_requests in its mock offsets. Please update both fixtures and verify the normal and mutation runs.
The T8112 PMP change made apple_pmp_report_wait_ready() call the new apple_pmp_report_defer_ready() when the report's offsets set defer_requests. Both T6030 host fixtures extract wait_ready verbatim and stopped compiling: - t6030-pmp-graph-tests: extract apple_pmp_report_defer_ready() as well (the fixture already models rep->defer and defer_requests). - t6030-pmp-supplier-tests: add defer_requests to the mock offsets and a stub defer_ready() that fails the test if reached, since T6030 never defers requests. Normal and mutation runs of both pass again.
|
Fixed the two host-test regressions from the 14:33Z review in 579e4a2 (fixtures only, no driver change):
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Both T6030 PMP fixtures now pass on this head. I reran the graph and supplier suites with Clang, including both mutation runs. The update touches only the fixtures, so the J473 runtime evidence still applies to the driver changes. Hosted checks and the second T8112 hardware row remain open.
Tested: J473 M2 mini at 098b53c (tree-identical to tested build 0dbd7ed7): 0 failed units, SELinux Enforcing, 0 AVC, PMP running (0x600 acked), P 38.6 / E 17.6 GB/s memcpy, 144/165/180/240/280 Hz mode sweep + live DVFS-STATE scaling 0x101->0x301->0x101, DPMS off/on PASS, 30-min soak (37 mode cycles) 0 crashes / 0 timeouts.
Risk: two-way · T8112 (M2)
Summary
Enable the T8112 (M2) Power Management Processor (PMP) with its demand-driven CPU memory floor and display clock scaling, fixing both the PMP-on external display mode-set timeout (
set_digital_out_mode timed out) and the locked 360 MHz display clock cap (Ref #3604).Root Causes & Fixes (5 commits, 5 files, +139 / -32 lines incl. KUnit)
soc: apple: pmp: confirm T8112 registry updates with the registered length(drivers/soc/apple/pmp.rs)confirm_ioreg_len: trueonHW_CFG_T8112so the three startupUPDATE_IOREGrequests receiveCONFIRM_IOREG 8(matching each entry's registered length), as on T8132.pmdomain: apple: pmp-report: defer T8112 requests and support wait_ready(drivers/pmdomain/apple/pmp-report.c,drivers/pmdomain/apple/pmp-report-start-test.c).defer_requests = trueonapple_pmp_offsets_t8112so early boot power-domain requests (probed beforeapple_pmpstarts the firmware) stay inrep->shadowuntilPMP-STATUSreports running, then flush atomically and wait forSOC-DEV-PS-ACK.defer_requestsreports inapple_pmp_report_wait_ready()(returning-ENODEVimmediately when the PMP node is not handed over,-EIOwhile starting/unacknowledged,0once running, flushed, requested, and acknowledged). Addpmp_defer_wait_ready_testKUnit test.drm/apple: dcp: wait for PMP display ack when apple,pmp-report is present(drivers/gpu/drm/apple/dcp.c)dcp_ext_wait_pmp()so any DCP carryingapple,pmp-reportwaits for PMP acknowledgment and setsdcp->pmp_display_acked = true(lifting the provider-clock mode cap once the PMP scales the display clock). Preserves existing hard-fail semantics on T8122/J613 external DCPs; degrades gracefully on-ENODEV(0 ms delay, cap intact) or timeout on other DCPs.arm64: dts: apple: t8112: fix pmp_report entry indices to match soc-device(arch/arm64/boot/dts/apple/t8112.dtsi)soc-devicerecords 2 and 3 areSOC-AONandSOC-REST, shiftingEACC0..SCODECby +2 (AGX=6,ANE0=7,ISP=8,DISP=9,DISPEXT=10,AVE=11,AVD=12,MSR=13,JPEG=14,SCODEC=15,DISPDFR=17). The ten entriespmp_report_gfx..pmp_report_scodecwere off by -2 (0x4..0xd), causingDISP(9) andDISPEXT(10) to remain unrequested with the PMP running and making high-rate DCP mode sets time out. Fix all ten indices.arm64: dts: apple: t8112: enable PMP with CPU memory floor and display ack(arch/arm64/boot/dts/apple/t8112.dtsi)APPLE_USE_PMP, linkpmp_reportto&pmpwithapple,cpu-memory-floor = <0x21 2 0x25 4>(same binding format ast8122.dtsiandDocumentation/devicetree/bindings/power/apple,t8140-pmp-report.yaml: class0x21top fabric level 2 of 3 states, class0x25top DCS level 4 of the 5 states already declared byapple,dcs-state-count = <5>int8112.dtsi), and addapple,pmp-reporttodcp(&pmp_report_disp0) anddcpext(&pmp_report_dispext).Verification
Local Build & KUnit
checkpatch.pl --strict --git aurora/main..HEAD: 0 errors, 0 warnings, 0 checks across all 5 commits.W=1compile ondrivers/pmdomain/apple/pmp-report.oanddrivers/gpu/drm/apple/dcp.o: no new warnings.kunit.py run --arch=arm64 --kunitconfig drivers/pmdomain/apple/.kunitconfig.apple-pmp-start --make_options LLVM=1: 33/33 passed (apple-pmp-start15/15 incl.pmp_defer_wait_ready_test,apple-pmp-fast-die4/4,apple-pmp-report14/14).kunit.py run --arch=arm64 --kunitconfig drivers/gpu/drm/apple/tests/display.kunitconfig --make_options LLVM=1: 188 passed, 1 skipped, 0 failed.Hardware Row (Mac mini M2, J473, T8112, macOS 27.2 firmware)
Tested exact tree (
098b53c0d52ab7, tree-identical to build0dbd7ed7464a6d) on7.3.0-aurora-m2pmp+ trial Stage 2 (m2combo32aurae019f3e6+ newly compiledt8112-j473-fw27.dtb), dual monitors (MSI USB-CDP-22560x1440 up to 280 Hz DSC + Acer HDMIHDMI-11920x1080 up to 180 Hz):apple_pmp 23b500000.pmp: PMP firmware and endpoint ready;apple-pmp-report: PMP running (status 0x1), requests 0x600;PMP acknowledged the display requeston both231c00000.dcpand271c00000.dcp;memory floor owner admitted: PACC0 update +0x10548;pmp-gfx,pmp-disp0,pmp-dispextall ON; SELinuxEnforcing,0failed units,0AVC,0crashes,0timeouts.mcpyP-core 38.6 GB/s / E-core 17.6 GB/s (x3: 38.6/17.6, 38.6/17.5, 38.6/17.5 GB/s). After 60 s idle, floor drops cleanly (dvfs_state=0x101), then re-raises to 38.6 / 17.4 GB/s (vs 9.9/6.0 GB/s without floor and 35.4/16.6 GB/s with PMP off).DP-22560x1440: 144 Hz (dvfs_state=0x101) -> 165 Hz (0x101) -> 180 Hz (0x101) -> 240 Hz (0x301) -> 280 Hz (0x301) -> 144 Hz (0x101), 0 timeouts, 0 crashes.connected_after=2), 0 timeouts, 0 crashes.1800 s, 37 refresh-rate cycles across 165/240/280/144 Hz + periodicmcpy+ mid-soak DPMS off/on): 0 PMP crashes, 0 DCP crashes, 0 mode-set timeouts, 125 floor raises / 124 drops (faulted=0),dvfs_state=0x324under load at 240/280 Hz (matching DISP state 3 + SOC state 2 + DCS state 4), 0 AVC, 0 failed units, clean reboot back to saved kernel.