Skip to content

drm/apple: firmware 27: start the remote allocator only where advertised; let a dcpext come up before its DP port is announced - #2526

Merged
RyanTheTide merged 6 commits into
integration/aurorafrom
satchlj/dcp-fw27-advertised-endpoints
Nov 22, 2026
Merged

RyanTheTide merged 6 commits into
integration/aurorafrom
satchlj/dcp-fw27-advertised-endpoints

Conversation

@satchlj

@satchlj satchlj commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Claude Opus 5.5 on @satchlj's behalf.

drm/apple: on firmware 27, start the remote allocator endpoint only when the firmware advertises it.

Why: firmware 27 lists the RTKit endpoints its application uses. The 27.2 DCP on T8112 (MacBook Air M2, J413) advertises IOMFB (0x37) and no remote allocator (0x2d). Starting the unadvertised endpoint fails, so the internal panel never comes up.

Selection: the firmware's own endpoint advertisement (apple_rtkit_has_endpoint()). Firmware that advertises 0x2d is unchanged. No board or SoC is named.

Testing

  • J413 on the 27.2 stub: a local equivalent keyed on apple,t8112-dcp has been in phellos's default since 2026-11-18. With it, IOMFB startup, firmware-derived EDID, present, brightness and soft DPMS all work (internal panel at 2560x1664@60).
  • This exact change: hardware result to follow from the phellos upstream-default boot. Together with drm/apple: admit the M1/M2/M3 display processors on firmware 27.2 #1832.

T8112 dcpext ports (b7fbee4)

On firmware 27 the T8112 dcpext's DPTX ports are on DPTX_ENDPOINT (0x2a), behind the DPTX controller on 0x24, as on T8142's dcpext; DPTX_ENDPOINT_V2 (0x2c) is silent. Selected by apple,t8112-dcpext with firmware 27. On phellos, without a monitor: controller services on 0x24 and AppleDCPDPTXRemotePort units 0 and 1 on 0x2a are announced at boot, and the internal panel is unaffected. Untested: hotplug and modeset with a monitor. Details in the PR comment of 2026-11-20.

Assisted-by: LLM (Anthropic:Claude Opus 5.5)

@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf.

Hardware result on MacBook Air M2 (J413, T8112), macOS 27.2 (26B123) stub: pass. The change is now part of phellos's default.

Tested in phellos's upstream-first build, and it is now the default (one-shot 3957f65b, then default boots a10e0f07 and bef932e9, 2026-11-20):

🤖 Generated with Claude Code

@satchlj
satchlj marked this pull request as ready for review November 20, 2026 06:16
@satchlj satchlj changed the title drm/apple: start the remote allocator only where firmware 27 advertises it drm/apple: firmware 27: start the remote allocator only where advertised; let a dcpext come up before its DP port is announced Nov 20, 2026
@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf: hardware run.

PR head Checked Result
9a9ae8e0 Firmware-27 DCP and dcpext: "remote allocator not advertised" path on both, internal panel up, both DP connectors present (no external sink attached) Pass

Build: phellos (MacBook Air M2, J413, macOS 27.2 / 26B123 stub), default rebuilt 2026-11-20 = linux integration/aurora 458f759 + #2519 #1832 #1831 #2264 #2525 #2526 #2543 #2544 #2545; Aura main 0beafec9 + aurora-silicon/aura#377 aurora-silicon/aura#227 (isp.c only) aurora-silicon/aura#381 aurora-silicon/aura#382; U-Boot aurora-wip 37baf8f7 + aurora-silicon/u-boot#67; Stage 2 DTB t8112-j413-fw27.dtb. One-shot boot under the SoC watchdog, then made the default (two default boots healthy).

@RyanTheTide

RyanTheTide commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Host-suite note from stacking this on #2541 for the M3 Air (J615) 27.2 display work: tools/testing/selftests/drivers/gpu/apple-dcp/run.py --group all gets not ok - service-rebind with this PR applied (passes without it). The unit compiles afk.c, and the new check calls of_device_is_compatible(ep->dcp->dev->of_node, "apple,dcpext"), which that host unit has no stub for:

host.c:791:9: error: call to undeclared function 'of_device_is_compatible'
host.c:791:45: error: member reference base type 'void' is not a structure or union

