Skip to content

drm/apple: adopt a DCP handed over running (M2 Mac mini HDMI on 27.2) - #2853

Merged
RyanTheTide merged 17 commits into
integration/aurorafrom
m2mini/dcp-live-rtkit
Nov 24, 2026
Merged

RyanTheTide merged 17 commits into
integration/aurorafrom
m2mini/dcp-live-rtkit

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 22, 2026 •

Copy link
Copy Markdown

Problem

On the M2 Mac mini (J473) with the macOS 27.2 stub, Stage 2 drives HDMI through the external DCP (dcpext) and hands that DCP over running. Linux then fails in four places:

  1. A T8112 DCP reporting firmware-compat 27.2.0 is refused, although a 27.x method table exists for it.
  2. The running firmware does not repeat HELLO/EPMAP, so apple_rtkit_wake() times out (endpoint discovery failed: -62) and apple-drm does not bind. simpledrm keeps the boot picture.
  3. Once adopted, the firmware still has the link the loader trained and no sink: it lists only 640x480/800x600/1024x768, and the DP2HDMI link wait withdraws the display.
  4. The HDMI converter announces its AV service as AppleDCPMCDP29XX on firmware 27, which is refused, so the EDID is never read (0-byte EDID property).

Change

  • rtkit: apple_rtkit_init_adopted_with_session() takes the negotiated protocol version, the firmware's endpoint map and the retained system buffers. The map replaces the assumed system endpoints before mailbox RX starts. An unknown system endpoint, a version mismatch or a retained buffer whose endpoint is not in the map rejects the session. Existing initialisers are unchanged.
  • dcp: admit a 27.x firmware-compat by its method table when no legacy path matched.
  • dcp: when the node carries the loader's description, check that the ASC runs, that each buffer translates contiguously through the DCP's own DART and that the memory it translates to lies in one of the node's no-map reserved-memory carveouts. Only then retain the session and skip the wake. Anything that fails a check fails the bind with nothing retained. hw.adopt_live_session follows the property, not the firmware version. A retained unbind also stops the HDMI HPD interrupt and the swap watchdog.
  • dcp: on an adopted session, drop the DPTX port's HPD and release its display at start, then raise HPD after the link wait on a DP2HDMI port. The firmware retrains and reads the sink. The DP2HDMI link wait is non-fatal on the 13.5 line (as before) and on an adopted session; a cold start keeps it fatal.
  • dpavservep: admit the MCDP29xx converters' AV service (AppleDCPMCDP29XX for the built-in HDMI port, AppleDCPMCDP2900 for a USB-C to HDMI adapter) under the same rules as AppleDCPDP2HDMI. That service carries the EDID.
  • The description uses the RTKit handoff properties other co-processors handed over running already use: apple,rtkit-handoff = "dcp-live-v1" and apple,rtkit-buffers (<ep dva_hi dva_lo size is_mapped>, the device address being the DART input address), plus apple,rtkit-version and apple,rtkit-epmap, which a DCP needs on top. Documented in apple,dcp.yaml, which requires version, epmap and buffers with apple,rtkit-handoff.
  • tools/asahi: rtkit-adopted-session-tests.py runs the endpoint-map importer from the source with the J473 map, with one mutation per check.

No command-line or module parameters, and no chip/board/firmware gates. A DCP without the description boots as before.

Testing

J473, macOS 27.2 stub, Stage 2 from aurora-silicon/aura#467, default fleet command line, aura-try + one-shot kernel, production default restored and verified after each row.

  • Before: dcpext -ETIME in endpoint discovery, apple-drm unbound, simpledrm 1920x1080.
  • After, on this head (integration/aurora f5fae3c + this series, built as one kernel): both DCPs bound; HDMI-A-1 connected with 31 sink modes (1920x1080 at 180/144/120 Hz and lower), EDID 256 bytes (QG270 S3; BT.2020 RGB/YCC/cYCC and SMPTE ST 2084 in the EDID; KMS offers BT2020_RGB and HDR_OUTPUT_METADATA). System running with 0 failed units, 0 WARN, 0 DART faults, SELinux Enforcing, 0 AVC.
  • Without the description (production Stage 2, default command line, at e2cc4ab): the primary DCP is admitted on 27.2.0, boots cold and binds; the dcpext this Stage 2 leaves running times out in endpoint discovery and apple-drm stays unbound, so simpledrm keeps the boot picture, as before. 0 WARN, 0 DART faults.
  • A description whose buffers are not in no-map carveouts (default command line): refused with -EACCES, nothing retained, simpledrm keeps the picture, 0 failed units, 0 DART faults.
  • At e2cc4ab with aura#467's no-map regions: adopted; HDMI-A-1 EDID identical to what macOS 27.2 reads from the same monitor; measured flip rates 180.00/144.00/120.00/60.00 Hz at 1920x1080; HDR (BT2020_RGB + ST 2084) committed at 120 and 60 Hz.
  • Host: tools/asahi/run-host-tests.py --only rtkit 21/21 (incl. the new test and its 5 mutations), --only dcp 34/34. appledrm KUnit with the display suites 334 pass / 0 fail / 3 skip, including the new MCDP identity cases. W=1 clean on rtkit.o, dcp.o, dpavservep.o. dt-doc-validate and yamllint clean on apple,dcp.yaml.

