Repository navigation
soc: apple: admit J773g HDMI and rear USB-C DisplayPort scanout - #3874
Conversation
The M4 Air PMGR policy applied by t8132-platform-handoff disables ps_dptx_phy when a board does not declare an explicit status. J773g wires lpdptx_phy (dcpext0) and framebuffer0 to ps_dptx_phy, so disabling it causes phy-apple-dptx to time out on deferred probe (-110), stalling dcpext0 and blocking appledrm and aurora-g16 once dcpext0 is admitted. Keep ps_dptx_phy enabled and always on before admitting T8132 external scanout so lpdptx_phy probes cleanly and Linux never powers the domain off under iBoot's HDMI boot framebuffer (for example during s2idle or nomodeset). Signed-off-by: DjDeveloperr <hey@djdev.me>
Stage 2 leaves a panel-less processor and its DART disabled even after handing its firmware over. The fixed PHY gate can retire the display master before a Type-C processor gets a chance to use it. It also applies a SoC-wide locked-root check to DARTs whose clocked DCP consumer already qualifies them for firmware mirroring. Validate each external chain against the firmware handoff and its DART streams, logging the specific missing or invalid check when a handoff is incomplete. Apply routes, provider availability and the scanout mappings together. Retain the internal DART for an internal display and remove it from an external-only domain. Leave the display off when there is no admitted pipe, and fall back to retiring the display on a panel-less Mac if preparing the handoff changeset fails. Exercise the real OF changesets on UML with panel, HDMI, Type-C and headless topologies, and update the T8132 display gate host test harness to match. Inject driver availability into the existing T8122 fixture so those cases run on UML as well. Signed-off-by: DjDeveloperr <hey@djdev.me>
The 26B123 J773g ADT places the rear ports on ATC0, ATC1 and ATC3. Route dcpext1 (UFP endpoint 2, port 0) to each crossbar and its Type-C connector. Describe the firmware memory slots required by the headless Stage 2 handoff, leaving the processor, its DARTs and all routes disabled until admitted. Keep the pipe under firmware power control while Linux adopts it. The fixed HDMI output remains on dcpext0. Signed-off-by: DjDeveloperr <hey@djdev.me>
981991a to
dfe8253
Compare
|
Updated
Re-verified at |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
satchlj
left a comment
There was a problem hiding this comment.
Verdict: MERGE at dfe82531af2b23ec1ae9fefa1fd0022b4c1930ff
Blockers: none
Checked: no Apple material, no inappropriate model gating, default command-line compatibility, bisect commit order, T8132 unified external display gate (display-gate.c), KUnit & host test coverage, J773g DTS (ps_dptx_phy, dcpext1, atc{0,1,3} DP alt-mode), hosted CI, exact-head J773g hardware receipt, PR text
Evidence
- Commit order & bisect safety:
c97f1be830fbenables&ps_dptx_phywithapple,always-onandstatus = "okay"before50f70b168131rewrites the display gate, so intermediate commits never admitdcpext0/lpdptx_phywithps_dptx_phydisabled and iBoot's boot framebuffer domain is never powered down prematurely. drivers/soc/apple/display-gate.c:gate_t8132_pipe(),gate_t8132_prepare(), andgate_t8132_run()unify fixed-DP (dcpext0) and Type-C (dcpext1) external admission by DT topology without model gating.gate_t8132_v27_display_iommus()fixes replace-vs-append sizing (2 * nr * sizeof(*value),keep_scanout = panel),-E2BIGis checked aftergate_t8132_pipe(), and a panel-less preparation failure falls back cleanly to amodeset=falsedisplay-off changeset sodisplayand its DARTs are retired cleanly.arch/arm64/boot/dts/apple/t8132-j773g.dts(dfe82531af2b): wiresdcpext1_{text,data,heap}, firmware-ownedps_dispext1_{sys,fe},atc{0,1,3}_dpxbar,atcphy{0,1,3}apple,dp-alt-mode, andtypec{0,1,3}port@3endpoints cleanly.- Tests & CI: 8 new T8132 KUnit cases (
t8132-gate-test.dtso+display-gate-test.c) and 20 host tests (t8132-display-gate-tests.py); all 12 hosted CI checks passed (apple-build,dt-checks,host-tests,pr-text,KUnit plan,KUnit dcp-topology asahi);MERGEABLEwith zero conflicts. - Hardware row at exact head
dfe82531af2b(#issuecomment-7337107393): J773g live 4K@60 rear USB-C DP scanout, cleans2idle, cleandeeprefusal (-EBUSY) and recovery, 0 faults.
|
Local CI receipt for the merge with current main (hosted CI override, run on pc). Merge: head Drift since the CI base
The arm64 QEMU KUnit suites were not run, because our build hosts have no QEMU. Hosted |
|
Holding this until there's a hardware row at the exact head. The J773g live run was on |
|
J773g hardware validation PASS on exact head Environment & Build
Results
|
|
J773g re-row hardware validation PASS at exact merge tree Environment & Build
Results (all 5 checks PASS)
|
Summary
Enable external 27.2 DisplayPort and HDMI scanout admission on Apple M4 Mac mini (
t8132-j773g) by:ps_dptx_phyenabled andapple,always-onon J773g before external admission solpdptx_phy(dcpext0) does not defer with-110and Linux never powers the domain off under iBoot's HDMI boot framebuffer (for example durings2idleornomodeset).dcpext0) and Type-C (dcpext1) external chains together before retiringdisp0, removing the locked-root rejection for DARTs whose clocked DCP consumer already qualifies for firmware mirroring, logging specific incomplete-handoff reasons, and falling back to display retirement on panel-less Macs if preparing the changeset fails.atcphy0,atcphy1,atcphy3) todcpext1on J773g.Risk: two-way (touches shared T8132 external display admission affecting J713/J715, J604, J773g, and J623/J624, plus J773g DTS)
Tested: live 4K (
3840x2160@60) rear USB-C DisplayPort scanout (Samsung Odyssey G81SFoncard1-DP-3/48ae00000.dcp) verified ont8132-j773g(7.3.0-ARCH-m4main-6c83a2a6,plasmaloginactive,aurora-g16clean, 0 display/GPU faults); connected-displays2idle(rtcwake -d rtc1 -m freeze -s 10:rc=0,suspend_stats success=1,DP-33840x2160@60+plasmaloginactive pre/post wake) anddeep(rtcwake -d rtc1 -m mem -s 10: cleanly refused with-EBUSYby v27 external DCP guardno firmware stop for a deep sleep: refusing itand cleanly recoveredDP-33840x2160@60+plasmalogin); 20/20 host display-gate tests (Clang ASan/UBSan + GCC), 76/76 UML KUnit (apple-display-gate*), andcheckpatch.pl --strict(0 errors, 0 checks) atdfe82531af2b.Not yet: J773g physical HDMI-only, HDMI+USB-C+
s2idle, and headless no-monitor boots (lab J773g currently has only a rear USB-C DisplayPort 4K monitor attached); J713/J715 27.2 USB-C external display shared-gate control (tracked externally); J773g stock-baselinedeepsleep refusal comparison (queued for next compatible stock slot).Commits (bisect-clean order)
c97f1be830fb—arm64: dts: apple: t8132-j773g: keep ps_dptx_phy enabled50f70b168131—soc: apple: admit T8132 external scanout before retiring disp0dfe82531af2b—arm64: dts: apple: wire J773g rear DisplayPort routes to dcpext1Hardware Verification (
t8132-j773g, Apple M4 Mac mini)7.3.0-ARCH-m4main-6c83a2a6(rebased onto6c83a2a64539with this series applied) and earlier7.3.0-j773g-usbc-dp.Samsung Odyssey G81SF, rear ATC3card1-DP-3) connected, EDID read,3840x2160@60modeset active, Wayland compositor (plasmalogin) live on external display.7.3.0-ARCH-m4main-6c83a2a6withcard1-DP-3live at3840x2160@60:s2idle(rtcwake -d rtc1 -m freeze -s 10):rc=0,suspend_stats/success0 -> 1,card1-DP-3status=connected enabled=enabled dpms=On mode=3840x2160before and after wake,plasmaloginactive,tg3link up 1000 Mbps, 0 display/GPU errors.deep(rtcwake -d rtc1 -m mem -s 10):apple-dcp 48ae00000.dcp: no firmware stop for a deep sleep: refusing it(-EBUSY, intentional v27 external DCP guard indcp.c:11959), abort-resume cleanly restoredcard1-DP-33840x2160@60andplasmaloginactive.aurora-g16GPU probe, cleanS10operation, and GPUBench Vulkan workloads verified alongside live 4K USB-C DisplayPort scanout with zero GPU or display faults.Host, KUnit, and Build Verification (
dfe82531af2b)python3 tools/asahi/t8132-display-gate-tests.py: 20/20 scenarios passed under Clang (-Wall -Wextra -Werror -fsanitize=address,undefined) and GCC (including panel-less error-fallback display retirement)../tools/testing/kunit/kunit.py run ... 'apple-display-gate*'): 76/76 passed (apple-display-gate-t8132: 8/8, plus T6030/T6031/T8122/T6041/T6041-Max regression suites).scripts/checkpatch.pl --strict --git 6c83a2a64539..HEAD: 0 errors, 0 checks.