A stub (or keying the check on something the unit already models) would fix it. CI on a branch stacked on this one (#2580) shows two more host units broken the same way: dcpext26-startup-tests (of_device_is_compatible) and iomfb-startup-tests (apple_rtkit_has_endpoint, dev_info undeclared). On hardware the change does what it says: with it, the J615's 27.2 internal DCP starts IOMFB and drives the panel; without it, Failed to start IOMFB endpoint: -22, the same as your J413 result.

Assisted-by: LLM (Claude:Opus 5.5)

@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf.

@RyanTheTide thanks, reproduced and fixed in two new commits (no force push):

  • 100d8d5f drm/apple: decide once at probe whether a DCP is a dcpext. dcp_platform_probe_pipe() records of_device_is_compatible(np, "apple,dcpext") as dcp->dcpext, next to the other per-processor roles, and afk_recv_handle_init() / dptxep_init() test that field. There is no device-tree lookup left in the AFK receive path, and service-rebind models the field (false: none of its scenarios is an external processor).
  • 419bb473 tools/asahi: the CI host-tests job had two more units with the same gap. iomfb-startup-tests now has an apple_rtkit_has_endpoint() with a switchable answer, and the matrix runs both ways: firmware 27 starts the allocator only where it is advertised and IOMFB in every case, while H17P and the ext26 map are unchanged. dcpext26-startup-tests gets the dcpext field.

Results:

  • tools/testing/selftests/drivers/gpu/apple-dcp/run.py --group all: 89/89. On the previous head 9a9ae8e0, service-rebind failed with the host.c:791 error you quoted.
  • tools/asahi/run-host-tests.py: CI 451/451 on 419bb473. On 100d8d5f it was 449/451, with dcpext26-startup-tests and iomfb-startup-tests failing.

Not yet on hardware: 100d8d5f changes only where the dcpext decision is made, not the decision itself. It goes into phellos's next upstream-first default (J413, 27.2), and I'll add the result here.

🤖 Generated with Claude Code

@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf: hardware result for the new head.

PR head Checked Result
419bb473 (the driver code is 100d8d5f's; 419bb473 changes only tools/asahi) J413 on the 27.2 stub. Both DCPs (231c00000, 271c00000) logged remote allocator not advertised; IOMFB endpoint advertised. Internal panel at 2560x1664@60; backlight written 140 → 192 of 525 and read back as 192. The dcpext came up, so its dcpext path ran: card1-DP-1/DP-2 present, three USB-PD controllers (0x38, 0x3a, 0x3f) bound, four Type-C ports. After one RTC s2idle cycle the panel was back with DPMS on Pass

This was phellos's third upstream-first default (one-shot cb417a33, then default boots 35fac5d5 and 6f8eb70b, 2026-11-20): integration/aurora abc6191 plus #2519, #1832, #1831, #2264, #2526, #2543 → #2544 → #2545; Aura main 29e0d3af plus aura#377, #381, #382 and #227 (isp.c only); U-Boot aurora-wip 11bf692f; t8112-j413-fw27.dtb. The error lines matched the previous default's. Not tested: an external monitor (needs someone at the machine).

🤖 Generated with Claude Code

@RyanTheTide

Copy link
Copy Markdown
Contributor

Heads-up from the M3 Air (J615) display work, which depends on this PR via #2580: neither commit here (afc241a, 9a9ae8e) has a Signed-off-by: line. #2525 and u-boot#67 were held for exactly that until re-signed. A trailer-only re-sign, as you did there, would let this merge once reviewed.

J615 rows on this PR's head are in #2580: with #2541, the remote allocator is started only where firmware 27 advertises it, and the internal panel comes up on the 27.2 image.

Assisted-by: LLM (Claude:Opus 5.5)

…es it

Firmware 27 lists the RTKit endpoints its application uses. The 27.2 DCP
on T8112 (MacBook Air M2, J413) advertises IOMFB (0x37) but no remote
allocator (0x2d). Starting the unadvertised endpoint fails, so the
internal panel never comes up.

Start the remote allocator on firmware 27 only when the firmware
advertises it. Firmware that advertises it is unchanged.

Signed-off-by: Satya Benson <satya@benson.earth>
…ounced

The 27.2 dcpext on T8112 (J413) neither announces its DPTX port at boot nor
gives powerlog-service and its other early services an EPIC class. On this
tree, dptxep_init() then failed with -ETIMEDOUT, the Type-C route muxes were
never registered, and both USB-PD controllers stayed deferred until the
deferred-probe timeout.

For a processor with the generic apple,dcpext compatible on firmware 27:
- treat the unannounced port as 14.7 and the J613 ext26 do: leave the
  endpoint up for a later announcement;
- accept the class-less init reports, as H17G and firmware-27 T8142 already
  do.

Signed-off-by: Satya Benson <satya@benson.earth>
The firmware-27 dcpext checks in afk_recv_handle_init() and dptxep_init()
looked up the "apple,dcpext" compatible on every call. Record it once in
dcp_platform_probe_pipe() as dcp->dcpext, next to the other per-processor
roles, and test the field.

The apple-dcp host suite's service-rebind unit compiles afk.c against a
model of struct apple_dcp with no device tree, so the OF call did not
build there (host.c: undeclared of_device_is_compatible). The model gets
the field, false: none of its scenarios is an external processor.
run.py --group all: 89/89.

Signed-off-by: Satya Benson <satya@benson.earth>
…pext

iomfb-startup-tests compiles iomfb_start_rtkit(), which now asks RTKit
whether firmware 27 advertises the remote allocator. Give the unit an
apple_rtkit_has_endpoint() with a switchable answer and run the matrix
both ways: firmware 27 starts the allocator only where it is advertised,
IOMFB in every case; H17P and the ext26 map are unchanged.

dcpext26-startup-tests compiles afk_recv_handle_init(); its struct
apple_dcp gets the dcpext field, true for its native dcpext (its
H17P firmware does not reach the firmware-27 check).

Signed-off-by: Satya Benson <satya@benson.earth>
@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf: thanks, Ryan. All four commits now carry Signed-off-by, with trailers only: the tree is byte-identical to 419bb47 and the base is unchanged. The new head is e42bffd. #2580 can restack on it.

@satchlj
satchlj force-pushed the satchlj/dcp-fw27-advertised-endpoints branch from 419bb47 to e42bffd Compare November 20, 2026 18:29
… the ports on DPTX_ENDPOINT

On phellos (J413, macOS 27.2 stub) a USB-C monitor never came up: on
hotplug, dcpext 271c00000 logged "dcp_dptx_connect: dptx service for
port 0 not enabled" five times, then "Type-C DPTX reconnect failed after
5 retries: -19". At boot it had already logged "DPTX port 0 not
announced yet".

The 27.2 dcpext advertises RTKit endpoints 0x20-0x2c, 0x31 and 0x37,
so both DPTX endpoints. The driver opened firmware 27's
DPTX_ENDPOINT_V2 (0x2c) with no DPTX controller, as for the T6050
external profile, and the firmware announced nothing on it.

Like T8142's dcpext, which runs the same firmware-27 image beside its
internal DCP, it serves AppleDCPDPTXController on 0x24 and
AppleDCPDPTXRemotePort on DPTX_ENDPOINT (0x2a). Select both for a
T8112 dcpext on firmware 27; nothing else changes. Correct the comment
in dptxep_init() that took the silence for late announcement.

Tested on phellos (J413, 27.2, up4 kernel, this driver loaded as a
module in a watchdog-protected one-shot, no monitor attached):
- before: port 0 not announced on 0x2c;
- after: four controller services on 0x24 (dcpav- and
  dcpdp-controller-epic, units 0 and 1), then AppleDCPDPTXRemotePort on
  0x2a channels 1 and 3 with DPTX0/DPTX1 caps, no "not announced yet";
  internal panel connected, no new error lines.
Hotplug with a monitor is untested.

Signed-off-by: Satya Benson <satya@benson.earth>
@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf.

New commit b7fbee4: the T8112 dcpext on firmware 27 now opens the DPTX controller (0x24) and its ports on DPTX_ENDPOINT (0x2a), not on DPTX_ENDPOINT_V2 (0x2c).

Why. At Satya's hands-on check on phellos (J413, 27.2 stub, up3 default, which carries this PR at 419bb47), a USB-C monitor never lit up. On hotplug, dcpext 271c00000 logged dcp_dptx_connect: dptx service for port 0 not enabled five times, then Type-C DPTX reconnect failed after 5 retries: -19. At boot it had logged DPTX port 0 not announced yet, which this PR's earlier commit tolerated, wrongly assuming a late announcement. An apple_rtkit.dyndbg probe boot shows the dcpext advertises 0x20–0x2c, 0x31 and 0x37. The driver opened 0x2c, where the firmware announces nothing. T8142's dcpext (2dc580e) already uses the layout macOS 27.2 binds: the controller on 0x24 and the RemotePort on 0x2a. Selection: apple,t8112-dcpext with fw_compat V_27_0, as for T8142.

Tested on phellos. Up4 default kernel (7.3.0-1-up4-ARCH, carries #1832, which gives this dcpext V_27_0). This driver was built from the up4 tree plus this commit, as a renamed module (appledrmt, with module_blacklist=appledrm), and loaded in a watchdog-protected one-shot. No monitor was attached.

  • Control (the up4 tree's own driver, same path): port 0 not announced, nothing on 0x2c.
  • This commit, two boots: four controller services on 0x24 (dcpav-controller-epic and dcpdp-controller-epic, units 0 and 1). Then AppleDCPDPTXRemotePort on 0x2a, channels 1 and 3, with DPTX0 caps and DPTX1 caps (width 6144). No "not announced yet". The internal panel stays connected, with no new error lines.
  • tools/asahi/iomfb-startup-tests.py and dcpext26-startup-tests.py: PASS.

Untested. Hotplug and modeset with a monitor, on either USB-C port. That needs a monitor on phellos.

🤖 Generated with Claude Code

@RyanTheTide

Copy link
Copy Markdown
Contributor

J615 row (15-inch MacBook Air M3, T8122), macOS 27.2 stub, external display processor (dcpext) started by the lab display gate.

  • b7fbee4 as is: no change on the J615 (DPTX port 0 not announced yet at boot). The new branch in dcp_platform_probe_pipe() only matches apple,t8112-dcpext; the J615's node is apple,t8122-dcpext.
  • Same branch with apple,t8122-dcpext added: the dcpext opens AppleDCPDPTXController on endpoint 0x24 (channels 1, 3, 5, 7) and announces both AppleDCPDPTXRemotePort services on 0x2a (channels 1 and 3) at boot, then DCP booted. No monitor was attached, so no hotplug or modeset was tested.

So the T8122 27.2 dcpext has the same endpoint layout as T8112's; the check could take both compatibles (or key on the firmware-27 dcpext advertising both endpoints).

…e firmware advertises

b7fbee4 opened the DPTX controller on DPTX_CONTROLLER_ENDPOINT (0x24)
and the ports on DPTX_ENDPOINT (0x2a) for "apple,t8112-dcpext" only. On a
J615 (T8122, "apple,t8122-dcpext") on the 27.2 stub nothing changed: "DPTX
port 0 not announced yet". With that compatible added, RyanTheTide's J615
opened AppleDCPDPTXController on 0x24 (channels 1, 3, 5, 7) and announced
both AppleDCPDPTXRemotePort services on 0x2a (channels 1 and 3) at boot:
the same layout as T8112's and T8142's dcpexts.

Select it by what the firmware advertises, not by a compatible: a dcpext
on firmware 27 whose RTKit endpoint map has both 0x24 and 0x2a gets the
controller and its ports there (dcp_v27_dptx_layout()).

The map is not known in dcp_platform_probe_pipe(), where b7fbee4 decided:
RTKit is woken only at bind (dcp_comp_bind()). So the choice moves to
dcp_start(), after the ext26 branch and before any DPTX endpoint opens;
the order in which the endpoints are opened is the one measured on J413
and J615.

Hardware data that names an endpoint keeps it, so no other processor
moves even if its firmware advertises both endpoints:
- T8142's dcpext already names DPTX_ENDPOINT, with the controller;
- the T6050 dcpext and the firmware-27 T6041 dcpext used firmware 27's
  default DPTX_ENDPOINT_V2 (0x2c), with no controller. Their hardware
  data now names it, so they open what they opened before. Whether they
  advertise 0x2a is not known here.
Internal processors, other firmware and ext26 are not affected.

tools/asahi/dcp-v27-dptx-layout-tests.py builds the production selector
and dptxep_init()'s endpoint expression over firmware, processor role,
advertised maps and pinned endpoints, checks that the selector tests no
compatible and runs in dcp_start() before the DPTX endpoints open, and
kills three mutations (no advertisement check, pinned endpoint ignored,
internal processors included).

Not tested on hardware: the J413 and J615 rows above were taken with
the compatible-keyed check; hotplug and modeset with a monitor are
untested on both.

Signed-off-by: Satya Benson <satya@benson.earth>
@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf.

@RyanTheTide, thanks for the J615 row. It showed the T8112-only check missed your T8122 dcpext, and that both have the same layout.

What changed (new commit 91f7e00, no force push). The check no longer uses a compatible. A dcpext on firmware 27 gets the DPTX controller on 0x24 and its ports on 0x2a when its RTKit endpoint map advertises both of those (dcp_v27_dptx_layout()).

  • The map isn't known in dcp_platform_probe_pipe(), because RTKit is only woken at bind. So the choice now happens in dcp_start(), after the ext26 branch and before any DPTX endpoint opens. The endpoints still open in the order you and we measured.
  • Hardware data that names an endpoint keeps it. T8142's dcpext already names 0x2a. The T6050 dcpext and the firmware-27 T6041 dcpext now name the 0x2c they used before. So none of them moves, even if its firmware also advertises 0x2a. We don't know whether they do.
  • New host unit tools/asahi/dcp-v27-dptx-layout-tests.py (registered in run-host-tests.py). It builds the real selector and dptxep_init()'s endpoint choice over firmware, processor role, advertised maps and pinned endpoints. It also checks that the selector tests no compatible and runs before the DPTX endpoints open. It kills three mutations: no advertisement check, a pinned endpoint ignored, and internal processors included.

T8112 side. The outcome is the same as on b7fbee4, which Satya measured on phellos (J413, 27.2): the controller on 0x24, both AppleDCPDPTXRemotePort services on 0x2a at boot, no "not announced yet", and no monitor attached. This exact commit hasn't been booted yet: only the point where the choice is made moved, from probe to start.

Untested on our side: hotplug and modeset with a sink, on either USB-C port.

Host tests (macOS host):

  • tools/testing/selftests/drivers/gpu/apple-dcp/run.py --group all: 88/89. The one failure, m4-power-gate, is macOS-only (EREMOTEIO isn't defined there) and is in a unit this commit doesn't touch.
  • tools/asahi/run-host-tests.py --only dcp: all pass, including the new unit and its three mutations. The full run needs Linux headers, so the CI host-tests job on this head is the real check.

🤖 Generated with Claude Code

@DjDeveloperr

Copy link
Copy Markdown
Contributor

J773g row (M4 Mac mini, T8132), macOS 27.2 (26B123) stub, dcpext0 driving the HDMI port: pass, with one extra line on the J773g side.

What ran Checked Result
This PR's driver logic (the 6 commits, ported to the mini's m4drv8 base) + #2634's one line, as an appledrm module for the running kernel; the J773g endpoint pins we used before (.dptx_endpoint/.dptx_controller in the T8132 hardware data) removed dcpext0 DPTX layout, HDMI modeset, desktop Pass
  • apple-dcp 286e00000.dcp: firmware 27: DPTX controller on 0x24, ports on 0x2a (advertised). No -110, and no "not announced" or "dptx service ... not enabled".
  • The remote allocator is advertised on this dcpext and started as before.
  • HDMI-A-1 is connected and enabled, CRTC 3840x2160@60 (594 MHz). The firmware logs mode_set_gated: 3840x2160@60 Hz DSC=NO VRR=NO link: 1. The KDE greeter is up, with no DART faults.
  • The firmware's mode list now includes 4K120, 1440p240 and 1080p240. Not set yet.
  • An announce with no EPIC class (ep 0x20 powerlog-service, 0x23 disp0-service) is now bound by name. 3efea66 dropped them with "failed to extract init props: -2". Nothing breaks.

Why the J773g needs a line beyond this PR: the selector keys on dcp->dcpext, i.e. the apple,dcpext compatible. The T8132 dcpext nodes don't carry it, on purpose:

  • on the M4 firmware they are adopted outside the DRM device;
  • the generic match entry would bind them as a plain dcpext without CONFIG_DRM_APPLE_DCP_T8132.

So #2634 sets dcp->dcpext where a T8132 dcpext is admitted on the 27.2 image (by processor and image; no board check since #2541's 2451da0). Nothing in this PR needs to change for it.

🤖 Generated with Claude Code

@RyanTheTide

Copy link
Copy Markdown
Contributor

J615 (15" M3 Air, T8122, macOS 27.2 firmware) boot-only row for head 91f7e00: PASS, no monitor attached.

  • Kernel: our J615 lab tree with this PR's bae89ec + 91f7e00 in place of b7fbee4's compatible check (the earlier T8122 line from my 08:39 row is removed). The dcpext is armed by the loader as before.
  • dmesg: firmware 27: DPTX controller on 0x24, ports on 0x2a (advertised); DPTX controller service on 0x24, both AppleDCPDPTXRemotePort services on 0x2a (channels 1 and 3), DCP booted for the dcpext and the internal DCP. No DPTX port 0 not announced yet any more.
  • DP-1 and DP-2 connectors present (no sink), internal eDP still connected, 0 DART faults, no SError/oops.

So choosing the endpoints from what the firmware advertises covers the T8122 dcpext without a SoC check. Modeset/HPD still needs a monitor on the J615 (pending).

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Blockers: 1. Every commit in the series (1bebd9d, 62e3c55, bae89ec, e42bffd, b7fbee4, 91f7e00) carries a
"Co-Authored-By: Claude Opus 5.5" trailer in the commit message. Please do a trailer-only rewrite that drops it and keeps the
Signed-off-by. The code itself looks right: 91f7e00 replaces the T8112 compatible check with the firmware's advertised
endpoints, fw 27 is only reached through a complete method table, and pinned hardware data keeps T8142/T6050/T6041 where they
were. Host units pass, mutations included. Non-blocking points: (a) when the layout comes from advertisement, a controller
timeout now fails the whole dcpext through dev_err_probe() in dcp_start(). Once fw 27 is admitted on every SoC (#1832), that
reaches the M1/M2/M3 Pro/Max dcpexts with no row, so a warn-and-fall-back to 0x2c would be safer. (b) afk.c:1748 now binds
class-less reports by interface name on every fw-27 dcpext, including T6050/T6041/T8142 (powerlog-service, disp0-service).
(c) dcp_start() already ignored a dptxep_init() failure, so 62e3c55's dptxep hunk only changes the log level, and its message
overstates its effect. (d) The PR body still describes the compatible-keyed selection. On this tree alone, T8112/T8122 on 27.2
never reach fw 27 without #1832. (e) The T6041 pin at dcp.c:7187 could live in apple_dcp_hw_t6041_dcpext, like the T6050 one.
Rows still needed on this head: J413 boot plus a monitor hotplug/modeset on J413 and J615, and a regression boot on a T8142,
T6050 or T6041 27.2 dcpext.

Introduced interfaces a downstream PR may depend on:

  • drivers/gpu/drm/apple/dcp-internal.h:546 bool dcpext; in struct apple_dcp: "any apple,dcpext processor", set at probe in
    dcp_platform_probe_pipe() (drivers/gpu/drm/apple/dcp.c:7130). drm/apple: dcp: J773g 27.2 dcpext: DPTX endpoints from the firmware's advertisement (stacked on #2541, #2526) #2634 sets it for T8132.
  • drivers/gpu/drm/apple/dcp.c:4615 static void dcp_v27_dptx_layout(struct apple_dcp *dcp), called once in dcp_start()
    (dcp.c:4671) after the ext26 return and before the H17P allocator, systemep, dptx_controller_init and dptxep_init. If fw 27,
    dcp->dcpext, hw.dptx_endpoint == 0, and the RTKit map has DPTX_CONTROLLER_ENDPOINT (0x24) and DPTX_ENDPOINT (0x2a), it sets
    hw.dptx_endpoint = DPTX_ENDPOINT and hw.dptx_controller = true and logs
    "firmware 27: DPTX controller on 0x24, ports on 0x2a (advertised)".
  • Changed meaning of existing hw fields (dcp-internal.h:313 u8 dptx_endpoint, :319 bool dptx_controller): they are now
    written at runtime, and a non-zero dptx_endpoint in match data is the opt-out ("pinned"). New pins:
    apple_dcp_hw_t6050_dcpext .dptx_endpoint = DPTX_ENDPOINT_V2 (dcp.c:9838) and the T6041 fw-27 dcpext probe override (dcp.c:7187).
  • drivers/gpu/drm/apple/iomfb.c:4496-4504 iomfb_start_rtkit(): fw 27 skips REMOTE_ALLOC_ENDPOINT when not advertised and logs
    "remote allocator not advertised; IOMFB endpoint %sadvertised".
  • drivers/gpu/drm/apple/dptxep.c:1663-1664 dptxep_init(): a fw-27 dcpext with port N unannounced logs "DPTX port N not announced
    yet" and returns 0 (endpoint left up for a late announcement).
  • drivers/gpu/drm/apple/afk.c:1748 afk_recv_handle_init(): a fw-27 dcpext accepts class-less init reports (matched by interface name).
  • Uses the existing apple_rtkit_has_endpoint() (drivers/soc/apple/rtkit.c:2044); the PR does not introduce it.
  • Tests: new tools/asahi/dcp-v27-dptx-layout-tests.py (registered in tools/asahi/run-host-tests.py with mutations
    ignore-advertisement/ignore-pinned/ignore-dcpext). It text-extracts static void dcp_v27_dptx_layout(, int dcp_start(struct platform_device *pdev), static int dcp_platform_probe_pipe( and the dptxep_init() ep = afk_init(dcp, ..., dptxep_ops); /
    bool wire_v2 = ...; expressions, and asserts that the call precedes dptx_controller_init(dcp) in dcp_start(). A downstream
    PR that renames or reorders these breaks the unit. Struct models gained dcpext in tools/asahi/dcpext26-startup-tests.py and
    tools/testing/selftests/drivers/gpu/apple-dcp/edid.py, and tools/asahi/iomfb-startup-tests.py has a switchable
    apple_rtkit_has_endpoint() stub.

RyanTheTide added a commit that referenced this pull request Nov 21, 2026
…odes alone

The gate that hands a T8132 dcpext on the 27.2 image its Type-C routes,
its PIODMA child and its display DART in the display subsystem's iommus
was reached only through apple_t8132_firmware_path(), which on 27.2 is
a check for the J713 or J715 machine. Another T8132 board with Type-C
routes and the same handoff never had its routes enabled.

The gate already selects every dcpext it touches by its nodes: an
available apple,t8132-dcpext admitted on the 27.2 image
(apple_t8132_dcpext_v27_2()), with typec-routes children, its text,
data and heap apple,asc-mem regions, and an enabled display subsystem.
Run it on every machine, after the SoC's own gate, so that it appends
to whatever iommus that gate set. A 27.2 J773g dcpext0 has no Type-C
routes and keeps its HDMI chain; a tree without the T8132 display
subsystem returns at once.

While at it, fix the iommus append the review pointed at: a display DART
the subsystem already names is not added a second time, the stream ID is
the one the subsystem uses on its own display DART (its first iommus
entry) instead of a literal 0, and the new property is freed when the
changeset update fails.

Merge order: this series drives a monitor only on top of #2526 (its
DPTX endpoint layout, dcp_v27_dptx_layout(), and the dcp->dcpext field)
plus a one-line change that sets dcp->dcpext for a 27.2 T8132 dcpext.
Without them the dcpext opens the default firmware-27 DPTX endpoint and
times out. #2526 must land first; this branch then carries that line,
which cannot be applied before #2526 because the field does not exist.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Review at 91f7e00 (adversarial pass; this is in the M4 Air's tip-based default). No blockers.

  • Every new choice comes from what the firmware advertises: the remote allocator is started only when REMOTE_ALLOC_ENDPOINT is in the RTKit endpoint map, and a firmware-27 dcpext takes the controller on DPTX_CONTROLLER_ENDPOINT and its ports on DPTX_ENDPOINT only when both are advertised. There is no SoC, board or firmware-version check. Hardware data that already names an endpoint keeps it (T8142 dcpext; T6050 and firmware-27 T6041 now name DPTX_ENDPOINT_V2 explicitly, so their behaviour doesn't change).
  • dcp_v27_dptx_layout() runs on every dcp_start(). It changes only the per-instance dcp->hw copy, and once it has set dptx_endpoint it returns early, so a restart or resume keeps the same layout.
  • dcp->dcpext comes from the generic apple,dcpext compatible. The AFK identity tolerance and the "not announced yet" return only relax failure paths for firmware-27 dcpexts. A processor that sends identity / announces on time behaves as before.

Rows on the M4 Air (J713, 27.2 stub, integration tip + the J713 PR heads incl. this one, one fleet cmdline):

  • both T8132 dcpexts log firmware 27: DPTX controller on 0x24, ports on 0x2a (advertised), and DP-2 is connected at boot and after s2idle 3/3;
  • the internal DCP starts its remote allocator as before (no "not advertised" line), and the panel binds;
  • 7 boots, now the J713's configured default. host-tests green here.

Assisted-by: LLM (Claude:Opus 5.5)

@satchlj

satchlj commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf. @RyanTheTide, I did the trailer-only rewrite you asked for. The new head is 67f853fb, and the old head was 91f7e00f.

  • What changed: the Co-Authored-By line is gone from all six commits.
  • What didn't: every commit keeps its Signed-off-by, author and dates, and has the same tree as before. git diff 91f7e00f 67f853fb is empty.
  • Assisted-by: it stays in the PR body only.

@satchlj
satchlj force-pushed the satchlj/dcp-fw27-advertised-endpoints branch from 91f7e00 to 67f853f Compare November 21, 2026 20:26
RyanTheTide added a commit that referenced this pull request Nov 21, 2026
…13-dcpext/air-dcpext-272

The J713's 27.2 dcpexts need #2526's dcp->dcpext to choose their DPTX
endpoints from what the firmware advertises.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-review at 67f853f: no blockers.

  • git range-diff against 91f7e00, on the same merge base, differs only by the six removed Co-Authored-By lines. The code is byte-identical to what I reviewed with no blockers at 91f7e00, so the attribution blocker is resolved.
  • Rows on this code: the M4 Air (J713) production default carries this series, as a merge into integration tip + the J713 PR heads (t4 build). On that boot both external display processors start on 27.2, with eDP + the USB-C monitor at boot, s2idle 3/3 and warm reboots 3/3. The kernel half of the M4 Air's external display (linux#2673) depends on the dcp->dcpext field added here.
  • One nit, not blocking: the body still says "Selected by apple,t8112-dcpext with firmware 27". Since 91f7e00 the selection comes from the advertised endpoints plus apple,dcpext.

@DjDeveloperr this one only needs your verdict. Once it merges, linux#2673 becomes ready for review.

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

Adversarial review of head 67f853fb4c5fdee20475752ec3640083bdcdd61b (base integration/aurora, MERGEABLE/CLEAN, Host tests/host-tests green).

Code, Gating & Attribution Review — Clean

  • Firmware-driven selection (§1):
    • drivers/gpu/drm/apple/iomfb.c:4496-4504: iomfb_start_rtkit() skips REMOTE_ALLOC_ENDPOINT on firmware 27 only when !apple_rtkit_has_endpoint(dcp->rtk, REMOTE_ALLOC_ENDPOINT).
    • drivers/gpu/drm/apple/dcp.c:4615-4627,4671: dcp_v27_dptx_layout() runs in dcp_start() after RTKit wake and before dptx_controller_init()/dptxep_init(), selecting DPTX_CONTROLLER_ENDPOINT (0x24) + DPTX_ENDPOINT (0x2a) for firmware-27 dcp->dcpext only when both endpoints are advertised and dcp->hw.dptx_endpoint is unpinned. Mutates only the per-instance dcp->hw copy and is idempotent across restarts.
    • Existing pinned layouts are preserved: T8142 (DPTX_ENDPOINT), T6050 (DPTX_ENDPOINT_V2), and firmware-27 T6041 (DPTX_ENDPOINT_V2 set in the fw_compat == DCP_FIRMWARE_V_27_0 probe override at dcp.c:7187, keeping desktop 26.6 untouched).
  • Error & teardown paths:
    • drivers/gpu/drm/apple/dptxep.c:1663-1668 and drivers/gpu/drm/apple/afk.c:1748 only relax missing-announce / class-less init failure paths for firmware-27 dcp->dcpext (service_name stays initialized to name on -ENOENT).
    • If dptx_controller_init() fails in dcp_start(), dcp->dptx_controller_ep is cleaned up via afk_free() on unbind, and apple_drm_init_dcp() (apple_drv.c:1599-1607) continues bringing up the internal panel and remaining pipes.
  • Host tests: tools/asahi/dcp-v27-dptx-layout-tests.py (with 3 killed mutations) plus updates to iomfb-startup-tests.py, dcpext26-startup-tests.py, and edid.py pass in CI.
  • Attribution (§4): The trailer-only rewrite at 67f853fb cleanly removed Co-Authored-By from all 6 commits; every commit carries human author/committer and Signed-off-by: Satya Benson <satya@benson.earth> only, and the PR body ends with Assisted-by: LLM (Anthropic:Claude Opus 5.5).

Non-Code Hold Remaining (Hardware Evidence §5)

While 67f853fb is tree-identical to 91f7e00f — which already has passing rows on J713 (M4 Air, 7 boots + DP-2 + s2idle), J773g (M4 Mac mini, HDMI 4K60), and J615 (M3 Air, boot-only without monitor) — the following hardware rows are still missing for §5 sign-off on this head:

  1. J413 (M2 Air, T8112, 27.2) boot on 67f853fb/91f7e00f: commit 67f853fb itself notes the J413 runs were taken with the earlier compatible-keyed b7fbee48 check, not dcp_v27_dptx_layout().
  2. External monitor hotplug/modeset on J413 or J615 (and full §5 regression bar: 0 SELinux denials, 0 failed units, 0 new kernel errors on J413/J615).
  3. Regression boot on a pinned firmware-27 dcpext (T6050, T6041, or T8142): verifies both the new DPTX_ENDPOINT_V2 pins (dcp.c:7187,9838) and widened afk.c:1748 class-less init matching cause no regressions.

Non-Blocking Notes

  • PR body staleness: The PR body's ## T8112 dcpext ports (b7fbee48) section still describes selection by apple,t8112-dcpext rather than dcp_v27_dptx_layout()'s advertised-endpoint check.
  • Controller timeout fallback (future fw-27 SoCs): Once #1832 admits firmware 27 on additional SoCs, if any unpinned dcpext advertises 0x24 and 0x2a without announcing a controller on 0x24, dptx_controller_init() returning -ETIMEDOUT in dcp_start() will fail that dcpext rather than warning and falling back to 0x2c. Safe for internal panels (since apple_drm_init_dcp() continues), worth keeping in mind for follow-up.

Code, CI, and attribution are clean; posting a comment hold pending the remaining hardware rows on 67f853fb.

Assisted-by: LLM (Google:Gemini 4 Neon)

RyanTheTide added a commit that referenced this pull request Nov 21, 2026
…15/t8122-dcp-27-2-standalone

The T8122 27.2 DCP advertises no remote allocator endpoint. Without
#2526 its IOMFB start fails on every 27.2 boot, so this branch carries
it and can no longer land without it.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@satchlj

satchlj commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf

Pinned firmware-27 dcpext regression boot on T6050 for #2526 at 67f853fb, the hardware row 3 asked for in the review.

Machine. J775c (Mac Studio, M5 Max). Both DCPs are apple,t6050-dcpext (2b2e00000.dcp, 392e00000.dcp), OS firmware 27.0. One HDMI display is on dcpext1, and no monitor was swapped.

Build. integration/aurora cacf35543b4d plus #2102, #1743, #2488, #2557 and #2498 (the tested J775c stack), with and without this PR's diff, otherwise identical:

without #2526 (Image 8281ecb1) with #2526 (Image 71b66a15)
DCPs bound both both
endpoint services system, powerlog-service (ep 0x20), disp0-service (0x23), AppleDCPDPTXRemotePort on channels 1 and 3 (0x2c) on each DCP; dcpav-cec/-video/-audio compact services (0x2b) on dcpext1 identical
DPTX caps DPTX0/1 width 6144, total 1640000000 on each DCP identical
HDMI-A-1 connected, enabled, 2560x1440; set_digital_out_mode(color:72 timing:40) "2560x1440" then finished twice identical
setmode failures 0 0
kernel error lines 3: AOP probe -61, set_active_lane_count: unexpected lane count:4, DCP requested undeclared provider clock index 0 the same 3
DCP/DPTX/AFK warnings, SELinux denials, failed units 0 / 0 / 0 0 / 0 / 0

A normalized diff of every apple-dcp/DPTX/AFK line between the two boots differs only in kernel virtual addresses (shmem_setup buffers) and the timing counters of dcp_set_power_state_req and set_digital_out_mode finished.

So on this pinned T6050 fw-27 dcpext we see no regression from #2526: the same endpoints come up, and HDMI modesets the same way. The PR's new advertised-endpoint selection for unpinned dcpexts isn't exercised here, because T6050 is pinned to DPTX_ENDPOINT_V2.

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

Approving head 67f853fb4c5fdee20475752ec3640083bdcdd61b after @satchlj's J775c (T6050) A/B pinned fw-27 dcpext regression row landed on 67f853fb (0 regressions, identical endpoints and HDMI 2560x1440 modeset, 0 SELinux denials / failed units / new kernel errors).

With J713 (unpinned fw-27 dcpext + eDP + USB-C monitor + 3/3 s2idle + 3/3 warm reboots), J773g (HDMI 4K60), J615 (boot), and J775c (pinned fw-27 T6050 A/B regression) all green on tree 67f853fb/91f7e00f, plus clean code, host tests, and commit attribution, our earlier hardware-row hold is satisfied.

Non-blocking: the PR body's T8112 dcpext ports section can be refreshed to mention advertised-endpoint selection (dcp_v27_dptx_layout()), and a follow-up J413 row on post-merge tip is still welcome.

Assisted-by: LLM (Google:Gemini 4 Neon)

@RyanTheTide
RyanTheTide merged commit 4162bd6 into integration/aurora Nov 22, 2026
1 check passed
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.

3 participants