Repository navigation
soc: apple: pmgr-misc: scale optional T8103 display perf state at idle - #3508
Conversation
Document the optional disp-ps register range and board-verified apple,disp-min-pstate property for idle and s2idle display perf-state scaling. Signed-off-by: Erik Bourget <[email protected]>
Map the optional disp-ps clock-generator register block when described in device tree and validate an optional board floor (apple,disp-min-pstate). When idle and unheld, step the display perf state down to the verified floor alongside fabric and DCS; raise it back to the boot state on fabric holds, GPU activity, prepare, s2idle resume, or teardown. Add KUnit tests covering disp-ps DT floor validation, idle lowering, hold and GPU-busy raises, prepare restore, and s2idle stepping. Signed-off-by: Erik Bourget <[email protected]>
Describe the T8103 display perf-state block (0x23b060000) on pmgr_misc and set apple,disp-min-pstate = <2> on J313 (M1 MacBook Air), matching settled idle hardware state on the internal 2560x1600@60Hz panel. Signed-off-by: Erik Bourget <[email protected]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
Verdict: HOLD at 6a2a13f7
Blockers:
- Targets open non-default base branch
feat/pmgr-fabric-dcs. Retarget tomainonce the parent PR merges so fullmainCI runs on the final diff.
Checked:
- Optional T8103 display perf-state scaling in
apple-pmgr-miscis cleanly scoped andMERGEABLEagainstfeat/pmgr-fabric-dcs. - Checked for Apple material, tool attribution, and private serials: clean; human
Signed-off-bypresent.
Evidence
- Head:
6a2a13f7(base: feat/pmgr-fabric-dcs,mergeable: MERGEABLE,+266/-21across 5 files).
|
Head Host verification at
Hardware status at
|
main moved command publication to PublishError (non-blocking UAT bind). Keep the PMGR busy-reference EAGAIN retry as a PublishError::Error(EAGAIN) arm that ends any bind wait, and convert the stage failures to PublishError. Signed-off-by: Erik Bourget <[email protected]>
There was a problem hiding this comment.
Verdict: HOLD at e8ef019e
Blockers:
- Parent PR
#3468still open (branch carries older#3468base65880245vs#3468's current heade1c20cd7): Retargeting tomainahead of#3468's merge avoids auto-closure, so please wait for#3468to land onmainand then forward-mergemainso this PR carries only its owndisp-pscommits on top of the final#3468code. - Queued hosted CI at
e8ef019e(2P/0F/26Q):apple-build,dt-checks,host-tests,kunit,source, andpr-textare still running. - Exact-head J313 (
T8103) hardware row missing (e8ef019e): Current J313 evidence is from prior batched candidate9885060f59b1at6a2a13f7328e. Once#3468lands andmainis merged in, please post an exact-head J313disp_psscaling + display/s2idle row.
Checked:
- Verified
e8ef019ecleanly mergesmain(MERGEABLE) and that the panel-dependentapple,disp-min-pstateDT binding (Documentation/devicetree/bindings/soc/apple/apple,t6000-pmgr-misc.yaml) andt8103.dtsi/t8103-j313.dtschanges are cleanly scoped (t8103-j313.dtsexplicitly justifies the internal 2560x1600@60Hz scanout floor).
Evidence
- Head commit:
e8ef019e327a82ed7e4d3378d1f173ee59ccc352(MERGEABLEintomain). - Parent
#3468status:OPENate1c20cd7(ahead of65880245carried in this branch). - CI snapshot:
2P/0F/26Q.
There was a problem hiding this comment.
Superseded 12-01: not a hold under the merge bar (no shown failure). Head moved; follow-ups: build/DT/host checks, J313 idle display transition row on integrated tree
The merge now incorporates the current #3468 prerequisite and changes only the inherited GPU bind adjustment and its fixture relative to e8ef019. The optional display-scaling code carries forward. Please keep the current build, DT/schema and host checks pending and record the affected J313 idle display transition on the integrated tree. The broader board and SELinux matrix can follow separately.
571d7ca to
e8ef019
Compare
Signed-off-by: Erik Bourget <[email protected]> # Conflicts: # drivers/gpu/drm/asahi/g14_v27_2.rs # drivers/soc/apple/apple-pmgr-misc.c
Match apple_pmgr_raise_fabric() and apple_pmgr_raise_dcs() when an unfloored disp-ps block is left settled below its active p-state by deep sleep: write the active p-state rather than polling forever for hardware to step it on its own. Add a KUnit check for unfloored disp-ps deep-sleep recovery. Signed-off-by: Erik Bourget <[email protected]>
…ep check After apple_pmgr_misc_complete() queues idle_work, idle_work can queue idle_work_prompt before cancellation. Set misc->sleeping under misc->lock, cancel both idle_work and idle_work_prompt synchronously, and clear misc->sleeping before changing the display floor and mock register. Signed-off-by: Erik Bourget <[email protected]>
|
Merged Changes from
Host verification at
J313 (
Remaining under |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Reviewed optional DT resource handling, the active-rail confirmation, and suspend rollback. The J313 trial exercised the display floor and external-display holds. Hosted Apple build and KUnit are still pending.
|
Merging at |
What: Adds optional
disp-psregister range and board-verifiedapple,disp-min-pstateDT property toapple,t6000-pmgr-misc.yamlanddrivers/soc/apple/apple-pmgr-misc.c, describes T8103'sdisp-psblock (0x23b060000) int8103.dtsi, and setsapple,disp-min-pstate = <2>on J313 (t8103-j313.dts). When idle and unheld,apple-pmgr-miscsteps the display perf state from boot state 3 down to 2, raising back to 3 on fabric holds (external displays), GPU activity,prepare(),s2idleresume, teardown, or if an unflooreddisp-psis left settled below active by deep sleep.Tested: J313 (
T8103) composite row, host KUnit (35/35, default andCONFIG_SUSPEND=y),W=1, andcheckpatch.pl --strictpass at36ff4454234e(after mergingmaina171afd2123f, which includes landed#3468); full J313 kernel build (drivers/soc/apple/apple-pmgr-misc.obit-identical to31041b670820),dt_binding_check, andCHECK_DTBS=ypassed at31041b670820(binding, DTS, and driver unchanged in36ff4454234e); prior J313 (T8103) and J716c (T6050) hardware runs passed at6a2a13f7328ebefore themainmerge andDEV_DISPdeep-sleep raise update:M1 MacBook Air,T8103) at36ff4454234ein composite trial kernel (origin/main429e7e15f122+#3335,#3506,#3508,#3269,#3359,#3289;apple-pmgr-misc.o.o/.textbyte-identical vs single-PR merge on429e7e15f122, default Stage 2 DT carryingdisp-ps+apple,disp-min-pstate=<2>, default cmdline, docked CalDigit TS5 +DP-2): PASS — external display DPMS off settleddisp_psto0x222(holds=0); external display DPMS on raiseddisp_psto0x333(holds=1); after1x deepS2R (rtcwake -d rtc1 -m mem -s 30, ext display DPMS off first,success=1),holds=10x333(docked);0failed units,0AVC denials,5err+lines identical to default boot.M1 MacBook Air,T8103) composite row at36ff4454234e(origin/main429e7e15f122+#3335,#3506,#350836ff4454234e,#3269,#3359,#3289;apple-pmgr-misc.o.o/.textbyte-identical vs single-PR merge on429e7e15f122; GRUB one-shot, default Stage 2 DT carryingdisp-ps+apple,disp-min-pstate=<2>, default cmdline, docked CalDigit TS5 +DP-23840x2160@120, AC 100%):0failed units,0AVC denials,5err+lines identical to default boot).disp_ps=0x222(holds=0); external display DPMS on:disp_ps=0x333(holds=1).rtcwake -d rtc1 -m mem -s 30, external display DPMS off first): PASS (success=1, wakeNUB.SPMI0Sw3IRQ), post-wake docked stateholds=1disp_ps=0x333. (s2idleand undocked idle-after-wake0x222were not run on this boot.)36ff4454234e: 35/35 ARM64 KUnit (apple-pmgr-dcs13/13,apple-pmgr-fabric22/22, both default.kunitconfigandCONFIG_SUSPEND=y),W=10 warnings onapple-pmgr-misc.o(bit-identical SHA-25601e2f86d82c07d9a714d5657e51739bf892aaec8614d71b737d90b7736ec396dto31041b670820), andcheckpatch.pl --strict0/0/0 across all 5 PR commits; at31041b670820(unchanged files in36ff4454234e),dt_binding_check(apple,t6000-pmgr-misc.yaml),CHECK_DTBS=yon all 5t8103-*.dtbboards (0pmgr/disp-pswarnings or errors), andlinux-j313kernel build (aurora_defconfig,Image.gz+ DTBs + modules).T8103) at6a2a13f7328ein batched candidate9885060f59b1(overmainc6bf4998c83f, default cmdline, one-shotaura-tryStage 2 DTB): PASS —disp_psstepped0x00000333<->0x00000222on internaleDP-1with clean scanout and Borealisvulkaninfo,1x s2idle+1x deepS2R returning to0x00000222,-21.9/-21.8 mW PSTRmedian (-17.9 mW PHPC),0Oops/BUG/WARN/SError.T6050, unaffected SoC) at6a2a13f7328ein batched kernel3545ebecb76f: PASS — 5-item smoke andpm_test=devices/platformclean across 2 boots, nopmgr/disp_ps/display-power lines indmesg,0failed user units,0LSM denials,0Oops/BUG/fault.Risk: one-way door ·
apple,t6000-pmgr-misc.yamlDT binding (disp-ps,apple,disp-min-pstate), T8103 (t8103.dtsi), J313 (t8103-j313.dts); older DTBs withoutdisp-psand T6000/T6020 omitdisp-ps(DEV_DISPskipped), and T8103 boards withoutapple,disp-min-pstateskip idle and s2idle lowering (an unfloored T8103 rail can still be written back to its boot state after deep sleep).Not yet: Exact-head J313 (
T8103)s2idleand undocked idle-after-wake0x222readback at36ff4454234e(the36ff4454234ecomposite ran docked with externalDP-2active, whereholds=1holds0x333after deep S2R, and did not runs2idle); other T8103 boards; SELinux-enforcing boot (local test Macs run Arch ARM without SELinux policy).Details
At idle on T8103, the display perf-state block at
0x23b060000sits at boot state0x333, while the internal 2560x1600@60Hz panel cleanly scans out at state0x222. Following the board-opt-in floor model in#3468(apple,fabric-min-pstate/apple,dcs-min-pstate),disp-psis mapped optionally and only scaled whenapple,disp-min-pstateis present and validated against the boot state.After
#3468(feat/pmgr-fabric-dcs,a29e70068739) landed onmain,origin/main(a171afd2123f) was forward-merged intofeat/t8103-pmgr-misc-disp-ps(c27cda8ebe5c):drivers/gpu/drm/asahi/g14_v27_2.rsmatchesorigin/mainbyte-for-byte (no PR diff).drivers/soc/apple/apple-pmgr-misc.ccarries forwardapple_pmgr_write_disp()alongsideapple_pmgr_settled_below_active()frommain,31041b670820updatesapple_pmgr_raise_disp()to matchapple_pmgr_raise_dcs()so an unflooreddisp-psblock left settled below its active state by deep sleep is raised with writes rather than polling until timeout, and36ff4454234edrains bothidle_workandidle_work_promptbefore the deep-sleep KUnit subtest.Revert:
git revert -m 1 <merge-commit>; note the DT binding (apple,t6000-pmgr-misc.yaml) andt8103.dtsi/t8103-j313.dtsadditions are one-way once released in DTBs/bindings, while driver display perf-state scaling reverts cleanly with no persistent disk or firmware state written.Evidence
M1 MacBook Air,T8103) composite row at36ff4454234e(origin/main429e7e15f122+#3335,#3506,#350836ff4454234e,#3269,#3359,#3289;apple-pmgr-misc.o.o/.textbyte-identical vs single-PR merge on429e7e15f122; GRUB one-shot, default Stage 2 DT carryingdisp-ps+apple,disp-min-pstate=<2>, default cmdline, docked CalDigit TS5 +DP-23840x2160@120, AC 100%):0failed units,0AVC denials,5err+lines identical to default boot).disp_ps=0x222(holds=0); external display DPMS on:disp_ps=0x333(holds=1).rtcwake -d rtc1 -m mem -s 30, external display DPMS off first): PASS (success=1, wakeNUB.SPMI0Sw3IRQ), post-wake docked stateholds=1disp_ps=0x333. (s2idleand undocked idle-after-wake0x222were not run on this boot.)36ff4454234e:./tools/testing/kunit/kunit.py run --arch=arm64 --make_options=LLVM=1 --kunitconfig=drivers/soc/apple/apple-pmgr-misc.kunitconfig: 35/35 passed (apple-pmgr-dcs13/13,apple-pmgr-fabric22/22, includingpf_t8103_disp_scaling_testcovering unflooreddisp-psdeep-sleep raise)../tools/testing/kunit/kunit.py run --arch=arm64 --make_options=LLVM=1 --kunitconfig=drivers/soc/apple/apple-pmgr-misc.kunitconfig --kconfig_add=CONFIG_SUSPEND=y: 35/35 passed.make ARCH=arm64 LLVM=1 W=1 drivers/soc/apple/apple-pmgr-misc.o: 0 errors, 0 warnings (apple-pmgr-misc.oSHA-25601e2f86d82c07d9a714d5657e51739bf892aaec8614d71b737d90b7736ec396d, bit-identical to31041b670820)../scripts/checkpatch.pl --strict --git a171afd2123f..HEAD: 0 errors, 0 warnings, 0 checks across all 5 non-merge commits (59e2ae07b9cf,1ea56511a095,6a2a13f7328e,31041b670820,36ff4454234e).linux-j313build at31041b670820(DT, binding, andapple-pmgr-misc.cunchanged in36ff4454234e):make ARCH=arm64 LLVM=1 dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/soc/apple/apple,t6000-pmgr-misc.yaml: 0 errors, 0 warnings.make ARCH=arm64 LLVM=1 CHECK_DTBS=y apple/t8103-j274.dtb apple/t8103-j293.dtb apple/t8103-j313.dtb apple/t8103-j456.dtb apple/t8103-j457.dtb: 0pmgr/disp-pswarnings or errors across all 5 T8103 DTBs.kb run -p linux-j313:aurora_defconfigfull kernel, modules, and DTBs built cleanly (Image.gzSHA-25634af9f2b7b4e3233a882c36c56f587dad8888aa4a24a9a1b39163f4e2ed806df,t8103-j313.dtbSHA-256a88c3679a3ea2a8973fe9042d744098837f129a119fa93e2f1c69138f1952b97).T8103) at6a2a13f7328ein batched candidate9885060f59b1overmainc6bf4998c83f(default cmdline, one-shotaura-tryStage 2 DTB):disp_psstepped0x00000333<->0x00000222on internal 2560x1600@60HzeDP-1panel with clean scanout and Borealisvulkaninfo;1x s2idle+1x deepS2R (suspend_stats: success=2 fail=0) cleanly returned to0x00000222post-wake;0Oops/BUG/WARN/SError; two live A/B runs measured-21.9 mW/-21.8 mWPSTRmedian (-17.9 mWPHPCmedian):T6050, firmware 27.2, AC, default cmdline) at6a2a13f7328ein batched kernel3545ebecb76f: Boot 1 and Boot 2 smoke pass (eDP-13456x2234@120enabled, 4 input devices,wlan03/3 gateway ping 0% loss,AppleJ716+AppleJ716HPAIwithspeakerguarddv2 active, BorealisApple M5 Max (G17C B1)+renderD128+vkcube --c 180 --wsi waylandclean);4x pm_test=devices+2x pm_test=platform(Boot 1) and2x devices+1x platform(Boot 2) clean;1baseline failed system unit (aurora-peripherals.service),0failed user units,0LSM denials,0Oops/BUG/fault.