Skip to content

drm/apple: dcp: J773g 27.2 dcpext: DPTX endpoints from the firmware's advertisement (stacked on #2541, #2526) - #2634

Merged
RyanTheTide merged 2 commits into
mainfrom
djdev/j773g-272-dcpext0-dptx-advertised
Dec 1, 2026
Merged

RyanTheTide merged 2 commits into
mainfrom
djdev/j773g-272-dcpext0-dptx-advertised

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #2541 (J773g dcpext0 on the 27.2 v27 backend) and #2526 (firmware-27 dcpext: DPTX endpoints from what the firmware advertises). The last commit is this change; the six before it are #2526's, cherry-picked unchanged except for context.

Problem. On the Mac mini (J773g) on macOS 27.2, dcpext0 boots on the firmware-27 backend, but dptxep_init() opens firmware 27's default DPTX_ENDPOINT_V2 (0x2c). Nothing is announced there:

  • DPTX transport ready but port 0 service not announced (-110);
  • then dptx service for port 0 not enabled on every connect, and the firmware exports no mode.

What the firmware does. The 27.2 image serves AppleDCPDPTXController (dcpav-/dcpdp-controller-epic, units 0 and 1) on DPTX_CONTROLLER_ENDPOINT (0x24) and AppleDCPDPTXRemotePort (units 0 and 1) on DPTX_ENDPOINT (0x2a). macOS 27.2 opens the same services on the mini's dispext0. That is the layout #2526's dcp_v27_dptx_layout() selects for a firmware-27 dcpext whose firmware advertises both endpoints.

Why #2526 alone doesn't reach the J773g. The selector, the class-less announce and the late port announce all key on dcp->dcpext, which comes from the apple,dcpext compatible. The T8132 dcpext nodes have no such fallback, on purpose:

  • on the M4 firmware they are adopted outside the DRM device (dcp_platform_probe_t8132_ext());
  • with the generic compatible, a kernel without CONFIG_DRM_APPLE_DCP_T8132 would bind them as a plain dcpext.

