Skip to content

arm64: dts: apple: t8132: connect the external display pipes' PMC enables on every M4 Mac - #4031

Merged
DjDeveloperr merged 1 commit into
mainfrom
fix/t8132-dispext-pmc-enables
Dec 3, 2026
Merged

DjDeveloperr merged 1 commit into
mainfrom
fix/t8132-dispext-pmc-enables

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What: On the M4 (T8132), only the MacBook Air device trees connect the external display pipes to their PMC interface enables. On every other M4 Mac the PMC ignores an external pipe's bandwidth and display-clock requests, which halves the DRAM bandwidth left under a 4K 120 Hz display. This moves the connection into the shared t8132.dtsi. It brings back #2761, which was closed when its base branch was deleted.

Tested: No hardware run at the head of this PR; the hardware results are from #2761 (see Evidence). Local checks at 2fdae383ffa7: the SoC's six device trees build W=1 with the same warnings as main, host tests 111/111, checkpatch --strict clean.

Risk: two-way · M4 (T8132) Macs. J713 and J715 take the same connection from the shared file, and their built device trees are byte-identical to main's. The J604 and the M4 iMacs get it for the first time; the J604's external display DARTs then wait for apple-pmc to probe, as they do on the J713.

Not yet: J773g boot at the head of this PR, with a USB-C display and with HDMI: the apple-pmc status must show BWR and boost enabled, then hotplug, DPMS, s2idle, and DRAM bandwidth under the display. A J604 boot with an external display.

Details

The PMC ignores the bandwidth request (BWR) and boost votes of a display pipe while the pipe's enable bits are clear. drivers/pmdomain/apple/pmc.c models those bits as a power domain between the pipe's SYS and FE power states. t8132-j713-j715.dtsi made pmc_dispext0 and pmc_dispext1 the second parent of the FE states; the other boards did not.

The two references go in t8132.dtsi and not in t8132-memory.dtsi, because the legacy-loader adapter includes only the latter and deletes both interfaces.

On the J773g the boot framebuffer now holds ps_dispext0_sys in place of ps_dispext0_fe. The FE state now waits for apple-pmc, which waits for apple-pmp, so a kernel with CONFIG_APPLE_PMP=m would otherwise defer simpledrm. ps_dispext0_fe stays apple,always-on.

If the PMC does not probe, ps_dispext0_fe does not either, and then nothing but the boot framebuffer holds ps_dispext0_sys. On the J773g's 27.2 stub the PMC probes (status in Evidence).

Evidence