Still to run

  • The loader handoff producer has merged in aura#467. Verify the installed chain as well as aura-try, including dcpext unbind or shutdown.
  • Verify short J473 s2idle with both the adopted external DCP and the cold-start primary DCP. The earlier DP-audio fix passed 13 freezes over 3 boots. The current, narrower sleep fix still needs its combined J473 row.
  • Resolve the merge against current integration and check the shared classic AV-service admission on a J713 with an external sink through DPMS off and on. The display-DART power fix is already in integration via linux#2962.
  • Recheck J473 HDMI EDID and relight after DPMS, plus a cold legacy DP2HDMI row on an M1 Pro.
  • The companion USB-C display change depends on this series for firmware-27 admission. Its current revision still needs a USB-C modeset with HDMI active.
  • VRR: vrr_capable stays 0 on both monitors, as macOS 27.2 reports SupportsVariableRefreshRate = No for both. HDR at 1080p180 is refused, as on macOS (every PQ element of that timing is in the firmware's own unsafe list); HDR at 144 Hz is refused although that timing keeps YCbCr 4:4:4 PQ elements: under investigation.
Reviewer detail

Why the loader's buffers need reserved-memory regions. For a legacy T8110 display DART (dart-dcpext reports version 0101), apple_dart_hw_sync_locked() replaces the live locked root with Linux's own table, which the IOMMU core rebuilds from the device's reserved-memory iommu-addresses. A buffer outside those regions loses its mapping when the DCP attaches. We measured it: the hardware L1 slot of the loader's syslog/ioreport DVAs (0x408, vm-base 0x8_0000_0000) was valid in Stage 2 up to the jump and empty in Linux. With aura#467's regions, Linux rebuilds it. That is why the consumer resolves each buffer through the DCP's DART and requires carveout membership.

Description. apple,rtkit-epmap: 8 cells; for the J473 dcpext 0x0000011f 0x00821fff = system 0,1,2,3,4,8 and application 0x20-0x2c, 0x31, 0x37. apple,rtkit-buffers: the J473 has three, crashlog (firmware-supplied address, is_mapped 1, in the asc-firmware carveout), syslog and ioreport (loader-allocated, is_mapped 0). The first rows used a parallel apple,rtkit-live* set with physical addresses; review asked for the existing handoff properties, and the physical address now comes from the DART.

Retrain sequence. Release alone was not enough: the firmware read the sink (31 modes) but stayed connected:0 until HPD rose again after the link wait.

EDID. With the MCDP29XX AV service refused, the HDMI connector had no EDID on both the adopted and the cold path; with it admitted, the converter's copy of the sink EDID (256 bytes) is read.

Known follow-up. The adopted session's syslog is acknowledged but not decoded, because Linux never saw SYSLOG_INIT.

The original handoff work and PR draft used Claude Opus 5.5.

Assisted-by: LLM (Codex)

A co-processor that a boot stage handed over running does not repeat
HELLO or EPMAP, so its new owner cannot learn the endpoints from the
firmware. apple_rtkit_init_adopted() and _with_buffers() assume every
system endpoint and know no application endpoint, so
apple_rtkit_start_ep() refuses all of the firmware's own services.

Add apple_rtkit_init_adopted_with_session(). It takes what the previous
owner negotiated: the protocol version, the endpoint map the firmware
advertised and the retained system buffers. The map is copied before
mailbox RX starts. Management must be in it, and a system endpoint this
driver does not implement makes the session invalid instead of being
ignored. Application endpoints are only advertised: the new owner
starts each one as usual. The existing initialisers keep their
behaviour.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
dcp_check_firmware_version() admits the 27.x firmware ABI per SoC
(T8122, T6041, the firmware-27 match data). A DCP whose loader reports
a 27.x firmware-compat with a complete method table on another SoC,
such as the M2 Mac mini's on the 27.2 stub, is refused with
"firmware-compat 27.2.0 is not supported" although the table exists.

When no legacy implementation matched, accept the reported ABI if
iomfb_v27_methods() has a table for it. Nothing changes for a version a
legacy path already handles or for one without a table.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
A boot stage that drives a display through a DCP can hand the DCP on
running, its RTKit session negotiated and its system buffers mapped.
Such firmware does not repeat HELLO or EPMAP, so apple_rtkit_wake()
times out in endpoint discovery (-ETIME) and the DRM device does not
bind.

The boot stage describes the session on the DCP node:
apple,rtkit-live (layout 1), apple,rtkit-version, apple,rtkit-epmap
(eight cells, cell i = endpoints 32i..32i+31) and
apple,rtkit-live-buffers (<ep flags iova_hi iova_lo phys_hi phys_lo
size_hi size_lo> for each system buffer). When the node has it, check
that the co-processor runs, that each buffer lies inside one of the
node's reserved-memory carveouts (the regions the IOMMU core keeps
mapped when it takes over a locked display DART) and that the DART
translates its IOVA to that memory. Then initialise RTKit with the
adopted session and skip the wake. An unknown layout or a buffer that
fails a check fails the bind instead of starting the firmware a second
time. Behaviour follows the description, not the SoC or firmware
version: hw.adopt_live_session is set from the property, and a DCP
without it boots as before.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
A boot stage that handed a DCP over running left its DPTX port's
display up, on a link it trained. The firmware then has no sink: it
lists its default modes (640x480, 800x600, 1024x768) and no EDID. It
sends no link configuration for a link that is already trained, so
dcp_dptx_connect() withdrew the display after its timeout.

On an adopted session, drop the port's HPD and release its display when
the endpoints start. The next connect then trains the link and the
firmware reads the sink again. Raise HPD after the link wait on an
adopted DP2HDMI port, so that the firmware sees the display plugged
(HPD is otherwise left to the converter on that output).

The link wait on a DP2HDMI output was non-fatal only on the 13.5
firmware line. The reason is the output, not the firmware: the
converter holds HPD and the firmware is not asked to detect the sink.
So key it on the output alone. This only affects a wait that used to
time out and withdraw the display.

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

Copy link
Copy Markdown
Author

Review at 86f405f.

  1. DT ABI, dcp.c:1895-1966 and 7513: this adds a second RTKit live-handoff ABI (apple,rtkit-live = <1>, apple,rtkit-version, apple,rtkit-epmap, apple,rtkit-live-buffers with 8 cells) next to the one Linux already has: apple,rtkit-handoff (a versioned string) plus apple,rtkit-buffers (rtkit-helper.c:135-230, nvme/host/apple.c:431, apple-dart.c:5094, apple,rtk-helper-asc4.yaml). None of the new properties is in apple,dcp.yaml. Please use apple,rtkit-handoff = "dcp-live-v1" and extend the buffer inventory with the PA cells this needs, plus a binding update that lands with aura#467. aura#467 should change to the same names.
  2. dcp.c:1876: carveout membership only rejects reusable. rtkit-helper.c:176 requires no-map. Without no-map the region stays in the linear map as cacheable, and dcp_vmap_wc() (pfn_valid path) creates a write-combine alias of the same pages. Require no-map, as the helper does.
  3. Validation order, dcp.c:7513, 6894, 6897: probe sets hw.adopt_live_session as soon as the property exists, before anything is validated. dcp_pin_live_session() runs before dcp_rtkit_live_parse(). On a 27.x DCP (dcp_fail_stop()), a malformed or unknown-layout description fails the bind after retain_dma is set and the device, group and module are pinned until reboot. A stale description on a stopped DCP fails at 6713 instead of falling back to the cold start. Parse and validate the description in probe, and only then set adopt_live_session, then pin.
  4. dcp.c:6301 (commit 2): any legacy-match DCP (T8103, T6000/1/2, T6020, T8112, generic apple,dcp/apple,dcpext) that reports a 27.x firmware-compat is now admitted as V_27_0 even without a live description. It then takes the cold RUN + apple_rtkit_wake() path and the V_27 fail-stop behaviour. That was refused before, and it is untested on those SoCs. Selecting on the reported ABI is fine, but either keep this to DCPs that carry the handoff description, or show rows on them.
  5. dcp.c:2478 (commit 4): dropping the fw_compat == 13_5 condition makes the link-wait timeout non-fatal on every DP2HDMI output, cold path included (M1/M2 Pro/Max laptops, Mac Studio, M2/M2 Pro mini on 12.3/14.7). A real training failure then no longer withdraws the display. This contradicts "a DCP without the description boots as before". Either key it on rtkit_adopted, or give rows for those outputs.
  6. Nit, dcp.c:2651-2656: the comment says set_hpd "runs only for a DisplayPort connector", which is no longer true for an adopted DP2HDMI port.
  7. Nit, dcp.c:1961/1991: the loader-owned flag is validated but never used. Every buffer gets is_mapped = true. Either use the flag or drop it from the layout.