Change. Where a T8132 dcpext is admitted on firmware 27 (apple_t8132_dcpext_v27_2(): processor and image, no board check since #2541's 2451da0) and becomes an ordinary pipe, set dcp->dcpext. The hardware data names no endpoint: where the DPTX services are comes from the firmware's advertisement. This replaces our interim 3efea66 (hvtrace/m4drv8-dcp2596), which pinned .dptx_endpoint = DPTX_ENDPOINT and .dptx_controller in the T8132 hardware data.

Testing.

Once #2526 merges, this commit folds into #2541 and this PR closes.

Not yet

  • M4 mini J773g: confirm dcpext routing and output on 27.2 at the head. Run the shared DCP path on a compatible second Mac.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Reviewed the last commit (6f2f4d8). Setting dcp->dcpext late in dcp_platform_probe_pipe() is safe. Every reader (dcp.c:4632, afk.c:1748, dptxep.c:1664) runs after probe, and it leaves dcp->external, which still means the T6030-style external, untouched.

One scope point: t8132-dcpext.dtsi is included from t8132.dtsi, and apple_t8132_dcpext_v27_2() admits by processor and image with no board check. So this also turns every M4 MacBook Air dcpext on 27.2 (J713/J715) into a dcpext pipe with an advertisement-chosen DPTX layout, not only the mini's HDMI one. That is the intended reach, but the evidence so far is the mini's pinned-endpoint run. Once the mini row is in, it would help to say in the description whether an Air's USB-C DP alt-mode path on 27.2 has run with it. If not, list it as untested.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Rebased cleanly onto updated #2541 (7b141a4b1, 8/8 CI green, picking up t6041-v27-admission helper fix) and #2526 (67f853fb4, clean attribution) at 1b2dfa67fb8d, and stripped the Co-Authored-By trailer from the top commit:

  • CI failure root cause (host-tests / apple-dcp): t6041-v27-admission failed on the older #2541 base prior to 7b141a4b1.
  • Local verification on 1b2dfa67fb8d:
    • scripts/checkpatch.pl --strict -g HEAD: 0 errors, 0 warnings.
    • tools/testing/selftests/drivers/gpu/apple-dcp/run.py (CC=gcc): 92/92 passed (including t6041-v27-admission).
    • tools/asahi/dcp-v27-dptx-layout-tests.py (288 cases) and tools/asahi/t8132-display-gate-tests.py: PASS.

Keeping as draft pending the J773g hardware row (and Air USB-C DP alt-mode 27.2 scope note once the row lands).

Assisted-by: LLM (Gemini:4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-checked at 1b2dfa6. Compared with 6f2f4d8, the only change in this PR's own commit is the dropped trailer. The code is identical, so the earlier read still holds (dcp.c:7380-7391).

The one open item from last time is still open: the description should say whether an M4 Air's USB-C DP alt-mode output on 27.2 (J713/J715 reach this same apple,t8132-dcpext + firmware-27 branch) has run with it, or list it as untested. That can wait for the row, as you said. Nothing else from me.

Assisted-by: LLM (Claude:Opus 5.5)

On the Mac mini (J773g) on macOS 27.2, dcpext0 booted on the firmware-27
backend, but dptxep_init() opened firmware 27's default DPTX_ENDPOINT_V2
(0x2c), where nothing is announced: "DPTX transport ready but port 0
service not announced" (-110), then "dptx service for port 0 not
enabled" on every connect, and no modes. Its 27.2 image serves
AppleDCPDPTXController (dcpav- and dcpdp-controller-epic, units 0 and 1)
on DPTX_CONTROLLER_ENDPOINT (0x24) and AppleDCPDPTXRemotePort
(dcpdptx-port-epic, units 0 and 1) on DPTX_ENDPOINT (0x2a), the services
macOS 27.2 opens on the mini's dispext0, and the layout
dcp_v27_dptx_layout() selects for a firmware-27 dcpext whose firmware
advertises both endpoints.

That selection, the class-less announce and the late port announce key
on dcp->dcpext, which comes from the "apple,dcpext" compatible. The T8132
dcpext nodes have none: on the M4 firmware they are adopted outside the
DRM device (dcp_platform_probe_t8132_ext()), and with the generic
compatible, a kernel without CONFIG_DRM_APPLE_DCP_T8132 would bind them
as a plain dcpext. So where a T8132 dcpext is admitted on firmware 27 and
becomes an ordinary pipe, set dcp->dcpext. No endpoint is named in its
hardware data.

Signed-off-by: Diljit Singh <[email protected]>
@DjDeveloperr
DjDeveloperr force-pushed the djdev/j773g-272-dcpext0-dptx-advertised branch from 1b2dfa6 to 692abd4 Compare November 22, 2026 04:39
@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-read at 692abd4 (rebased on #2541's new head). The PR's own commit now marks a firmware-27 apple,t8132-dcpext as an external processor (dcp->dcpext = true), so the advertised-endpoint selection that landed with #2526 (dcp_v27_dptx_layout()) picks controller and ports, instead of a T8132 special case. That is the cleaner shape. Same open item as before: say whether an M4 Air's USB-C DP alt-mode on 27.2 has run through this branch, or list it as untested.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr
DjDeveloperr marked this pull request as ready for review November 30, 2026 20:45
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 30, 2026 20:45
@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) area:display Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) merge-conflict Conflicts with the base branch (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Merge readiness at d4031dbd: not ready yet

Check Detail
CI at head no failing: kunit, apple-build, host-tests, pr-text / pr-text, KUnit ane-boot, KUnit ane-pm
Review ok approved by RyanTheTide
Requested changes ok none
Hardware row at head ok comment at d4031dbd
Conflicts ok none
PR text adopt when you next edit add a 'Tested:' line; a 'Risk:' line (door and Macs) (guide)

Areas: area:display

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

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: REQUEST CHANGES at 692abd44

Blockers:

  1. Branch is CONFLICTING with main. This 19-file branch (+1411/-33, stacked on #2541 and #2526) conflicts with current main. Rebase onto current main (dropping any commits already merged), verify full CI green, and post an exact-head J773g (27.2 dcpext0) + regression hardware row.

Checked:

  • Commit series (0b2f60be..692abd44), CONFLICTING against main.
Evidence
  • Rebase onto current main so only unmerged changes remain and CI/hardware checks apply to the live head.

Resolve dcp_platform_probe_pipe(): keep the T8132 dcpext firmware 27 external flag from this branch and main's internal T8132 firmware 27 table after it. The stacked parents are on main, so the remaining diff is the dcpext flag.

Signed-off-by: DjDeveloperr <[email protected]>

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The forward merge leaves a one-file change that selects the external pipe only for the matching T8132 external compatible on firmware 27. Main’s internal profile remains separate. Current CI and the affected J773g external-port result are still due.

@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 the conflict-pass merge commit d4031db only: dcp.c t8132-dcpext block sets dcp->dcpext=true next to main's code. The resolution keeps what each side had and adds nothing outside the conflict. Approved for the merge-up; merging still waits on CI and the rows at this head.

@github-actions github-actions Bot removed area:bringup Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) labels Dec 1, 2026
@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) and removed area:platform Area from CODEOWNERS (bot) merge-conflict Conflicts with the base branch (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 1, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

NOT REACHED on our mini (no regression): J773g at d4031dbd72f02e530dd028da5530d191d503929e. The display gate turns DCP off before this PR's DPTX code can run.

  • What ran: this exact head. The source tree was checked equal to the head's tree, and the kernel was built with main's J773g config and its own DTB. One boot on the default command line (graphical target), on the macOS 27.2 stub and Stage 2 boot loader 1.0.0b14-g8b3ba98e.
  • What happened:
    • The kernel logged apple-t8132-display: /soc/dcp@286e00000: the firmware roots of /soc/iommu@286340000 and /soc/iommu@286300000 are not kept, HDMI left off, then no HDMI chain and no internal display: /soc/display-subsystem disabled, boot framebuffer kept.
    • No DCP device binds and there's no HDMI-A connector, so neither dcp_v27_dptx_layout() nor this commit's dcp->dcpext path is reached.
    • These are the same lines main dbfbced7 logs on this Mac.
  • What that means: this row can't confirm the PR's "Not yet" item (dcpext routing and output on 27.2 at the head). That needs a boot loader that keeps the DCP DART roots on J773g, as the PR's own testing setup had.
  • No regression:
    • The boot framebuffer works as on main: connected and enabled, CRTC active at 640x1136, display manager up.
    • No -110 or "not announced" lines, and no DCP or DART errors.
    • No new error lines compared with main, no WARN/BUG/SError, and 0 failed units.
    • The GPU smoke CRC matches (b022fbaf).
  • Afterwards: the Mac went back to the saved stock kernel and passed the stock checks.

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

Copy link
Copy Markdown
Contributor Author

NOT REACHED on our mini (no regression): J773g at d4031dbd72f02e530dd028da5530d191d503929e. The display gate turns DCP off before this PR's DPTX code can run.

  • What ran: this exact head. The source tree was checked equal to the head's tree, and the kernel was built with main's J773g config and its own DTB. One boot on the default command line (graphical target), on the macOS 27.2 stub and Stage 2 boot loader 1.0.0b14-g8b3ba98e.
  • What happened:
    • The kernel logged apple-t8132-display: /soc/dcp@286e00000: the firmware roots of /soc/iommu@286340000 and /soc/iommu@286300000 are not kept, HDMI left off, then no HDMI chain and no internal display: /soc/display-subsystem disabled, boot framebuffer kept.
    • No DCP device binds and there's no HDMI-A connector, so neither dcp_v27_dptx_layout() nor this commit's dcp->dcpext path is reached.
    • These are the same lines main dbfbced7 logs on this Mac.
  • What that means: this row can't confirm the PR's "Not yet" item (dcpext routing and output on 27.2 at the head). That needs a boot loader that keeps the DCP DART roots on J773g, as the PR's own testing setup had.
  • No regression:
    • The boot framebuffer works as on main: connected and enabled, CRTC active at 640x1136, display manager up.
    • No -110 or "not announced" lines, and no DCP or DART errors.
    • No new error lines compared with main, no WARN/BUG/SError, and 0 failed units.
    • The GPU smoke CRC matches (b022fbaf).
  • Afterwards: the Mac went back to the saved stock kernel and passed the stock checks.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at d4031dbd72f0

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: Code reviewed in the earlier App review at this head (6122660587).

Follow-ups (not blocking): current CI, J773g external-port row

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging at d4031dbd72f0 (B2 merge train, 12-01 merge bar). Approval at this head: RyanTheTide,aurora-silicon-review[bot]. Row: J773g comment at d4031db. CI: linux train L1 = main 595e754 + #3503 #3499 #3240 #3208 #3696 #731 #2634 #2110 #3325 #3441 #3650 (candidate ef98b31c): Apple driver compile (defconfig + asahi.config, LLVM=1, Rust) pass, Apple DTBs W=1 pass, planned KUnit clpc/dcp-fabric/dcp-topology/dcp-display/pmgr-pwrstate/mt7932/asahi all pass; host-tests green (or path-skipped) at this head. The rest of the hosted run is queued behind the ~19 h backlog. Revert: git revert -m 1 <merge commit>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:display Area from CODEOWNERS (bot) ci-failing A check failed at the PR head (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