Without this change, read only, J773g on kernel 7.3.0-ARCH-m4main-6c83a2a6 (main 6c83a2a64539 plus the display commits of #3874) with a 3840x2160 USB-C display connected: bwr enable: 0x00000000, boost enable: 0x00000001, and both pmc-dispext domains off.

Measured under #2761, J773g, macOS 27.2 (26B123) stub, HDMI at 4K 120 Hz:

before after
bwr enable / boost enable at boot (kernel 7.3.0-ARCH-m4prod1) 0x00 / 0x01 0x18 / 0x07
GPU DRAM bandwidth 51.54 GB/s 100.39 GB/s (102.54 after a new modeset)
CPU, 4 P cores, DRAM bandwidth 45.59 GB/s 97.70 GB/s

macOS 27.2 on the same machine: 93.42 GB/s GPU. The boot row used this device tree change; the bandwidth rows are from a separate, earlier boot.

The commit is the one from #2761 (b76381cc16af), with the context conflict against the CLPC node in t8132.dtsi resolved.

Host tests: t8132 4/4, display-gate 1/1, pmgr 3/3, dcp 103/103. The built J713 and J715 device trees are byte-identical to main's.

Checks ran on main d1ae4f292b93 plus this branch.

…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>
Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners December 3, 2026 01:49
@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Merge readiness at 2fdae383: ready to merge

Check Detail
CI at head ok 7 checks passed
Review ok approved by RyanTheTide
Requested changes ok none
Hardware row at head ok comment at 2fdae383
Conflicts ok none
PR text ok Risk: two-way · M4 (T8132) Macs. J713 and J715 take the same connection from the shared file, and their built device trees are byte-identical to main's. The J604 and the M4 iMacs get it for the first time; the J604's external display DARTs then wait for apple-pmc to probe, as they do on the J713.

Areas: area:bringup
Merge: gh pr merge 4031 --merge (Owners and Core through the bypass: add --admin).

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@github-actions github-actions Bot added the needs-hw-row No hardware row at the PR head (bot) label Dec 3, 2026

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2fdae38. The shared DTS places external FE dependencies after SYS for the newly covered boards. The J773g simple framebuffer keeps its early SYS and PHY dependencies, and both Air DTBs reportedly match base byte for byte. The stock J773g and J604 rows are pending.

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Dec 3, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Hardware validation on J773g (Mac16,10, M4 Mac mini, T8132, os-fw 27.2 / 26B123) at PR head 2fdae383ffa7: PASS (steady-state + pm_test=devices; full committed deep x3 is tracked separately on #4007/#3809/#4164).

Environment

  • Kernel: 7.3.0-j773g-ship1 (main 8ec8740a1e6f + #4007 c77edccad388 + #3809 173d1f2d1b58 + #4031 2fdae383ffa7 + #3882 491e031bb680 + #4164 J773g display-power DTB; merge head 8d6daf8b8c27)
  • Clean default cmdline (user4k=on, no pd_ignore_unused, no mem_sleep_default=)
  • Active display: USB-C DP (card1-DP-3, 48ae00000.dcp) at 3840x2160@60 (connected enabled)

Results

  • apple-pmc debugfs:
    • bwr enable: 0x00000018 (saved 0x00000000) (both dispext0 and dispext1 BWR enabled)
    • boost enable: 0x00000007 (saved 0x00000001)
    • dcs limit: state 0 of 5
  • pm_genpd_summary:
    • pmc-dispext0-interface: on (child dispext0_fe, parent dispext0_sys)
    • pmc-dispext1-interface: on (child dispext1_fe, parent dispext1_sys)
  • DRAM bandwidth under active 4K@60 (card1-DP-3):
    • gpubench-vk --test compute.heavy --param kind=bw --runs 3:
      • depth=1: 87.51 GB/s
      • depth=2: 104.69 GB/s
      • depth=4: 105.23 GB/s
      • depth=64: 105.23 GB/s
    • gpubench-vk --test copy.bw --runs 3: 52.61 GB/s copy (105.2 GB/s aggregate R+W)
    • CLPC reached dcs: rail 0 state 5, soc: rail 1 state 3, update errors: 0.
  • Suspend/resume dry path (pm_test=devices): RC=0 with both 286e00000.dcp (HDMI) and 48ae00000.dcp (DP) bound; 48ae00000.dcp stopped cleanly (dcp_poweroff() done), power-cycled cleanly, and retrained 3840x2160@60 (link: 1) with 0 GPU/DCP faults.
  • Note: Committed deep sleep on J773g is still under diagnosis (tracked on #4007/#3809/#4164, independent of #4031); this receipt covers #4031's exact-head J773g boot, PMC BWR/boost wiring, full DRAM bandwidth under 4K display, and pm_test=devices display retrain.

@DjDeveloperr

DjDeveloperr commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor Author

J773g (Apple M4 Mac mini, Mac16,10, T8132, G16G B0, os-fw 27.2 / 26B123) committed deep x3 row on 7.3.0-j773g-ship1 #3 (Image b46c1c9933d001d8…, DTB 0bf95ef5430f53d8…, boot_id=cd32b8bc-004e-4a1b-b5fa-5d8464b07b4a, default s2idle [deep], pm_test=none): PASS (3/3).

Exact commits / DTB provenance on this boot (single J773g generation):

  • aurora-silicon/linux#4176 @ 40959794ea75b7b3e62fc84954e7237978f6ee37 (PCI: apple: set the T8132 ports up again after a deep sleep — J773g row only; shared T8132 reset table, J713 deep still owed)
  • aurora-silicon/linux#4007 @ c77edccad38852032d62f9d0b2b542c1d3f515f4 (t8132-apcie-port2: keep pcie0 sleep tunable register banks)
  • aurora-silicon/linux#3882 @ 491e031bb6808aa5d1568f71cf16c32cc15cfb22 (merged as 0c4c91bb7cc3)
  • aurora-silicon/linux#4031 @ 2fdae383ffa704b568a2c2302e995807538e7bb4 (merged as 9f672f0d9c85)
  • Correction on aurora-silicon/linux#4164: the booted boot3 DTB (0bf95ef5430f53d8…) was built from the earlier revision that included clkreq-gpios on pci@0,0, NOT 5a30f0960eab (which omitted clkreq-gpios). #4164 has since been updated to 0bc1cc98c029 to include clkreq-gpios on pci@0,0; an exact-head J773g DTB row at #4164 0bc1cc98c029 is queued next.

Verified results:

  • Committed deep sleep (3/3): suspend_stats/success=3, fail=0, last_failed_errno=0, boot_id unchanged across all 3 cycles (RTCWAKE rc=0 x3, apple-sleep: back from sleep, boot object resumes 0 -> 1 -> 2 -> 3, 302600000.gpu stop reported 1; physical sleep completed, 135 of 224 AP pins changed by the sleep, all put back, 0 SError / Call trace / BUG / Oops / WARNING).
  • PCIe & DART recovery (PCI: apple: set the T8132 ports up again after a deep sleep (J773g wake reset) #4176, arm64: dts: apple: t8132-apcie-port2: keep pcie0 sleep tunable register banks #4007): Boot logged pcie-apple 1cb0000000.pcie: T8132 multi-port deep sleep recovery registered. Every wake restored both DARTs and links in order: 490000000.iommu: restored after its host came back -> port 0: link restored after deep sleep; 492000000.iommu: restored after its host came back -> port 2: link restored after deep sleep. LnkSta unchanged pre-sleep = post-wake-1 = post-wake-3 (00:00.0 5GT/s x1, 00:02.0 2.5GT/s x1). Config space readable post-3 wakes (01:00.0 443414e4, 01:00.1 5f7214e4, 02:00.0 168214e4); end0 (tg3) returned 1000 Mbps full duplex after all 3 wakes. DT properties under /soc/pcie@1cb0000000: pci@0,0 has apple,tunable-{port,rc,rc-gen3,rc-gen4}, clkreq-gpios, reset-gpios; pci@2,0 has reset-gpios. (Note: brcmfmac/hci_bcm4377 returned -ENOENT at boot for absent firmware blobs on this rootfs, pre-sleep.)
  • External displays & PMC (arm64: dts: apple: t8132-j773g: wire display-power for deep sleep #4164 earlier rev, arm64: dts: apple: t8132: connect the external display pipes' PMC enables on every M4 Mac #4031): Both external DCPs (286e00000.dcp, 48ae00000.dcp) bound with 0 no apple,display-power warnings, returned RTKit: sleep return: ASC control 0x0, setting RUN across all 3 wakes, and restored card1-DP-3: status=connected enabled=enabled (3840x2160@60). Both pmc-dispext0-interface and pmc-dispext1-interface remained on in pm_genpd_summary after all 3 wakes (resume_early ran 3x, 0 errors).
  • GPU & CLPC (soc: apple: clpc: enable on-time idle sampling on T8132 #3882): aurora-g16 returned in 7653 / 9117 / 3879 us back to limit=S10. Post-wake-3 gpubench-vk passed (compute.light d=4 40.11 us, compute.uber d=4 486.40 us, crc=9963f56c valid=true); /sys/kernel/debug/aurora-g16/stats: health: failed 0 errno 0 degraded 0, jobs 43565 recoveries 0 hang_kills 0, sensor_errors 0; 0 CLPC errors in dmesg.
  • Type-C VDM routes: m5 (1-0a 0x731d3115) and neo (1-0c 0x73213102) both active post-wake-3.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Local checks on the merge of 2fdae383ffa7 with main fcbb40063c54 (still merges cleanly on 0c4c91bb7cc3, which adds only #3882):

  • The six T8132 device trees build W=1 with the same 70 warnings as main.
  • Compared with main, phandle numbering aside: J713 and J715 are byte-identical. J604, J623, J624 and J773g change only power-domains of the two external FE states (second parent interface-dispext0/1); J773g also its boot framebuffer (FE to SYS).
  • run-host-tests.py: t8132 5/5, pmgr 3/3, display-gate 1/1. checkpatch.pl --strict: 0/0/0.

Rows: J773g at this head (PMC enables, bandwidth under 4K, three deep sleeps; run together with #4164 and #4007). J713 and J715 need none. No row on J604, J623 and J624: the iMacs have no external DCP enabled in the DT; the J604 does, and its ProRes run in #3420 used the PMC, so the new parent has a driver there. A J604 boot with an external display is still owed.

@DjDeveloperr
DjDeveloperr merged commit 9f672f0 into main Dec 3, 2026
11 checks passed
@DjDeveloperr
DjDeveloperr deleted the fix/t8132-dispext-pmc-enables branch December 3, 2026 10:29
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) blast:m4 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) ready-to-merge Meets the merge policy: merge it (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants