Skip to content

arm64: dts: apple: t8132-j773g: wire pmc_dispext0/1 interfaces (4K@120Hz bandwidth) - #2761

Closed
DjDeveloperr wants to merge 1 commit into
djdev/j773g-272-dcpext0from
djdev/j773g-pmc-dispext-bw
Closed

DjDeveloperr wants to merge 1 commit into
djdev/j773g-272-dcpext0from
djdev/j773g-pmc-dispext-bw

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Summary

Stacked on #2541 (djdev/j773g-272-dcpext0).

On T8132, the PMC ignores an external display pipe's bandwidth request (BWR) and display-clock boost votes while its interface enable bits in 0x3828ac020 (bwr_enable) and 0x3828ac028 (boost_enable) remain clear (drivers/pmdomain/apple/pmc.c). t8132-j713-j715.dtsi wires pmc_dispext0 and pmc_dispext1 into ps_dispext0_fe and ps_dispext1_fe, whereas t8132-j773g.dts left them unconnected — leaving dispext0 BWR/boost off at 4K@120Hz (perf_state=5) and halving available DRAM bandwidth across both GPU and CPU.

  • Wire <&pmc_dispext0> and <&pmc_dispext1> as the second power-domain parent of &ps_dispext0_fe and &ps_dispext1_fe, keeping &ps_dispext0_sys at index 0 (matching t8132-j713-j715.dtsi).
  • Point &framebuffer0 at <&ps_dispext0_sys> instead of <&ps_dispext0_fe> so simpledrm still binds early when CONFIG_APPLE_PMP=m (apple-pmc defers until apple-pmp binds); ps_dispext0_fe is apple,always-on and never powered off by genpd.

Hardware Verification (M4 Mac mini J773g, macOS 27.2 / 26B123)

  • Boot-default verification (7.3.0-ARCH-m4prod1, dcp61-m4prod1-full, zero /dev/mem writes):
    • /sys/kernel/debug/apple-pmc/382800000.power-management/status comes up automatically at boot with bwr enable: 0x00000018 (saved 0x00000000) and boost enable: 0x00000007 (saved 0x00000001) (0 deferred devices).
  • 4K@120Hz bandwidth measurement (dcp55, J773g 26B123):
    • Before (bwr_enable=0x00): GPU DRAM BW 51.54 GB/s, CPU 4P BW 45.59 GB/s.
    • After (bwr_enable=0x18, boost_enable=0x07): GPU DRAM BW 100.39 GB/s in-place and 102.54 GB/s after re-modeset (+9.8% over native macOS 27.2 93.42 GB/s), CPU 4P BW 97.70 GB/s.
  • scripts/checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks.
  • t8132-j773g.dtb builds cleanly.

Assisted-by: LLM (Gemini:4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Reviewed the top commit (9bc2bc9) only; the rest is #2541.

The fix is right and the numbers make the case: with the PMC interfaces as second parents of the dispext FE domains, the BWR/boost enables come up at boot (0x18 / 0x07), and DRAM bandwidth under a 4K@120 pipe goes from ~51 to ~100 GB/s. Moving framebuffer0 to ps_dispext0_sys keeps simpledrm from waiting on apple-pmp, and since the FE domain is always-on, the boot framebuffer loses nothing.

One request: this is now the second copy of the same wiring (t8132-j713-j715.dtsi:64 has the dispext0 half). The PMC interfaces are SoC blocks (t8132-memory.dtsi), and every T8132 board with these pipes needs the same parents, including the 14-inch MacBook Pro and the iMacs, which would otherwise ship with half the bandwidth under an external display. Please move &ps_dispext{0,1}_fe { power-domains = <&ps_dispext{0,1}_sys>, <&pmc_dispext{0,1}>; } into a shared T8132 dtsi and drop the per-board copies, J713/J715 included. That needs a J713 boot to show nothing changed there (the PMC status shows the same enables, external display still lights).

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr
DjDeveloperr force-pushed the djdev/j773g-pmc-dispext-bw branch from 9bc2bc9 to d86ac07 Compare November 22, 2026 02:25
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Updated top commit to d86ac07ca41fd (arm64: dts: apple: t8132: wire pmc_dispext0/1 interfaces in shared t8132.dtsi):

  • Moved &ps_dispext0_fe / &ps_dispext1_fe PMC parent wiring (<&ps_dispext{0,1}_sys>, <&pmc_dispext{0,1}>) into shared arch/arm64/boot/dts/apple/t8132.dtsi (right after #include "t8132-memory.dtsi", so drivers/soc/apple/t8132-platform-data.dts — which includes only t8132-memory.dtsi and deletes pmc_dispext{0,1} — is untouched) and dropped the per-board copies from t8132-j713-j715.dtsi and t8132-j773g.dts.
  • Kept the &framebuffer0 -> <&ps_dispext0_sys>, <&ps_dptx_phy> fix on t8132-j773g.dts.
  • Verified scripts/checkpatch.pl --strict (0/0/0) and all t8132-*.dts compile cleanly with dtc.

Assisted-by: LLM (Gemini:4 Neon)

@DjDeveloperr
DjDeveloperr force-pushed the djdev/j773g-272-dcpext0 branch from 9952e46 to bc0067c Compare November 22, 2026 04:39
…132.dtsi

On T8132, the PMC ignores an external display pipe's bandwidth request
(BWR) and display-clock boost votes while its interface enable bits in
0x3828ac020 (bwr_enable) and 0x3828ac028 (boost_enable) remain clear
(drivers/pmdomain/apple/pmc.c). Previously only t8132-j713-j715.dtsi wired
pmc_dispext0 and pmc_dispext1 into ps_dispext0_fe and ps_dispext1_fe,
leaving J773g (as well as J604 and the M4 iMacs) unconnected and cutting
available DRAM bandwidth in half under a 4K@120Hz pipe (51.54 GB/s vs
102.54 GB/s).

Move the shared <&pmc_dispext0> and <&pmc_dispext1> second power-domain
parent wiring for &ps_dispext0_fe and &ps_dispext1_fe into t8132.dtsi
(keeping &ps_dispext0_sys at index 0 so apple_pmgr_ps_hold_parents()
enables pmc_dispext0 cleanly even when ps_dispext0_fe starts active from
iBoot, while leaving t8132-platform-data.dts unaffected because it
includes only t8132-memory.dtsi), and drop the per-board copy from
t8132-j713-j715.dtsi.

On t8132-j773g.dts, point &framebuffer0 at <&ps_dispext0_sys> instead of
<&ps_dispext0_fe> so simpledrm still binds early when CONFIG_APPLE_PMP=m
(apple-pmc defers until apple-pmp binds); ps_dispext0_fe is
apple,always-on and never powered off by genpd.

Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr
DjDeveloperr force-pushed the djdev/j773g-pmc-dispext-bw branch from d86ac07 to b76381c Compare November 22, 2026 05:10
@RyanTheTide

Copy link
Copy Markdown
Contributor

The tip (daa9e2d) still has the dispext PMC parents only in t8132-j713-j715.dtsi, and t8132-j773g.dts still holds ps_dispext0_fe for the boot framebuffer, so this is not on integration/aurora yet. The PR's own commit b76381c applies cleanly on daa9e2d by itself; the conflict GitHub would show comes from the #2541 base (the apple-dcp boot.py selftest), not from this change. Since it does not need #2541, retargeting it to integration/aurora would let it land independently. Still open from the review: a J713 or J715 boot on the shared-dtsi version showing the PMC bwr/boost enables unchanged.

@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026
@RyanTheTide
RyanTheTide deleted the branch djdev/j773g-272-dcpext0 November 27, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants