Skip to content

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

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

techmore wants to merge 4 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

This seven-patch series turns the J773g HDMI proof of concept into a bisectable chain: T8132 PMP report resources, main external-display DART handoff, retained main-DCP external output, the T8122 DPTX PHY, and the fixed J773g DPTX-to-HDMI DT path.

It does not duplicate the topology already merged through #1142 or the generalized M4 handoff on the base. Test-only admission, manual-bind controls, and unrelated changes are absent.

Provenance

The hardware behavior and register effects were observed during our own J773g witness runs and firmware-interface behavior. No Apple source code was copied. Pavel Shago identified retained-display and DPTX sequencing lessons; his authorship is retained on the T8122 PHY commit.

The notes-repo audit aurora/upstream/mesa/PROVENANCE-NOV1-20261107.md supports the same boundary: no constants, encodings, or behavior in this work came from the November 1 G16G firmware disassembly.

Results

  • pass — prior witness tree: three repeated 1080p HDMI desktop boots succeeded; a later witness exposed 37 modes and ran 1080p, with 4K30 as the highest observed mode.
  • pass — per-commit build: every commit tree built on SER8 with arm64 LLVM W=1 Image modules dtbs; no new warnings in touched paths.
  • pass — checkpatch: every commit has 0 errors, 0 warnings, 0 checks with strict --no-signoff.
  • pass — bindings: the new PMP binding and updated DPTX binding checks pass.
  • fail — current dtbs_check: pre-existing conflicting apple,tunable schema types abort decoding of unrelated existing Apple properties before J773g validation. This remains an un-draft gate.
  • not tested — exact PR head: the booted witness tree contained test admission that this series removes.
  • not tested — KUnit and regressions: no KUnit run; J713 regression, hotplug, suspend/resume, and a cold/warm retained-session matrix remain outstanding.

Hardware test plan

Before this leaves draft: boot the exact head on J773g, verify connector/mode state and a displayed desktop, exercise hotplug and suspend/resume, repeat cold and warm boots, and run the available J713 regression coverage. This PR stays draft until those affected-hardware checks and the DT validation gate are recorded.

The commits intentionally have no Signed-off-by yet. The human submitter will add his own DCO sign-off after review, as required by Documentation/process/coding-assistants.rst.

@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

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-08T10:31:58.579814Z
We couldn’t complete this review. Comment @codex review to try again.
396679f 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 from 396679f to bdd8b67 Compare November 13, 2026 20:08
techmore and others added 4 commits November 13, 2026 15:28
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 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.

Assisted-by: LLM checkpatch
Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
@techmore
techmore force-pushed the j773g/hdmi-display-20261107 branch from bdd8b67 to 3638318 Compare November 13, 2026 20:28
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.

4 participants