Rows owed at this head: J473 27.2 installed Stage 1 -> Stage 2 chain (not a one-shot), with s2idle suspend/resume and a DCP unbind or shutdown on the adopted dcpext. J473 production Stage 2 (no description) at this head, because commit 2 now admits it as V_27_0. A malformed-description row (bad layout, buffer outside the carveout) showing simpledrm stays and no DART fault occurs. A no-regression DP2HDMI row on a cold 13.5/14.7 Mac (J314/J316 or J180 HDMI) and on one non-HDMI DCP Mac (J293/J413 internal panel).

A boot stage that lit a display may leave its display processor running
with the RTKit session it negotiated. That firmware does not repeat HELLO
or its endpoint map, so the operating system can only continue the
session if the boot stage describes it.

Document the properties the boot stage sets on the DCP node for that.
apple,rtkit-handoff ("dcp-live-v1") and apple,rtkit-buffers follow the
RTKit handoff of other co-processors handed over running; for a DCP the
buffer's device address is the DART input address, and each buffer lies
in a memory-region carveout that maps it through iommu-addresses.
apple,rtkit-version and apple,rtkit-epmap carry the negotiated protocol
version and endpoint map a DCP needs on top.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
On the 27.2 firmware the M2 Mac mini's DCPs announce the AV service of
their DP-to-HDMI converter on the classic DPAV endpoint, EPICUnit 0,
with the converter's part as its class: AppleDCPMCDP29XX for the
built-in HDMI port and AppleDCPMCDP2900 for a USB-C to HDMI adapter.
Neither class is admitted, so the service is refused with -ENODEV, its
EDID is never read and the HDMI connector reports a 0-byte EDID.

Admit both classes under the same rules as AppleDCPDP2HDMI and
DCPDP13Service. With it the M2 Mac mini's HDMI connector gets the
monitor's 256-byte EDID (name, BT.2020 colorimetry, ST 2084). New
identity cases cover both classes, a non-zero unit and another part.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
apple_rtkit_inherit_endpoints() decides which endpoints a session a boot
stage handed over has; a wrong map either leaves application endpoints
unstarted or lets RTKit accept traffic for endpoints it does not serve.

Run the importer from the source on the host with the map the M2 Mac
mini's HDMI display processor hands over on the 27.2 firmware, and check
the version rules, the management endpoint, unknown system endpoints and
the full endpoint range. The test also checks that the map replaces the
assumed one before mailbox RX is claimed. One mutation per check makes
sure each check is exercised.

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

Describe the session a boot stage hands over with the RTKit handoff
properties other co-processors use: apple,rtkit-handoff ("dcp-live-v1")
and apple,rtkit-buffers in <ep dva_hi dva_lo size is_mapped> tuples, plus
apple,rtkit-version and apple,rtkit-epmap, instead of a parallel set of
properties with physical addresses in them.

Each buffer's physical address now comes from the DCP's own DART: it
must translate the whole buffer contiguously, and the result must lie in
one of the node's carveouts, as before. A boot stage that publishes the
old properties is not adopted and the DCP takes its normal start.

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

Copy link
Copy Markdown
Author

Four commits added on top (fast-forward, 86f405f..638611e):

  • dt-bindings for the DCP's handed-over session.
  • drm/apple: dcp: read a live DCP session from the RTKit handoff properties: the description moves to the existing apple,rtkit-handoff / apple,rtkit-buffers properties ("dcp-live-v1"), as asked in the review of display: describe a DCP handed on running, and keep its buffers mapped aura#467; the physical address now comes from the DCP's DART.
  • drm/apple: dpavservep: admit the MCDP29xx converters' AV service: gives the HDMI connector its EDID (256 bytes, was 0).
  • tools/asahi: host test for the endpoint-map import.

M2 Mac mini row at this head with aura#467 at 5017fffb, default command line: HDMI-A-1 connected, 31 modes, EDID 256 bytes, 0 failed units, 0 DART faults, Enforcing, 0 AVC. Body updated.

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

Adversarial pre-PR checklist review (§1–§6) at 638611e15e64549f27d46eb0aad3947bb4d8ee61 (checked alongside aurora-silicon/aura#467 at 5017fffb) (REQUEST_CHANGES).

Nice improvements in 86f405f5..638611e1: moving onto the existing apple,rtkit-handoff = "dcp-live-v1" + 5-cell apple,rtkit-buffers ABI with apple,dcp.yaml documentation, resolving PAs through the DCP DART with PAGE_ALIGNED(iova) + dcp_check_iova_contiguous(), adding rtkit-adopted-session-tests.py with mutations, and admitting AppleDCPMCDP29XX/AppleDCPMCDP2900 in dpavservep.c (bringing back the 256-byte HDMI EDID on J473).

Several safety, regression-scope, and §5 blockers remain at 638611e1.

Checklist Summary

  • §1 (No model gating / chicken-and-egg): Blocked — see Blockers #4 and #6 (aura#467 producer is still open, and commit abea85f0 opens cold V_27_0 on all legacy DCPs without a handoff description).
  • §2 (Production-ready / default cmdline): Blocked — see Blocker #5 (commit 86f405f5 alters cold DP2HDMI timeout behavior across all firmwares, contradicting "A DCP without the description boots as before").
  • §3 (Safety, DMA/cache aliasing & teardown): Blocked — see Blockers #1, #2, and #3.
  • §4 (Clean-room & attribution): Pass — all 8 commits carry human author/committer and human Signed-off-by: only; PR body includes Assisted-by:.
  • §5 (Evidence): Blocked — see Blocker #6 (and CI is still QUEUED/IN_PROGRESS on 638611e1).
  • §6 (Naming): Pass — clean Aurora/Linux naming throughout.

Blockers

  1. §3 (Safety — Cache-attribute aliasing / missing no-map requirement, drivers/gpu/drm/apple/dcp.c:1877 & aura#467):
    • dcp_rtkit_live_carveout() only rejects reusable and does not require no-map, and aura#467 (5017fffb, src/kboot.c:203) creates the rtkit-ep<N> reserved-memory regions with nomap = false.
    • On arm64, omitting no-map keeps those pages in the cacheable linear map (pfn_valid == true), so dcp_vmap_wc() (dcp.c:607) creates a write-combine (pgprot_writecombine) vmap() alias of cacheable pages — an architectural mismatched memory-attribute alias.
    • Require of_property_present(mem, "no-map") (as drivers/soc/apple/rtkit-helper.c:176 does) and set nomap = true in aura#467 (dcp_vmap_wc() already handles !pfn_valid via vmap_pfn()).
  2. §3 (Safety — Premature adopt_live_session & permanent resource pinning before validation, dcp.c:7512-7515, 6895-6902):
    • dcp_platform_probe_pipe() sets dcp->hw.adopt_live_session = true solely on of_property_present(dev->of_node, "apple,rtkit-handoff") before any validation.
    • dcp_comp_bind_pipe() then calls dcp_pin_live_session(dcp) (line 6895) before dcp_rtkit_live_parse() (line 6898). On a V_27_0 DCP (dcp_fail_stop(dcp) == true), any malformed/unknown apple,rtkit-handoff, invalid epmap, unmapped IOVA, or out-of-carveout buffer fails bind after permanently setting dcp->retain_dma = true and pinning the module, device, IOMMU group, and dcp context until reboot.
    • Parse and validate the handoff before setting adopt_live_session, and call dcp_pin_live_session() only after dcp_rtkit_live_parse() succeeds.
  3. §3 (Safety — dcp_comp_unbind() skips disable_irq(dcp->hdmi_hpd_irq) on retain_dma, dcp.c:7070-7116):
    • On an adopted J473 HDMI dcpext (fw_compat == DCP_FIRMWARE_V_27_0, adopt_live_session == true), dcp->retain_dma is true and dcp->hdmi_hpd_irq is active.
    • The if (dcp->retain_dma) block in dcp_comp_unbind() returns early at line 7112 without calling disable_irq(dcp->hdmi_hpd_irq) (line 7116) or disable_delayed_work_sync(&dcp->swap_watchdog_wq) (line 7123). An HDMI HPD interrupt arriving after unbind / dcp_release_rtkit() would run against a torn-down session. Disable hdmi_hpd_irq (and drain swap_watchdog_wq) in the retain_dma unbind path too.
  4. §1 / §5 (Unintended cold V_27_0 admission on all legacy DCPs, dcp.c:6302, commit abea85f0):
    • dcp_check_firmware_version() now admits any legacy-match DCP (t8103, t8112, t6000/1/2, t6020, apple,dcp, apple,dcpext) reporting a 27.x firmware-compat as DCP_FIRMWARE_V_27_0 even without apple,rtkit-handoff, sending cold boots (including J473 production Stage 2) onto an untested CPU_CONTROL_RUN + apple_rtkit_wake() + dcp_fail_stop() path instead of falling back cleanly to simpledrm.
    • Either keep this fallback gated on the live handoff description, or prove cold 27.x boots on those platforms (including J473 production Stage 2 at head).
  5. §2 / §5 (Cold DP2HDMI link-wait timeout made non-fatal for all firmwares, dcp.c:2479, commit 86f405f5):
    • Removing && dcp->fw_compat == DCP_FIRMWARE_V_13_5 makes link-config timeouts non-fatal on every cold DP2HDMI output (M1/M2 Pro/Max laptops, Mac Studio, M2/M2 Pro mini on 12.3/14.7), so a real training failure no longer withdraws the display. This contradicts "A DCP without the description boots as before."
    • Either gate the expansion on dcp->rtkit_adopted (dcp->fw_compat == DCP_FIRMWARE_V_13_5 || dcp->rtkit_adopted), or add no-regression hardware rows on cold 12.3/13.5/14.7 DP2HDMI Macs.
  6. §5 (Evidence), §1 producer dependency & CI:
    • CI on 638611e1 is still QUEUED/IN_PROGRESS (dt-checks, host-tests, rust-build, kunit, DWC3/ATC).
    • aura#467 (producer) is still open (5017fffb) and needs to land/converge on no-map.
    • Hardware rows still owed at the final head:
      1. J473 27.2 installed Stage 1 -> Stage 2 chain boot (not only one-shot), including s2idle suspend/resume and dcpext unbind/shutdown.
      2. J473 with production Stage 2 (no apple,rtkit-handoff) at head.
      3. Malformed-description negative row (unknown handoff string / buffer outside carveout) proving clean fallback to simpledrm, 0 DART faults, and no premature pinning.
      4. No-regression rows on a cold 12.3/13.5/14.7 DP2HDMI Mac (if Blocker #5 is not narrowed to rtkit_adopted) and one non-HDMI DCP Mac.

Non-blocking Technical Notes

  • Stale comment (dcp.c:2652-2654): Still says dptxport_set_hpd() "runs only for a DisplayPort connector", which is no longer true when dp2hdmi && dcp->rtkit_adopted.
  • Hardcoded port 0 on adopted release (dcp.c:4918-4935): dcp_start() only drops HPD and releases dcp->dptxport[0]; if a 2-port dcpext ever hands over a display on port 1, iterating over 0..dcp->hw.num_dptx_ports would handle both ports cleanly.
  • Buffer/epmap & DT parsing nuances (dcp.c:1975-2031, rtkit.c:2243-2331, apple,dcp.yaml):
    • dcp_rtkit_live_parse() validates t[4] <= 1 (is_mapped) and then sets b->shmem.is_mapped = true unconditionally (needed for vunmap() in dcp_rtk_shmem_destroy() — worth a brief comment).
    • count == -EINVAL || count == -ENODATA treats an absent apple,rtkit-buffers the same as an empty property (rtkit-helper.c distinguishes missing vs empty via of_find_property()).
    • apple_rtkit_inherit_endpoints() + apple_rtkit_inherit_buffers() do not verify that each inherited buffer's endpoint bit is actually set in session->epmap.
    • In apple,dcp.yaml, consider an allOf rule requiring apple,rtkit-version and apple,rtkit-epmap whenever apple,rtkit-handoff is present.

Assisted-by: LLM (Gemini 4 Neon)

A DCP that a boot stage handed over running pinned its DMA resources
until reboot before its description was checked, so an unknown handoff
string, a bad endpoint map or a buffer outside the carveouts failed the
bind with the device, module and IOMMU group already retained.

Parse and check the description first and retain the session only once
it passed. A description that fails leaves the DCP unbound with nothing
retained. That is safe because every buffer of the session must now lie
in a no-map carveout, which the kernel never hands out. A carveout in
the linear map would also alias the buffer's write-combined mapping
with a cacheable one, so such a carveout is refused as well.

apple,rtkit-buffers must be present; a session without shared buffers
has the property empty.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
"drm/apple: dcp: retrain an adopted DP2HDMI port's link" made a link
configuration timeout non-fatal on every DP2HDMI output. On a cold
start a real training failure then no longer withdrew the display.

Keep the timeout non-fatal only where no link configuration is to be
expected: on the 13.5 firmware line, which is never asked to detect the
sink, and on a session a boot stage handed over, whose link it already
trained. Fix the comment on the HPD that follows the wait.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
An unbind that retains a live DCP session returned before disabling the
HDMI HPD interrupt and the swap watchdog. An HPD edge after the unbind
then ran its handler against a session the driver had left, and the
watchdog could still fire.

Disable both on that path too, before the endpoints are quiesced.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
An adopted session's retained buffers were not checked against the
endpoint map the session came with: a crashlog, syslog, IOReport or
OSLog buffer could be inherited for an endpoint the firmware does not
have.

Refuse such a session. The host test checks the M2 Mac mini's three
buffers against its map, a map without the IOReport or OSLog endpoint,
and drops the check in one new mutation.

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

A handed-over session needs its protocol version, endpoint map and
buffers; require them with apple,rtkit-handoff. State that the regions
the buffers lie in are no-map.

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

Copy link
Copy Markdown
Author

A note from the review of #2857 (the revert of 78e59bd), since it touches this PR.

Details and logs: #2857 (comment)

@RyanTheTide

RyanTheTide commented Nov 22, 2026 •

Copy link
Copy Markdown
Author

Thanks for the review. Five new commits on top of 638611e (no history rewrite), head e2cc4ab:

  • mux: apple-display-crossbar: replace the T602x selector fields instead of OR-ing them #1 no-map: drm/apple: dcp: check a handed-over session before retaining it. dcp_rtkit_live_carveout() now accepts only a no-map, non-reusable region, so no buffer can have a cacheable linear-map alias of its write-combined mapping. aura#467 marks its rtkit-ep<N> regions no-map (producer side, same row below).
  • drm/apple: release a stale DPTX link before borrowing a Type-C route #2 pin before validation: same commit. dcp_rtkit_live_parse() now runs before dcp_pin_live_session(); a description that fails leaves the DCP unbound and nothing retained. That is safe because every buffer must lie in a no-map carveout, which the kernel never hands out. adopt_live_session still follows the property's presence at probe on purpose: it only stops Linux from writing CPU_CONTROL_RUN and sending HELLO to a processor that the boot stage says is running; the bind then refuses anything that does not check out.
  • HID: haptics for the Apple SPI trackpad #3 retained unbind: drm/apple: dcp: stop a retained DCP's HDMI HPD interrupt at unbind disables hdmi_hpd_irq and the swap watchdog on the retain_dma path too.
  • HID: haptics for the Apple SPI trackpad #4 cold 27.x admission: kept, not gated on the handoff. The M2 Mac mini's primary DCP (the one that serves its USB-C ports) also reports 27.2.0 and gets no description, because no boot stage leaves it running; gating would refuse it again. Only a DCP whose loader reports a 27.x compat with a complete method table reaches this branch; every Mac on 12.3/13.5/14.7 matches earlier and is unchanged. Production Stage 2 row at the new head below.
  • drm/apple: don't latch ->crashed when the poweroff clear swap times out #5 DP2HDMI link wait: drm/apple: dcp: keep the DP2HDMI link wait fatal on a cold start narrows it to fw_compat == DCP_FIRMWARE_V_13_5 || rtkit_adopted, as you suggested, and fixes the stale HPD comment.
  • Notes: retained buffers must belong to an endpoint in the session's map (soc: apple: rtkit: refuse a retained buffer without its endpoint, with a host case and a new mutation); a missing apple,rtkit-buffers is now an error and an empty one means no buffers; the is_mapped comment is in; the binding requires version, epmap and buffers with apple,rtkit-handoff (dependentRequired) and says the regions are no-map. Port 0 only on the adopted release stays: a boot stage lights one display, and dropping HPD on a port it never used would leave that port's HPD low, because nothing raises it again until a connect.

Testing (M2 Mac mini J473, 27.2 stub, aura-try / one-shot kernel = this head + the three USB-C commits from the follow-up PR, production default restored and verified after every row):

  • Adopted, aura#467 with no-map regions, cbc08d3e (dev-only appledrm dyndbg on this row; the default-command-line HDMI numbers below match the earlier default-command-line row at 4 commits): dcpext adopted with the no-map carveouts accepted. HDMI-A-1 connected with 31 modes and a 256-byte EDID identical to the one macOS 27.2 reads from the same monitor. Measured flip rates at 1920x1080: 180.00 / 144.00 / 120.00 / 60.00 Hz. HDR (BT2020_RGB + ST 2084 metadata) committed and read back at 120 and 60 Hz. 0 WARN, 0 DART faults, Enforcing.
  • Negative, the previous aura#467 image (regions without no-map), default command line: refused with live RTKit buffer ... is not in a DCP carveout / -EACCES: Invalid live RTKit handoff. Nothing retained (no retain message), simpledrm keeps the picture, system running with 0 failed units, 0 WARN, 0 DART faults.
  • Production Stage 2 (no apple,rtkit-handoff), default command line: the primary DCP is admitted on 27.2.0, boots RTKit cold and binds. The dcpext that this Stage 2 leaves running without a description times out in endpoint discovery (-ETIME) and apple-drm stays unbound, so simpledrm keeps the boot picture, as before this series. 0 WARN, 0 oops, 0 DART faults, only the known SEP unit failed (same as the production kernel).
  • Host: run-host-tests.py --only rtkit 21/21 (incl. the new mutation), --only dcp 34/34; checkpatch clean; dt-doc-validate and yamllint clean on apple,dcp.yaml.

Still owed: the installed Stage 1 -> Stage 2 chain boot with s2idle and a dcpext unbind/shutdown, and a cold DP2HDMI row on another HDMI Mac (M1 Pro) now that the link-wait change is narrowed back to 13.5 and adopted sessions.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Author

s2idle row on the M2 Mac mini (J473, 27.2 stub) at e2cc4ab. This blocks the merge.

One rtcwake -m freeze -s 15 on the wake-capable RTC, default command line, one-shot kernel. In every configuration where this series admits a 27.2 DCP, the Mac resets during the suspend:

Stage 2 DCPs bound s2idle
aura#467 (adopted dcpext) + kernel with the USB-C follow-up (#2868) adopted dcpext + cold primary driving a USB-C display reset
aura#467 (adopted dcpext), this series without the USB-C follow-up adopted dcpext + cold primary, no USB-C display reset
production Stage 2 (no handoff description) cold primary only (the dcpext times out and does not bind) reset
production Stage 2, current production kernel (no 27.x admission) none (simpledrm) passes

The reset is a hard one: the persistent journal of the trial boot ends before the first suspend line, pstore is empty, and the Mac comes back on its default entry. With pm_test=devices the device suspend and resume complete and the system stays up, so the reset is later: in the late/noirq phases or at idle entry. On that resume, the USB-C display on the cold primary comes back at 2560x1440@144, but the adopted dcpext does not: at suspend its DPTX remote port call 7 times out (-110), and after resume HDMI stays disconnected, although the mode set completes.

So the cold 27.x admission (your blocker 4) does regress suspend on this Mac, even when only the primary is admitted. Next: find which phase and which DCP. A kernel that admits only the primary in the adopted configuration narrows the DCP down; initcall_debug with the log streamed over the network narrows the phase. Then fix the suspend path, or keep the 27.x admission out of a DCP that cannot suspend yet.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Author

Review at e2cc4ab.

Since 86f405f the PR has gained nine commits, fast-forward. They move the description to apple,rtkit-handoff = "dcp-live-v1" plus apple,rtkit-buffers with a binding, accept only no-map carveouts, parse before pinning, stop the HPD IRQ and swap watchdog on a retained unbind, narrow the DP2HDMI link wait, refuse a retained buffer whose endpoint is not in the map, admit the MCDP29xx AV classes, and add the host test.

Our points:

  1. Second handoff ABI: fixed. The existing apple,rtkit-handoff/apple,rtkit-buffers properties are used, the PA comes from the DCP's own DART (iommu_iova_to_phys() plus a contiguity check), and apple,dcp.yaml makes version, epmap and buffers dependent on the handoff property.
  2. no-map: fixed. dcp_rtkit_live_carveout() now requires no-map and refuses reusable, and the negative row (old aura#467 image without no-map) shows the refusal, with nothing retained and simpledrm kept.
  3. Validation order: fixed for what matters. Parse now runs before dcp_pin_live_session(), and a pin failure unmaps the parsed buffers. Accepted: adopt_live_session still follows the property's presence. A stale description on a stopped DCP fails the bind (CPU_CONTROL check) rather than cold-starting. That is fail-safe, since simpledrm stays.
  4. Cold 27.x admission of every legacy-match DCP: still open, and now confirmed by your own row. With only the cold primary admitted (production Stage 2, no description), rtcwake -m freeze hard-resets the J473, and the current production kernel passes. That is exactly the regression this point was about. Until the suspend path is fixed, keep the 27.x admission out of a DCP that cannot suspend. Do that through a DT/ADT property or the handoff description, not a SoC or version check.
  5. DP2HDMI link wait: fixed. It is fatal again on a cold start, and non-fatal only for V_13_5 || rtkit_adopted.
  6. The stale HPD comment: fixed.
  7. The is_mapped cell: it is now documented as provenance only. Accepted.

New issues:

  • The branch no longer merges with integration/aurora: there are conflicts in epic/dpavservep.c, dpavservep-identity-test.c and tools/testing/selftests/drivers/gpu/apple-dcp/boot.py. Revert "drm/apple: dpavservep: admit the AFKV2 AV service on the classic DPAV endpoint" (M4 Air resets on DPMS off) #2857, the revert of the AFKV2 ep 0x28 admission, has merged. As you noted, after a rebase the MCDP29xx classes alone do not admit the mini's HDMI AV service. The EDID then needs the ep 0x28 admission back, which is the path that reset the M4 Air on DPMS off. That makes a rebase plus a J473 HDMI DPMS off/on row (with the EDID read) part of this PR.
  • The new rtkit check (a retained crashlog/syslog/ioreport/oslog buffer whose endpoint is not in the map gives -EINVAL) is correct and covered by a host mutation. There are no agent trailers and no new parameters.

Verdict: CHANGES. The s2idle reset (you flagged it as blocking) and the conflict with #2857 come first.

Rows owed at the reworked head (RyanTheTide/lab on the J473 27.2):

  • s2idle passing with the dcpext adopted, and with production Stage 2 (cold primary).
  • HDMI DPMS off/on with the EDID after the rebase.
  • An installed Stage 1 -> Stage 2 chain, not a one-shot.
  • A retained-dcpext unbind or shutdown.
  • A cold DP2HDMI no-regression row on a 13.5/14.7 Mac (J314/J316 or J180 HDMI).

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

Formal adversarial §1–§6 pre-PR checklist re-review at e2cc4ab5174d5ac8f6ea85b6ba5fb476db39d81a (REQUEST_CHANGES — critical s2idle hard-reset regression, merge conflict with merged #2857 revert / 0 CI runs, open aura#467 dependency, and owed §5 hardware rows).

Progress Since 638611e15e64 (Prior Blockers #1, #2, #3, #5 & Notes Resolved)

  • Prior Blocker #1 (no-map cache aliasing, 63649b08): Resolved — dcp_rtkit_live_carveout() now requires of_property_present(mem, "no-map") && !of_property_present(mem, "reusable"), verified on J473 with both positive (no-map) and negative (-EACCES, nothing retained) rows.
  • Prior Blocker #2 (parse before pin, 63649b08): Resolved — dcp_rtkit_live_parse() now runs before dcp_pin_live_session() (dcp.c:6907-6919), with dcp_rtkit_live_unmap() on both pin and RTKit init failure paths.
  • Prior Blocker #3 (retain_dma unbind teardown, 3fa6ec52): Resolved — dcp_comp_unbind() now disables hdmi_hpd_irq (dcp.c:7101-7102) and swap_watchdog_wq (dcp.c:7128) on the retain_dma path.
  • Prior Blocker #5 (cold DP2HDMI link wait, c170bcf2): Resolved — narrowed back to dcp->fw_compat == DCP_FIRMWARE_V_13_5 || dcp->rtkit_adopted, and stale comment updated.
  • Prior Notes (b659e739, e2cc4ab5, 63649b08): Resolved — apple_rtkit_inherit_endpoints() rejects retained buffers whose endpoint is absent from map (with host test + mutation); missing apple,rtkit-buffers is now -EINVAL; dependentRequired added to apple,dcp.yaml.

Checklist Summary

  • §1 (No model gating / chicken-and-egg): Blocked — producer aurora-silicon/aura#467 is still open, and cold V_27_0 admission (abea85f0) regresses s2idle even without a handoff description (Blocker #1).
  • §2 (Production-ready, no hacks): Blocked — s2idle hard-resets on default cmdline whenever a 27.2 DCP is admitted.
  • §3 (Safety): Blocked — hard system reset on suspend and unresolved #2857 AFKV2 ep 0x28 DPMS-off safety interaction.
  • §4 (Clean-room & attribution): Pass — all 13 commits carry human author/committer (Ryan Murray <ryan@aurorasilicon.org>) and human Signed-off-by: only (zero AI trailers in commits); PR body includes Assisted-by:.
  • §5 (Evidence): Blocked — s2idle fails (hard reset), 0 CI check-runs on e2cc4ab517 due to merge conflicts, and owed hardware rows remain.
  • §6 (Naming): Pass.

Active Blockers

  1. §1 / §2 / §3 / §5 (Critical Regression — s2idle hard-reset whenever 27.2 DCP is admitted, including cold primary without handoff):
    • As confirmed by your J473 27.2 rtcwake -m freeze row, every configuration where this series admits a 27.2 DCP — adopted dcpext + cold primary, and production Stage 2 with cold primary only (confirming Prior Blocker #4 on abea85f0) — hard-resets during s2idle, whereas the current production kernel passes s2idle. Even under pm_test=devices, adopted dcpext DPTX remote port call 7 times out (-110) at suspend and HDMI stays disconnected after resume.
    • Fix the 27.x suspend/resume path (both cold primary and adopted dcpext) or do not admit DCPs that cannot suspend without regressing s2idle (using a DT/handoff property rather than a chip/version gate).
  2. Merge conflict (CONFLICTING / DIRTY) & #2857 revert interaction (0 CI runs):
    • Branch conflicts with integration/aurora after #2857 (revert of AFKV2 ep 0x28 admission due to M4 Air DPMS-off resets) merged. On integration/aurora (dpavservep.c:48-51), wire_v2 currently admits only DPAVSERV_ENDPOINT_V2 (unit == service->channel), so rebasing AppleDCPMCDP29XX/AppleDCPMCDP2900 alone will no longer admit J473's ep=0x28/unit=0 HDMI AV service.
    • Rebase onto integration/aurora, resolve the dpavservep.c / dpavservep-identity-test.c conflicts safely (proving DPMS off/on does not regress J473 HDMI or M4 Air/J713 if ep 0x28 admission is restored), and get full CI green on the rebased head (0 check-runs ran on e2cc4ab517 because of the conflict).
  3. §1 Producer dependency & §5 Owed hardware rows (at the rebased, fixed head):
    • aurora-silicon/aura#467 (producer) must land first (§1 chicken-and-egg).
    • J473 27.2 s2idle passing with adopted dcpext AND with production Stage 2 (cold primary).
    • J473 27.2 HDMI DPMS off/on with 256-byte EDID after resolving #2857.
    • Installed Stage 1 → Stage 2 chain boot (not only aura-try one-shot) + retained-dcpext unbind/shutdown.
    • Cold DP2HDMI no-regression row on a 13.5/14.7 HDMI Mac (e.g. M1 Pro).

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Author

s2idle hold, Mac mini M2 (J473, 27.2): root cause found and fix posted as #2953.

Once Linux starts the primary DCP, that DCP keeps its firmware running through s2idle and holds its own domains. The DP audio domain (dpa0) that its firmware drives was still powered off at noirq, which resets the machine. The fix lives in the dp-audio driver, not in this PR.

Rows on fleet82 + this PR + linux#2868, default cmdline, production Stage 2:

For this PR's hold: the s2idle condition is met once #2953 lands. The DPMS-at-head and J713 MCDP rows are still with MERGETRAIN-LINUX5.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Independent source review at e2cc4ab5174d. The current head's live-session handoff needs a production-cmdline J473 row with #2953 and the USB-C route change in the same image. Include boot with HDMI absent, late plug, repeated DPMS, then s2idle with and without a USB4 peer. The Stage 2 handoff is merged, but that alone does not qualify this kernel's display or suspend path.

@RyanTheTide

RyanTheTide commented Nov 23, 2026 •

Copy link
Copy Markdown
Author

I tested a local integration of the MCDP29xx identity handling from this PR with the original classic-endpoint AV admission and the display-DART DPMS fix in #2962. The source base was integration/aurora at 48470aa. The combined tree passed the full Apple DCP host suite, 93/93 (including the four EDID checks), and an extracted production identity test against the in-tree KUnit cases, 36/36.

Admission cases
  • Classic AFKV2 endpoint 0x28: DP13, DP2HDMI and both MCDP29xx service identities accepted with unit 0 and a valid nonzero channel.
  • AFKV2 endpoint 0x2a: DP13 and DP2HDMI still require unit equal to the channel. MCDP29xx remains rejected.
  • Legacy AFK and native26 cases retain their existing outcomes. The transport checks exercised service rebind, stale publication and ordered receive.

These are host results from a provisional overlay. The default-command-line J473 combined HDMI/USB-C row and J713 DPMS with the AV service admitted are both still needed. The J713 DART DPMS fix has separate device evidence in #2962.

@RyanTheTide

Copy link
Copy Markdown
Author

J473 boot baseline for the attached-display recheck. Four fleet85 production boots registered simpledrm at 0.458–0.465 s from kernel start. Both DCPs rejected the firmware in all four boots, so native DRM did not register.

In the earlier attached HDMI development row, simpledrm registered at 0.458 s, native DRM at 2.777 s and the 1920×1080 at 120 Hz HDMI modeset completed at 4.367 s. These are software events from an earlier build. The 1.590 s between native registration and modeset completion does not measure display blanking.

The handoff producer has merged in aurora-silicon/aura#467. The current kernel head still needs its attached-display, suspend and installed-chain rows.

@RyanTheTide

Copy link
Copy Markdown
Author

I replayed the display-only conflict resolution against integration 160ca431b325. It keeps the shared RTKit buffer setup visible to KUnit and retains the narrower classic AFKV2 admission for MCDP29xx converters. The resolved tree is bbcd6e182e63. The patch applies cleanly to the stated tip.

Tests on that tree passed all 35 Apple DCP lifecycle cases. The RTKit adopted-session host test passed, and all five single-check mutations were rejected.

This is a local resolution. The broader J713 AV-service re-admission still needs an external DPMS cycle. The J473 adopted and cold-primary sleep rows, HDMI EDID and relight, and legacy cold DP2HDMI regression also remain open. The USB-C test fixture now exercises both outputs in one atomic session.

Assisted-by: LLM (Codex)

…853-merge

# Conflicts:
#	drivers/gpu/drm/apple/dcp.c
#	drivers/gpu/drm/apple/epic/dpavservep-identity-test.c
#	drivers/gpu/drm/apple/epic/dpavservep.c
@RyanTheTide

Copy link
Copy Markdown
Author

Merged integration/aurora into this branch as one merge commit, 372f94c0. No force push. It resolves the conflict with the #2857 revert:

Tests on the combined tree (integration/aurora 0f111a0d + this PR + #2868 + #2953):

  • Host tests: rtkit 21/21, dcp 44/44, atc 13/13, dptx 5/5, dcpaud 9/9.
  • arm64 QEMU Apple display KUnit: 146 pass, 1 skip, 0 fail, including apple-dcpavserv-identity.

J473 hardware (Mac mini M2, 27.2), default command line, production Stage 2 (aura main f13056d9, promoted today):

  • Both monitors run under apple-drm, with no simpledrm. The adopted HDMI dcpext reports "QG270 S3" with a 256-byte EDID and reaches 1920×1080 at 180.00 Hz, the same as macOS's MaximumRefreshRate. The USB-C output reports "MPG 325CQRXF" and reaches 2560×1440 at 144.00 Hz, also the same as macOS.
  • The paired modeset and DPMS off/on relight passed. HDR PQ was committed at 60 Hz on both outputs.
  • Enforcing, 0 AVC denials, 0 failed units.

Still blocking: s2idle. The J473 resets in the first freeze whenever a 27.2 DCP driver is bound. I reproduced it in 9 of 9 one-shots today:

Production fleet85, with both DCPs refused, passes 3/3 on the same Stage 2. With pm_test=devices the sleep survives, although HDMI reads disconnected afterwards. With pm_test=platform it survived the default 5 s hold once and reset once, and it reset with a 20 s hold. Disabling the CPU PD idle state did not help. So the reset follows the late/noirq hold while a DCP driver runs its firmware, not the CPU idle state.

Next I will find which domain the noirq phase cuts under the running DCP. Candidates are dptx_ext_phy and the ATC PHYs used for USB-C DP, which have no consumer on the wakeup path. Then I will hold that domain from the hardware description.

Rows

Lab store traces/display/20261124-m2mini-display-full/ holds rows r1b, r2 (v1 condition), r3/r3b (f82dcp2 on the new Stage 2), r4 (production s2idle 3/3), r5 (pm_test devices/platform), r6a (f82dcp2 + old Stage 2), r6c (CPU PD off), r7 (platform, 20 s) and r8. Each row was a guarded one-shot with the default command line, followed by a verified fleet85 restore.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Author

FYI: the MCDP29xx admission (e59f024, in its post-revert form from this branch's head) is split out as #3037 so the J615's USB-C to HDMI adapter case (Ryan's hands-on, AppleDCPMCDP2900 refused on fleet85) can land on its own. Once #3037 merges, this series can drop the commit or keep it as a no-op on rebase. Nothing else in this PR is touched.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Author

MERGETRAIN6 source re-review at 372f94c08ea2. The main-branch merge keeps classic converter service admission scoped to the named converter and preserves the earlier DPMS revert for the general endpoint. The producer handoff in aurora-silicon/aura#467 has merged.

Blocking: the 27-series DCP still hard-resets the J473 on s2idle without the companion PHY power-domain fix. The lab A/B points to the PHY domains. Land the companion fix before admitting the live DCP path and verify both monitors across short RTC freezes on the production DT and Stage 2. Include HDMI absent at boot with late plug and a USB-C disconnect/retrain.

Assisted-by: LLM (Codex)

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

Formal §1–§6 pre-PR checklist re-review at verified live head 372f94c08ea2f8425d53e29fa06dece7bf0d5533 (CI 10/10 green: kunit x3, dt-checks, host-tests, source, rust-build, DWC3/ATC x3).

Resolved Since e2cc4ab5174d

  • Producer dependency (aura#467): Merged (7cf9dd126832) and promoted to production Stage 2 (f13056d9).
  • Merge conflict & #2857 revert resolution (372f94c08ea2): Cleanly resolved — drivers/gpu/drm/apple/epic/dpavservep.c keeps classic AFKV2 DPAVSERV_ENDPOINT (unit == 0) strictly scoped to AppleDCPMCDP29XX and AppleDCPMCDP2900, leaving generic AppleDCPDP2HDMI / DCPDP13Service refused there (preserving #2857's M4 Air safety revert); dpavservep-identity-test and full CI are green.
  • J473 active display & DPMS row: Paired modeset, 256-byte HDMI EDID (QG270 S3, 1080p180), USB-C (MPG 325CQRXF, 1440p144), DPMS off/on relight, HDR PQ 60 Hz, Enforcing / 0 AVC / 0 failed units verified on default cmdline and production Stage 2 (f13056d9).

Checklist Summary

  • §1 No model gating: Pass in mechanism (apple,rtkit-handoff + iomfb_v27_methods), producer landed; cold/adopted 27.2 s2idle regression still depends on #2953 (Blocker 1).
  • §2 Production-ready, no hacks: Blocked — standalone s2idle hard-reset and post-resume adopted-HDMI failure (Blockers 1 & 2).
  • §3 Safety: Blocked — hard SoC reset on s2idle without #2953 (Blocker 1).
  • §4 Clean-room & attribution: Pass (all 13 feature commits carry human author/committer Ryan Murray <ryan@aurorasilicon.org> and human Signed-off-by: only, zero AI trailers in commits; PR body disclosure present; see minor note on merge commit 372f94c08ea2 below).
  • §5 Evidence: Blocked — see Blockers 1–3.
  • §6 Naming: Pass.

Remaining Blockers

  1. §2 / §3 / §5 — s2idle hard-reset regression without #2953: On integration/aurora without unmerged #2953 (which currently has failing host-tests and owed cross-Mac PHY-hold rows), admitting 27.2 DCPs on J473 still hard-resets on the first s2idle freeze (9/9 reproduces, both adopted dcpext and cold primary), whereas production fleet85 passes 3/3. #2953 must land first so merging #2853 cannot regress s2idle.
  2. §2 / §5 — Adopted HDMI dcpext fails to relight after s2idle resume: Even with #2953 (c672252b) included, as noted on #2953 (## Still to run), the adopted J473 HDMI output does not relight after s2idle resume (DPTX remote-port call 7 times out -110 at suspend, and the converter's AV service is refused -ENODEV on re-announcement leaving the CRTC off). Please fix adopted-dcpext suspend/resume or qualify the relight path before merge.
  3. §5 — Owed hardware rows still outstanding:
    • J473 s2idle pass + post-resume relight of both HDMI and USB-C on production Stage 2 / default cmdline (once #2953 lands and Blocker 2 is resolved), with 0 AVC / 0 failed units / 0 new kernel errors.
    • Installed Stage 1 → Stage 2 chain boot + retained-dcpext unbind/shutdown row.
    • Boot with HDMI absent + late plug, and a cold DP2HDMI no-regression row on a 13.5/14.7 HDMI Mac (e.g. M1 Pro).

Non-blocking Note

  • Merge commit 372f94c08ea2 has no Signed-off-by: trailer; adding one on the next update (or squashing on merge) keeps every commit in the branch signed off.

Assisted-by: LLM (Gemini 4 Neon)

… sleep

A DP AV service is taken only while the attachment it was announced for
is current: the announcement's generation must be the DCP's, and once the
generation has moved on, a Type-C output waits for its cable again. Every
sleep and DPMS cycle moves the generation on (dcp_disable_typec_work()),
also on a DCP whose output is fixed and has no Type-C cable at all.

On the M2 Mac mini the HDMI port is such a fixed output: its MCDP29xx
converter's AV service was admitted at boot, but after the first s2idle the
re-announced service was refused (-ENODEV, generation 2, no cable) on every
wake, so HDMI lost the service that publishes its EDID.

A fixed output that no Type-C display has borrowed has no cable to wait
for. Admit its services from the current generation; one announced before
the sleep still is not taken after it.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Build the real dcpavserv_admission_current() and dcp_is_typec_output()
against a small model: a fixed HDMI output at boot and after a sleep, a
stale announcement, quiescing, a physically absent display, a Type-C
output before attach, unplugged and plugged, an HDMI port a Type-C display
borrowed, and a fixed USB-C output. Four mutations (the old cable wait, no
generation check, no cable check, no quiescing check) must fail.

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

Copy link
Copy Markdown
Author

Pushed two commits. 7fa1b919 takes a fixed output's DP AV service again after a sleep, and 06e155e8 adds its host test.

What was wrong. Every sleep and DPMS cycle moves the DCP's generation forward, and a DCP with a fixed output does this too. The admission check then made the J473's HDMI port wait for a Type-C cable it will never have. After the first s2idle, the MCDP29xx AV service was refused (-ENODEV, generation 2, cable 0) on every wake. A lab print in row r11 showed this directly.

What changed. A fixed output that no Type-C display has borrowed is admitted from the current generation. An announcement made before the sleep is still not taken after it.

Testing

  • J473 r12: the AV service was admitted after each of 5 resumes, and s2idle passed 5/5. It ran with #2953's DP PHY hold, which fixes the s2idle reset.
  • Host test dpavserv-admission-tests.py: 11 states, 4 mutations killed. arm64 QEMU display KUnit: 146 pass, 1 skip.

Still open. HDMI does not light again after resume. The converter pulses HPD, then the HDMI path disconnects port 0 after the debounced HPD goes high. I am root-causing that next. USB-C lights again on its own.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Author

MERGETRAIN6 re-review at 06e155e8efac. Blocking: none in the fixed-output admission delta. It still checks the current generation and the quiescing and physical-absence fences. A borrowed Type-C route still requires its cable state. R13 with the companion keep-link and PHY changes brought both outputs back on all five wakes.

This branch's host-tests job still fails in the Apple DCP suite. Please use that job's failure artifact, then attach the successful J473 R13 source receipt and the J615/J713 converter and DPMS peer rows to the final green head.

Assisted-by: LLM (Codex)

dcpavserv_admission_current() now asks dcp_is_typec_output() whether the
output waits for a Type-C cable. The service-rebind, provider-admission,
publication-hpd and panel-dimensions units build it from dpavservep.c and
model a Type-C output: declare the helper there, and define it as such
where the scenario does not already.

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

Copy link
Copy Markdown
Author

J473 combined hardware row at 2e95be317a1b. J473 exercised the signed combined kernel adec412c0223 and Stage 2 735f11c86f88 on the default command line. HDMI and USB-C DP were connected and enabled before and after 3/3 same-boot suspend cycles. The display matrix and shared output regressions remain open. Combined run and source receipt

Assisted-by: LLM (Codex)

@RyanTheTide
RyanTheTide merged commit a61748e into integration/aurora Nov 24, 2026
10 checks 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.

2 participants