Skip to content

drm: apple: add J773g HDMI display support - #1192

Open
techmore wants to merge 6 commits into
aurora-silicon:integration/aurorafrom
techmore:j773g/hdmi-display-20261107
Open

techmore wants to merge 6 commits into
aurora-silicon:integration/aurorafrom
techmore:j773g/hdmi-display-20261107

Conversation

@techmore

@techmore techmore commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

HDMI output on the M4 Mac mini (J773g). On this machine the main DCP drives the HDMI port through the T8122 DPTX PHY and a DP-to-HDMI converter, and iBoot hands the display over already running.

Six commits:

  1. iommu: apple-dart: adopt the T8132 main external display handoff.
  2. drm: apple: dcp: adopt a T8132 main DCP whose output is an external connector, with a J773g profile that has no panel timing.
  3. phy: apple: dptx: add the T8122 PHY next to the T6050 variant. Runtime PM is enabled for T8122 only.
  4. dt-bindings: display: apple,display-subsystem: allow dma-noncoherent, which the shared T8132 node has always carried.
  5. arm64: dts: apple: t8132-j773g: enable the DPTX PHY, the DCP and the HDMI connector; on this board the display-subsystem node is described at the root.
  6. arm64: dts: apple: t8132-j773g: complete the HDMI display description (the ps_dptx_phy domain, kept on; the DCP's cells; the disp0_piodma alias).

The PHY commit is Niklas Sheth's: it carries his Signed-off-by and a Link: to his commit, then a note of the changes made here. The earlier PHY commit by another author (7e92f4929531), whose sign-off was asked for in review, is no longer in the series.

The DCP, DRM and DART changes key on apple,t8132-dcp with apple,connector-type = "HDMI-A".

Testing

Every commit builds with the J773g config (CONFIG_DRM_APPLE_DCP_T8132=y) and W=1 for drivers/phy/apple/dptx.o, drivers/iommu/apple-dart.o, drivers/gpu/drm/apple/ and the t8132 and t8122 device trees. dptx.o also builds with arm64 defconfig plus ARCH_APPLE and PHY_APPLE_DPTX. The tip builds Image, device trees and modules. dt_binding_check passes for apple,dptx-phy.yaml. The apple-dcp host tests pass in CI. CHECK_DTBS was not run: dt-validate crashes on apple,tunable in this tree.

Hardware: DjDeveloperr runs this PR with #2166 and #2296 on top as the default boot of a J773g on a 26.6.2 stub (his comments of 2026-11-19): KWin drives HDMI at 1920x1080@120, and with the ps_dptx_phy change the display is restored on 3 of 3 resumes. Not booted by me at this head: my J773g is on a 27.2 stub, whose DCP firmware needs further changes that are not in this PR. J713 and the other DPTX PHY users were not tested.

Dependencies

None.

Suspend-to-idle (2026-11-19)

ps_dptx_phy is now apple,always-on on the J773g, folded into "arm64: dts: apple: t8132-j773g: complete the HDMI display description" as DjDeveloperr asked. genpd powered the domain off over a sleep, the PHY keeps no state, and the modeset replayed on resume failed (DPTXPort: firmware reports link fault 22 on target 0:4, then -67).

  • Tested by DjDeveloperr on a J773g (26.6.2 stub) on top of this PR: display restored on 3 of 3 resumes.
  • Not tested on my unit (27.2 stub). This head was not booted by me; the change is DTS only, the J773g DTB builds, dtbs_check was not run.
  • The domain has a consumer (the DPTX PHY node, runtime PM enabled), which is why genpd switches it. Always-on is a description-level fix until the PHY driver can restore its state on resume. No other T8132 board uses this PHY.

Related, on top of this PR: #2296 (cursor plane; also the frame not shown: -16 drops) and #2166 (EDID).

dt-checks (2026-11-19)

The dt-checks job reported three new warnings for t8132-j773g.dtb on the previous head. Two are fixed; one is not, so the job will still fail on this push.

Warning Cause Done
display-subsystem: Unevaluated properties … ('dma-noncoherent' was unexpected) The shared t8132-dcp.dtsi node has always carried the property and the binding never listed it. It shows now because this board is the first to enable the node in its device tree. dma-noncoherent: true in apple,display-subsystem.yaml, as its own commit.
soc (simple-bus): display-subsystem: 'ranges' is a required property A node without reg cannot be a child of a simple-bus once enabled. On this board the node is described at the root, as T8122, T6030, T6031 and T8142 (J704/J813) do; the disp0 alias follows the label. The shared tree is not changed.
aliases: 'disp0_piodma' does not match any of the regexes dtschema's own aliases.yaml forbids the underscore. Not fixed. The loader's T8132 frontend path (dt_set_j713_display_maps(), aura src/kboot.c:7859, :7916) resolves only disp0_piodma, so renaming the alias here breaks the handoff, and a second alias does not remove the warning. t8132-j713.dtb has the same warning in the base. Removing it needs the loader to accept disp0-piodma on that path first, then the kernel lookups, then this dts.

The node move reverses 76b6d84 for the J773g only. Kernel and loader find the node by the disp0 alias and by compatible, never by path. The platform device becomes display-subsystem (was soc:display-subsystem), which changes sysfs and /dev/dri/by-path.

Booted once on a J773g (27.2 stub, 1080p) with the same device-tree content on our 27.2 display test tree, not this PR's head or its DTB: disp0 = /display-subsystem, SID0/SID16 admitted, card1-HDMI-A-1 connected, kernel display lines identical to the /soc run apart from the device name. Nobody watched the monitor. DjDeveloperr's 26.6.2 setup (this PR + #2166 + #2296, G16) has not run the move.

Validated with dtschema 2025.2 (dt-validate on the built DTBs): the J773g DTB has one new line against the base, the alias warning. The binding change was checked on the Apple DTBs with an enabled display-subsystem node, built at this head: none gains a line. scripts/dtc/apple-dt-check.sh itself and make dt_binding_check were not run; only dt-doc-validate on the binding. checkpatch --strict is clean on the three new or amended commits.

@techmore

techmore commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Per Documentation/process/coding-assistants.rst, this draft branch deliberately carries no Signed-off-by added by an AI agent. After reviewing the final commits, the human submitter will run agents/sean-signoff.sh himself to add his own DCO certification and push the human-signed commits before the PR leaves draft.

@techmore
techmore force-pushed the j773g/hdmi-display-20261107 branch 2 times, most recently from 04e1d87 to 396679f Compare November 8, 2026 10:31
@techmore
techmore marked this pull request as ready for review November 8, 2026 10:31
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-19T13:20:02.022830Z
We couldn’t complete this review. Comment @codex review to try again.
d480ca7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@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.

Commit 7e92f49 is authored by Pavel Shago but carries only the submitter's Signed-off-by. It needs a Signed-off-by from its author as well (DCO, Documentation/process/submitting-patches.rst).

@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.

Besides the Signed-off-by from its author still needed on 7e92f49:

  1. This no longer merges into integration/aurora. drivers/phy/apple/dptx.c conflicts with c0e42a1 ("phy: apple: dptx: Add the T6050 variant", from #940, merged as 328654f). Please rebase and keep both the T6050 and T8122 variants.

  2. The description lists the exact head as not booted. After the rebase, please add the J773g result for that head (HDMI connector and modes, desktop, cold and warm boot). iomfb_m4.c, dcp.c and apple-dart.c are shared with J713, so please also add a J713 internal and external display check.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

@techmore could you rebase this onto current integration/aurora? It conflicts in drivers/phy/apple/dptx.c with the T6050 variant from #940. Please keep both the T6050 and T8122 variants.

Two other things are needed before we can merge:

  • DCO: 7e92f49 is authored by Pavel Shago and still needs his Signed-off-by alongside yours.
  • CI: it needs to run green on the rebased head.

We've changed how we handle hardware checks, so we no longer hold contributor PRs for them. Once the branch is rebased, signed off, green and approved, we'll merge it and run the shared-path J713 display check afterwards, with a revert ready. A note of the J773g boot on the rebased head (connector and modes, desktop) would still help if you have it. I'm reviewing the content now so it can go in as soon as the rebase lands.

@DjDeveloperr DjDeveloperr 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.

Content review against current integration/aurora, so this can merge as soon as it is rebased. It is otherwise well scoped. The new DCP, DRM and DART branches key on apple,t8132-dcp plus apple,connector-type = "HDMI-A", so other machines' display paths are unchanged, apart from items 2 and 3.

Required, besides the rebase (keep both the T6050 and T8122 variants in dptx.c) and Pavel's Signed-off-by on 7e92f49:

  1. Build break. t8132_ext_drm.c calls dcp_t8132_main_external() but includes neither dcp.h nor any header declaring it, so CONFIG_DRM_APPLE_DCP_T8132=y doesn't build. Add #include "dcp.h".
  2. NULL dcp_m4_pf. In iomfb_m4_init(), J773g has no M4 profile. (!pf && !external) now lets a NULL pf through, so dcp_m4_pf is NULL at the first D590 callback or swap. It also starts admitting dcpext on M4 machines without a profile. Please keep the !pf refusal and add a J773g profile without panel timing.
  3. Runtime PM on every variant. In dptx.c, devm_pm_runtime_enable() without pm_runtime_set_active() makes every DPTX PHY read as runtime-suspended. The T8112/T6020 fixed-HDMI paths never call phy_power_on(), so once appledrm evicts simpledrm, genpd can gate the PHY domain on those desktops. After the rebase this would also cover T6050. Please enable runtime PM for DPTX_PHY_T8122 only.
  4. Empty DRM device. In apple_drv.c, when t8132_ext_drm_init() registers no output (for example on unqualified firmware), the driver still registers a DRM device and evicts simpledrm, which leaves a black screen. Please return -ENODEV in that case.
  5. reg-names requirement. Making reg-names required in apple,dptx-phy.yaml invalidates the existing dptx_phy node in t8122-peripherals.dtsi, which has no reg-names and lists dptx before core. Please fix that node in the same commit, or drop the requirement.
  6. AUX calibration. The T8122 activation reads the AUX calibration result back, then writes a fixed code. The set32(..., 0) writes do nothing. Please compute the code from the readback, as t6050_impedance_calibration() does, and drop the no-op writes.
  7. PMP-report commits. Nothing in the series uses the two PMP-report commits, and their event-config window overlaps the DCP's disp-4 range. Please split them into their own PR.
  8. PR description. Please drop the reference to the private notes path and the provenance note, and update the outdated sign-off text.

Optional:

  • Make a DPTX connect failure after adoption non-fatal. Currently probe fails after the session is pinned.
  • Drop the unreachable M4 shutdown hunk in dcp.c.
  • Drop the &framebuffer0 override, which now equals the default.
  • Say in the commit message why J773g doesn't use the j713 admission parameters.
  • Note that with both dcpext outputs adopted, the HDMI output is silently skipped (T8132_EXT_MAX).

Hardware checks won't hold the merge. We'll run the shared-path J713 display check after merge, with a revert ready.

@techmore
techmore force-pushed the j773g/hdmi-display-20261107 branch 2 times, most recently from bdd8b67 to 3638318 Compare November 13, 2026 20:28
@techmore

Copy link
Copy Markdown
Contributor Author

Rebased onto current integration/aurora; new head 36383187409a. The series is now four commits.

  1. t8132_ext_drm.c includes dcp.h.
  2. iomfb_m4_init() keeps the !pf refusal. J773g has its own M4 profile with no panel timing; its ABI fields are the J713 values, which is what the earlier J773g runs used.
  3. Runtime PM is enabled for DPTX_PHY_T8122 only.
  4. apple_drm_init_dcp() returns -ENODEV when t8132_ext_drm_init() registers no output. That is before the aperture is released and before drm_dev_register().
  5. The reg-names requirement is dropped, and with it the binding commit, which had nothing else left that matched its subject.
  6. The T8122 AUX calibration waits 125 us, checks completion, and copies the code from 0x4210 into 0x4228 with a field update, as t6050_impedance_calibration() does. The two no-op writes are gone. A calibration that does not complete now fails activation with -ETIMEDOUT.
  7. The two PMP-report commits are out of this series.
  8. The description is rewritten.

Optional items: a DPTX connect failure after adoption is now a warning; the unreachable M4 hunk in dcp_platform_shutdown() and the &framebuffer0 override are dropped.

The PHY commit's author is Niklas Sheth. It carries his Signed-off-by and a Link: to his commit, followed by a note of my changes and my Signed-off-by.

Checked before pushing, at every commit, with the J773g config (CONFIG_DRM_APPLE_DCP_T8132=y) and W=1: drivers/phy/apple/dptx.o, drivers/iommu/apple-dart.o, drivers/gpu/drm/apple/, and the t8132 and t8122 device trees all build; dt_binding_check passes for apple,dptx-phy.yaml. dptx.o also builds with arm64 defconfig plus ARCH_APPLE and PHY_APPLE_DPTX. CHECK_DTBS was not run: dt-validate crashes on apple,tunable in this tree.

This head has not been run on the J773g. Item 6 changes register writes there, so I will test it and add the connector, modes and desktop result here.

@techmore

Copy link
Copy Markdown
Contributor Author

Hardware test, Mac mini M4 (J773g), 2026-11-14: at this PR's exact head 36383187409a the HDMI output was not adopted.

Kernel: aurora-silicon/linux integration/aurora 5d112b1d5493 plus the exact heads of #1192 36383187, #1718 5fbbff26, #1191 (first five commits) 3fa83613, #1865 9c71c29f, #1702 0430675d, #1703 9b0ca002 and #1872 2eb84498, merged without conflicts (release 7.3.0-prheads+, native arm64 build with GCC 15.2.0, 0 warnings). One boot on a Mac mini M4 (J773g, T8132) with a Fedora 44 userspace. The device tree came from the boot chain, not from this tree, so DT-only changes were not exercised.

The display driver did not take over the HDMI output. The kernel log shows:

[    0.075085] apple-dart 30a340000.iommu: error -EBUSY: DCP inherited SID23 leaf[0][1] targets Linux RAM: 000fff103e530001
[   16.465715] apple-dcp 30ae00000.dcp: error -ENODEV: inherited SID23 domain not qualified
[   16.467788] apple-drm soc:display-subsystem: [drm] 0 T8132 external output(s): -517

The screen stayed on the firmware framebuffer (simple-framebuffer, 1920x1080); no DRM device from the display driver had a connector.

We are finding the cause and will push a fix together with hardware evidence. Until then I am converting this PR to a draft so it is not merged in this state.

@techmore
techmore marked this pull request as draft November 14, 2026 03:07
@techmore

Copy link
Copy Markdown
Contributor Author

Update to my earlier FAIL note: that result remains valid for the unmodified #1192 DTB. The successful runs below used a source-built DTB containing one additional J773g DTS completion commit; they therefore supersede the earlier result only for the completed DTS.

I have fast-forwarded one commit, 700491843df09e2a8c2182215769025609895d5a, onto this PR. It changes only t8132-j773g.dts:

  • mark ps_dptx_phy okay on J773g, overriding the inherited J713 PMGR-domain policy;
  • add #address-cells = <2> and #size-cells = <2> to dcp, as on the established Apple display DTS nodes;
  • add the disp0_piodma alias required by the existing display handoff lookup.

The four commits already in #1192 are unchanged, including Niklas Sheth's authorship and trailers on the T8122 DPTX PHY commit.

Hardware result

Five consecutive J773g soak boots (S1–S5) reached the graphical login display. In every run:

  • card1-HDMI-A-1 was connected and enabled on apple-drm;
  • the connector advertised 3840x2160 modes;
  • the display handoff admitted inherited SID0 and SID16 mappings and adopted the external DCP;
  • there were zero observed RTKit crash/panic log lines.

S2 also completed an explicit 3840x2160@30 modeset. A further C1 boot passed on the rebased combined tips. Camera frames show the login display for S1–S5 and C1.

Artifact provenance: S1–S5 used kernel Image 9f4d73f7… from composite tree 787d70b2, containing the exact non-DT #1192 head 36383187. The new commit is DTS-only, so the kernel Image code was unchanged. DTB f9e2f3d7… was built from composite source tree 9ed2e7c5, containing #1192 plus this DTS commit and the separate Ethernet-only DTS change. The Ethernet change touches only PCIe nodes. S1–S5 therefore used that composite DTB. In addition, three consecutive boots used an Image (e072b0b75271df4476b7dabdb90e329094b339c1ebf901aabecd9157bfc38c3f) and DTB (de99bb21c4131b453bbb662aa97e9c6f9429c1e3086045dff427a9de1618f04d) built from this commit alone (as the tree-identical pre-sign-off commit be51d0fc, on #1192 head 36383187, without the Ethernet change), through RAM Stage 2 a25d7126414bed97530cd401042c024d2539d1bd7086a4e1c9d7b2b9fb17ca46. In all three, HDMI-A-1 was connected on apple-drm, apple,dcp-os-log was present, and there were zero observed RTKit crash/panic log lines; the first also completed an explicit 3840x2160@30 modeset. The Ethernet port stayed disabled in all three, as expected without the separate Ethernet change. CI should rerun after the fast-forward.

H1 is not included in the pass count: SDDM appeared, but SSH did not answer within 240 seconds and a later restart stuck in Stage 1.

Validation limits

The full dt-validate invocation currently crashes in dt-schema on an existing apple,tunable uint8-array. A warning-delta run with phy/ti,cd2e22.yaml excluded completed; it reports the known underscore-alias warning and otherwise pre-existing warnings. I am not claiming a clean full-schema dtbs_check pass.

Not covered: cold entry, 4K60, HDMI audio, hotplug, Wi-Fi association, Bluetooth traffic, a front USB device, J713, or other boards.

@FatBoy721

Copy link
Copy Markdown

Second J773g PASS for 3638318 + 7004918 (Mac mini M4; kernel = techmore hwtest 787d70b; Stage 2 = aura b8461a80 + 083dbc3f + 79fcfc00 + 7fdadb3e; stock Aurora U-Boot; Stage 1 1.0.0b8, stub 26.6.2). 3/3 boots:

apple-dart 30a340000.iommu: Preserving DCP SID23 root 0x00000103ffeec000 and 2 foreign 32-MiB slots; no writes
apple-dart 30a300000.iommu: Inherited SID0/SID16 frontend admitted; SID0 strict DMA outside 1 foreign and 4 retained slices
apple-dcp 30ae00000.dcp: external DCP adopted
apple-drm soc:display-subsystem: [drm] 1 T8132 external output(s): 0
aurora-g16 302600000.gpu: M4 G16G: 10 cores enabled
aurora-g16 302600000.gpu: G16: firmware at READY, starting the backend
[drm] Initialized aurora 1.0.0 for 302600000.gpu on minor 0

/dev/dri shows card1-HDMI-A-1 and renderD128. An Omarchy/Hyprland desktop runs GPU-accelerated on it; renderer screenshot to follow.

Note: a Stage 2 that lights HDMI itself (the aura boot-hdmi v7 series) leaves SID23 tables outside the ADT pt-region: DCP admission: root[8] … child=1000eb6c000 outside ADT [103ffeec000,103fff1c000). This admission refuses it, so the two can't be combined.

@FatBoy721

Copy link
Copy Markdown

Renderer follow-up for the J773g PASS above, under the Omarchy/Hyprland Wayland session (eglinfo/glxinfo):

EGL vendor string: Mesa Project          (Wayland platform, EGL 1.5)
OpenGL renderer string: Apple M4 (G16G B0)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 26.3.0-devel (git-8f013bf96b)
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 26.3.0-devel (git-8f013bf96b)

That's hardware rendering on the G16G, not llvmpipe.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Tested #1192 (with aura #199 + #258) on the owner's Mac mini J773g (26.6.2 stub, HDMI to a 4K240 monitor whose sink offers 1080p), 2026-11-19, with Linux #1192, as aura-try trials.

The Stage 2 was techmore's boot-HDMI series (fdf65101, the one that trains HDMI on this unit) + #113 + this stack, then two fixes. The full stack is public as aurora-silicon/aura test/j773g-hdmi-kms-20261119, head e553f9dc.

  • The handoff works. The DCP gets its UUID, version and memory regions. disp0 SID0, PIODMA SID16 and the retained framebuffer are published (J773g disp0 SID0: segment 4 + framebuffer [0x105e5300000, +0x854000) published).
  • The kernel then refused the DCP's own DART (SID23) twice. Both causes are aura's, not this PR's:
    1. root[8] ... child outside ADT: the boot modeset's RTKit buffers and IOVAs (DVA 0x10000000+) live under heap L2 tables that aura never freed on a locked DART. Fixed in HID: dockchannel, soc: apple: rtkit: drop the pre-open report warning and quiet oslog #311.
    2. DCP inherited SID23 leaf[0][1] targets Linux RAM: the boot modeset maps the framebuffer in the DCP's DART as well as disp0's. Linking the framebuffer reservation to dcp doesn't work, because the kernel then fails iommu_device_register (every dcp memory-region must be an ADT segment). Fixed instead by unmapping that alias from the DCP DART after the modeset (e553f9dc, on top of the boot-HDMI series).
  • With both fixes, Linux adopts the DCP:
    • external DCP adopted, IOMFB startup complete: 347 callbacks; external;
    • card1-HDMI-A-1 connected with 26 modes (1920x1080 ... 3840x2160);
    • fbcon modeset 1920x1080@120 Hz, 297000 kHz.
  • Still open, on the kernel side (drm: apple: add J773g HDMI display support #1192):

🤖 Generated with Claude Code

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Follow-up from the same Mac mini J773g, 2026-11-19 05:26: with this PR and the aura stack from my earlier comment, HDMI KMS works. KWin trips on one thing, and frames get dropped.

  • Raw atomic client (KWin stopped, dumb XRGB8888 full-screen buffer): TEST_ONLY and commit both succeed at 1920x1080@60 (the preferred mode) and at 1920x1080@120.
  • KWin's EINVAL comes from the plane check. KWin's first commit puts a 32x32 buffer at dst: 32x32+956+536 on plane-0, which looks like its cursor, so drm_atomic_helper_check_plane_state() refuses with "Plane must cover entire CRTC". The T8132 external device has a single, primary plane that can't be positioned. With KWIN_FORCE_SW_CURSOR=1 KWin's modeset goes through: card1-HDMI-A-1 connected enabled, CRTC active at 1920x1080@120, a full-screen AR24 GPU buffer on plane-0, and no KWin errors.
  • Still to look at:
    • dcpext-30ae00000.dcp: frame not shown: -16 keeps appearing (ratelimited) under KWin;
    • there's no EDID (Could not find edid, which drm: apple: t8132: publish the sink's EDID on external outputs #2166 would cover on a newer base);
    • the output only shows up about 11 s after boot, once the DCP re-announces its AV services, by which time KWin may already have started on simpledrm and then lost it ("Primary GPU ... was removed").
  • Ideas:
    • a cursor plane, or letting this plane be positioned the way the DCP's swap allows, would remove the need for the KWin override;
    • registering the connector as connected at adoption (aura's boot modeset is already scanning out) would avoid the late hotplug.

🤖 Generated with Claude Code

@DjDeveloperr

Copy link
Copy Markdown
Contributor

J773g results with this PR, from the M4 mini drivers lane (2026-11-19). This is now the mini's default boot: kernel 7.3.0-ARCH-m4drv8, which is this PR + #2166 + #2296 on the M4 mini GPU stack, with the HDMI DT in the configured boot.bin.

  • Desktop. KWin 6.8 drives HDMI at 1920x1080@120. It renders on the G16 (renderD128) and scans out on this DCP. Plain boots: output on at ~9.3 s, EDID published via drm: apple: t8132: publish the sink's EDID on external outputs #2166, G16 READY ~3.9 s.
  • KWin's EINVAL was the cursor. With only a primary plane, KWin puts its cursor there. drm: apple: t8132: a cursor plane on external outputs (KWin on the M4 mini's HDMI) #2296 adds a cursor plane (upper surface 1), and with it no KWIN_FORCE_SW_CURSOR is needed. drm: apple: t8132: a cursor plane on external outputs (KWin on the M4 mini's HDMI) #2296 also fixes the frame not shown: -16 drops: the SID0 host windows ran out, and the copy fallback refused while direct swaps were in flight.
  • Suspend-to-idle breaks HDMI unless the DPTX PHY domain stays on. On resume, the replayed modeset fails: DPTXPort: firmware reports link fault 22 on target 0:4, then on: 1920x1080@120 Hz failed: -67, link status BAD. genpd powers dptx_phy off over the sleep and the PHY keeps no state. This DT change on top of this PR fixes it, 3 of 3 resume: display restored (two rtcwake, one systemctl suspend, waking by Wake-on-LAN via PCI: apple: wake on a root port's PME (Wake-on-LAN on the M4 Mac mini) #2297):
    &ps_dptx_phy {
    	apple,always-on;
    	status = "okay";
    };
    
    Could you fold it into arm64: dts: apple: t8132-j773g: complete the HDMI display description?
  • Caveat for older kernels. With the DCP enabled in the DT, a kernel without this PR still boots on simpledrm. But its G16 waits forever in asahi_g16_display_prepare() (-EPROBE_DEFER, the native display never registers), so it has no GPU.

@techmore
techmore force-pushed the j773g/hdmi-display-20261107 branch from 7004918 to d480ca7 Compare November 19, 2026 12:52
@techmore
techmore marked this pull request as ready for review November 19, 2026 13:19
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@techmore
techmore force-pushed the j773g/hdmi-display-20261107 branch from d480ca7 to b8880d5 Compare November 19, 2026 15:24
@techmore

Copy link
Copy Markdown
Contributor Author

dt-checks on the new head will still report one new warning: t8132-j773g.dtb: aliases: 'disp0_piodma'. The other two are fixed (details in the description). The alias cannot be renamed in this PR: the loader's T8132 frontend path resolves only disp0_piodma, and t8132-j713.dtb carries the same warning in the base.

Which do you prefer: accept it here as on the J713, or I first add disp0-piodma to the loader (aura #199) and the kernel lookups and then rename it in this dts?

One of the two fixes moves the J773g's display-subsystem node to the root, which reverses 76b6d84 for this board only. It has run on my 27.2 unit but not on a 26.6.2 setup. If the node should stay under /soc, say so and I will put it back; the ranges warning then stays.

techmore and others added 6 commits November 19, 2026 12:20
A T8132 main DCP wired to fixed HDMI uses six firmware segments and shares
the retained SID 0/SID 16 frontend contract with the external display path.
Qualify that layout from the available main DCP and its connector role.
Validate its physical framebuffer separately from inherited mappings and
preserve both frontend streams without a board-name gate.

Assisted-by: LLM checkpatch
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
Some T8132 desktops route the main DCP through a fixed DPTX-to-HDMI path
instead of an internal panel. Use the connector-type property as that role
contract, prepare the PHY and converter rails, adopt the retained firmware
session, and register it through the external-output KMS path. Accept the
retained physical framebuffer without manual bind controls or machine-name
checks.

Use a J773g M4 profile without panel timing and continue to refuse machines
without a profile. J773g does not use the J713 panel admission parameters
because the external path skips apple_pmp_j713_display_prepare() and has no
internal panel timing or panel power admission.

Keep an empty external device from replacing simpledrm, and retain an
adopted session when its initial HDMI DPTX connect fails. The external KMS
layer still caps the device at two outputs, so two adopted dcpext outputs
leave the fixed HDMI output unregistered.

Assisted-by: LLM checkpatch
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
T8122 (as used on T8132) needs its own cold activation: the T8112 core
power steps, moved enable/clear bits (0x2218, 0x2234), a different
0x2230 setting, no 0x4008/0x420c/0x4404/0x4408/0x4600 steps, and an AUX
impedance calibration whose result is copied into 0x4228. At link-rate
change it clears 0x222c bit 1 instead of 0x2220 bit 7, takes the T6020
settings for 0x20b0, the first 0x20b4 write and 0x20b8 bit 16, then
clears 0x20b4 bit 1 and skips the 0x20b8 bit 21 clear.

For T8122 only, enable runtime PM before creating the PHY so the generic
PHY core propagates runtime-PM references to the provider. The T8112,
T6020 and T6050 paths are unchanged.

Link: GravityLinux/linux@877c574
Assisted-By: OpenAI Codex (GPT-5.6 Sol)
Signed-off-by: Niklas Sheth <hi@niklassheth.com>
[Sean: extracted the T8122 hunk; rebased over T6050; runtime PM for T8122 only; calibration code from the readback]
Assisted-by: LLM checkpatch
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
The T8132 display subsystem node has carried dma-noncoherent since it was
added, and the binding does not list it. dtbs_check did not notice: the
node is disabled in the shared tree and enabled by the boot loader on the
boards with a panel. A board that enables it in its device tree gets

  display-subsystem: Unevaluated properties are not allowed
  ('dma-noncoherent' was unexpected)

Allow the property.

Assisted-by: LLM
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
The Mac mini routes its main DCP through the T8122 DPTX PHY and an HDMI
converter controlled by two SMC GPIOs. Describe that fixed path and enable
the retained DCP, mailbox, and display DART nodes. Do not attach the DCP or
mailbox to DISP_CPU: iBoot leaves that domain in auto mode and direct PMGR
writes fault on this machine.

The display subsystem node has no registers and is enabled here, so it
is described at the root rather than under the simple-bus (dtbs_check:
"soc: display-subsystem: 'ranges' is a required property"); the disp0
alias follows its label.

Assisted-by: LLM checkpatch
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
With only the HDMI path described, the Mac mini still has no display:

- The DPTX PHY sits on ps_dptx_phy, which the J713 PMGR policy (applied
  to every M4 board that does not state the domain) keeps from Linux.
  phy-apple-dptx and the DCP behind it wait for it until the deferred
  probe timeout (-110). State the domain for this board, as it already
  does for the ATC2 and ATC3 domains.
- The DCP's PIODMA child owns iommu-addresses entries in
  /reserved-memory, so the DCP node needs #address-cells and
  #size-cells; the display DART's admission otherwise warns that both
  are missing.
- The loader and the display DART look the PIODMA stream up by the
  disp0_piodma alias, as on T8122; add it.
- genpd powers ps_dptx_phy off over a suspend-to-idle and the PHY keeps
  no state, so the modeset replayed on resume fails ("DPTXPort: firmware
  reports link fault 22 on target 0:4", then -67). Mark the domain
  apple,always-on. Found and tested by Diljit Singh on a J773g (macOS
  26.6.2): the display is restored on 3 of 3 resumes.

Assisted-by: LLM
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
@techmore
techmore force-pushed the j773g/hdmi-display-20261107 branch from b8880d5 to db7d34d Compare November 19, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants