Repository navigation
drm/apple: adopt a DCP handed over running (M2 Mac mini HDMI on 27.2) - #2853
Conversation
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>
|
Review at 86f405f.
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>
|
Four commits added on top (fast-forward, 86f405f..638611e):
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
left a comment
There was a problem hiding this comment.
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#467producer is still open, and commitabea85f0opens coldV_27_0on all legacy DCPs without a handoff description). - §2 (Production-ready / default cmdline): Blocked — see Blocker #5 (commit
86f405f5alters 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 includesAssisted-by:. - §5 (Evidence): Blocked — see Blocker #6 (and CI is still
QUEUED/IN_PROGRESSon638611e1). - §6 (Naming): Pass — clean Aurora/Linux naming throughout.
Blockers
- §3 (Safety — Cache-attribute aliasing / missing
no-maprequirement,drivers/gpu/drm/apple/dcp.c:1877&aura#467):dcp_rtkit_live_carveout()only rejectsreusableand does not requireno-map, andaura#467(5017fffb,src/kboot.c:203) creates thertkit-ep<N>reserved-memory regions withnomap = false.- On arm64, omitting
no-mapkeeps those pages in the cacheable linear map (pfn_valid == true), sodcp_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")(asdrivers/soc/apple/rtkit-helper.c:176does) and setnomap = trueinaura#467(dcp_vmap_wc()already handles!pfn_validviavmap_pfn()).
- §3 (Safety — Premature
adopt_live_session& permanent resource pinning before validation,dcp.c:7512-7515, 6895-6902):dcp_platform_probe_pipe()setsdcp->hw.adopt_live_session = truesolely onof_property_present(dev->of_node, "apple,rtkit-handoff")before any validation.dcp_comp_bind_pipe()then callsdcp_pin_live_session(dcp)(line 6895) beforedcp_rtkit_live_parse()(line 6898). On aV_27_0DCP (dcp_fail_stop(dcp) == true), any malformed/unknownapple,rtkit-handoff, invalidepmap, unmapped IOVA, or out-of-carveout buffer fails bind after permanently settingdcp->retain_dma = trueand pinning the module, device, IOMMU group, anddcpcontext until reboot.- Parse and validate the handoff before setting
adopt_live_session, and calldcp_pin_live_session()only afterdcp_rtkit_live_parse()succeeds.
- §3 (Safety —
dcp_comp_unbind()skipsdisable_irq(dcp->hdmi_hpd_irq)onretain_dma,dcp.c:7070-7116):- On an adopted J473 HDMI
dcpext(fw_compat == DCP_FIRMWARE_V_27_0,adopt_live_session == true),dcp->retain_dmaistrueanddcp->hdmi_hpd_irqis active. - The
if (dcp->retain_dma)block indcp_comp_unbind()returns early at line 7112 without callingdisable_irq(dcp->hdmi_hpd_irq)(line 7116) ordisable_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. Disablehdmi_hpd_irq(and drainswap_watchdog_wq) in theretain_dmaunbind path too.
- On an adopted J473 HDMI
- §1 / §5 (Unintended cold
V_27_0admission on all legacy DCPs,dcp.c:6302, commitabea85f0):dcp_check_firmware_version()now admits any legacy-match DCP (t8103,t8112,t6000/1/2,t6020,apple,dcp,apple,dcpext) reporting a 27.xfirmware-compatasDCP_FIRMWARE_V_27_0even withoutapple,rtkit-handoff, sending cold boots (including J473 production Stage 2) onto an untestedCPU_CONTROL_RUN+apple_rtkit_wake()+dcp_fail_stop()path instead of falling back cleanly tosimpledrm.- 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).
- §2 / §5 (Cold DP2HDMI link-wait timeout made non-fatal for all firmwares,
dcp.c:2479, commit86f405f5):- Removing
&& dcp->fw_compat == DCP_FIRMWARE_V_13_5makes 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.
- Removing
- §5 (Evidence), §1 producer dependency & CI:
- CI on
638611e1is stillQUEUED/IN_PROGRESS(dt-checks,host-tests,rust-build,kunit, DWC3/ATC). aura#467(producer) is still open (5017fffb) and needs to land/converge onno-map.- Hardware rows still owed at the final head:
- J473 27.2 installed Stage 1 -> Stage 2 chain boot (not only one-shot), including s2idle suspend/resume and
dcpextunbind/shutdown. - J473 with production Stage 2 (no
apple,rtkit-handoff) at head. - Malformed-description negative row (unknown handoff string / buffer outside carveout) proving clean fallback to
simpledrm, 0 DART faults, and no premature pinning. - 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.
- J473 27.2 installed Stage 1 -> Stage 2 chain boot (not only one-shot), including s2idle suspend/resume and
- CI on
Non-blocking Technical Notes
- Stale comment (
dcp.c:2652-2654): Still saysdptxport_set_hpd()"runs only for a DisplayPort connector", which is no longer true whendp2hdmi && dcp->rtkit_adopted. - Hardcoded port 0 on adopted release (
dcp.c:4918-4935):dcp_start()only drops HPD and releasesdcp->dptxport[0]; if a 2-portdcpextever hands over a display on port 1, iterating over0..dcp->hw.num_dptx_portswould handle both ports cleanly. - Buffer/epmap & DT parsing nuances (
dcp.c:1975-2031,rtkit.c:2243-2331,apple,dcp.yaml):dcp_rtkit_live_parse()validatest[4] <= 1(is_mapped) and then setsb->shmem.is_mapped = trueunconditionally (needed forvunmap()indcp_rtk_shmem_destroy()— worth a brief comment).count == -EINVAL || count == -ENODATAtreats an absentapple,rtkit-buffersthe same as an empty property (rtkit-helper.cdistinguishes missing vs empty viaof_find_property()).apple_rtkit_inherit_endpoints()+apple_rtkit_inherit_buffers()do not verify that each inherited buffer's endpoint bit is actually set insession->epmap.- In
apple,dcp.yaml, consider anallOfrule requiringapple,rtkit-versionandapple,rtkit-epmapwheneverapple,rtkit-handoffis 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>
|
A note from the review of #2857 (the revert of 78e59bd), since it touches this PR.
Details and logs: #2857 (comment) |
|
Thanks for the review. Five new commits on top of 638611e (no history rewrite), head e2cc4ab:
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):
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) |
|
s2idle row on the M2 Mac mini (J473, 27.2 stub) at e2cc4ab. This blocks the merge. One
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 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; Assisted-by: LLM (Claude:Opus 5.5) |
|
Review at e2cc4ab. Since 86f405f the PR has gained nine commits, fast-forward. They move the description to Our points:
New issues:
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):
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
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-mapcache aliasing,63649b08): Resolved —dcp_rtkit_live_carveout()now requiresof_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 beforedcp_pin_live_session()(dcp.c:6907-6919), withdcp_rtkit_live_unmap()on both pin and RTKit init failure paths. - Prior Blocker #3 (
retain_dmaunbind teardown,3fa6ec52): Resolved —dcp_comp_unbind()now disableshdmi_hpd_irq(dcp.c:7101-7102) andswap_watchdog_wq(dcp.c:7128) on theretain_dmapath. - Prior Blocker #5 (cold DP2HDMI link wait,
c170bcf2): Resolved — narrowed back todcp->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 frommap(with host test + mutation); missingapple,rtkit-buffersis now-EINVAL;dependentRequiredadded toapple,dcp.yaml.
Checklist Summary
- §1 (No model gating / chicken-and-egg): Blocked — producer
aurora-silicon/aura#467is still open, and coldV_27_0admission (abea85f0) regressess2idleeven without a handoff description (Blocker #1). - §2 (Production-ready, no hacks): Blocked —
s2idlehard-resets on default cmdline whenever a 27.2 DCP is admitted. - §3 (Safety): Blocked — hard system reset on suspend and unresolved
#2857AFKV2 ep0x28DPMS-off safety interaction. - §4 (Clean-room & attribution): Pass — all 13 commits carry human author/committer (
Ryan Murray <ryan@aurorasilicon.org>) and humanSigned-off-by:only (zero AI trailers in commits); PR body includesAssisted-by:. - §5 (Evidence): Blocked —
s2idlefails (hard reset), 0 CI check-runs one2cc4ab517due to merge conflicts, and owed hardware rows remain. - §6 (Naming): Pass.
Active Blockers
- §1 / §2 / §3 / §5 (Critical Regression —
s2idlehard-reset whenever 27.2 DCP is admitted, including cold primary without handoff):- As confirmed by your J473 27.2
rtcwake -m freezerow, every configuration where this series admits a 27.2 DCP — adopteddcpext+ cold primary, and production Stage 2 with cold primary only (confirming Prior Blocker #4 onabea85f0) — hard-resets durings2idle, whereas the current production kernel passess2idle. Even underpm_test=devices, adopteddcpextDPTX 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 regressings2idle(using a DT/handoff property rather than a chip/version gate).
- As confirmed by your J473 27.2
- Merge conflict (
CONFLICTING/DIRTY) ଩revert interaction (0 CI runs):- Branch conflicts with
integration/auroraafter#2857(revert of AFKV2 ep0x28admission due to M4 Air DPMS-off resets) merged. Onintegration/aurora(dpavservep.c:48-51),wire_v2currently admits onlyDPAVSERV_ENDPOINT_V2(unit == service->channel), so rebasingAppleDCPMCDP29XX/AppleDCPMCDP2900alone will no longer admit J473'sep=0x28/unit=0HDMI AV service. - Rebase onto
integration/aurora, resolve thedpavservep.c/dpavservep-identity-test.cconflicts safely (proving DPMS off/on does not regress J473 HDMI or M4 Air/J713 if ep0x28admission is restored), and get full CI green on the rebased head (0 check-runs ran one2cc4ab517because of the conflict).
- Branch conflicts with
- §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
s2idlepassing with adopteddcpextAND 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-tryone-shot) + retained-dcpextunbind/shutdown. - Cold DP2HDMI no-regression row on a 13.5/14.7 HDMI Mac (e.g. M1 Pro).
Assisted-by: LLM (Gemini 4 Neon)
|
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
left a comment
There was a problem hiding this comment.
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.
|
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
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. |
|
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. |
|
I replayed the display-only conflict resolution against integration 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
|
Merged
Tests on the combined tree (
J473 hardware (Mac mini M2, 27.2), default command line, production Stage 2 (aura main
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 Next I will find which domain the noirq phase cuts under the running DCP. Candidates are RowsLab store Assisted-by: LLM (Claude:Opus 5.5) |
|
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, Assisted-by: LLM (Claude:Opus 5.5) |
|
MERGETRAIN6 source re-review at 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
left a comment
There was a problem hiding this comment.
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 &
#2857revert resolution (372f94c08ea2): Cleanly resolved —drivers/gpu/drm/apple/epic/dpavservep.ckeeps classic AFKV2DPAVSERV_ENDPOINT(unit == 0) strictly scoped toAppleDCPMCDP29XXandAppleDCPMCDP2900, leaving genericAppleDCPDP2HDMI/DCPDP13Servicerefused there (preserving#2857's M4 Air safety revert);dpavservep-identity-testand 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.2s2idleregression still depends on#2953(Blocker 1). - §2 Production-ready, no hacks: Blocked — standalone
s2idlehard-reset and post-resume adopted-HDMI failure (Blockers 1 & 2). - §3 Safety: Blocked — hard SoC reset on
s2idlewithout#2953(Blocker 1). - §4 Clean-room & attribution: Pass (all 13 feature commits carry human author/committer
Ryan Murray <ryan@aurorasilicon.org>and humanSigned-off-by:only, zero AI trailers in commits; PR body disclosure present; see minor note on merge commit372f94c08ea2below). - §5 Evidence: Blocked — see Blockers 1–3.
- §6 Naming: Pass.
Remaining Blockers
- §2 / §3 / §5 —
s2idlehard-reset regression without#2953: Onintegration/aurorawithout unmerged#2953(which currently has failinghost-testsand owed cross-Mac PHY-hold rows), admitting 27.2 DCPs on J473 still hard-resets on the firsts2idlefreeze (9/9 reproduces, both adopteddcpextand cold primary), whereas production fleet85 passes 3/3.#2953must land first so merging#2853cannot regresss2idle. - §2 / §5 — Adopted HDMI
dcpextfails to relight afters2idleresume: Even with#2953(c672252b) included, as noted on#2953(## Still to run), the adopted J473 HDMI output does not relight afters2idleresume (DPTX remote-port call 7 times out-110at suspend, and the converter's AV service is refused-ENODEVon re-announcement leaving the CRTC off). Please fix adopted-dcpextsuspend/resume or qualify the relight path before merge. - §5 — Owed hardware rows still outstanding:
- J473
s2idlepass + post-resume relight of both HDMI and USB-C on production Stage 2 / default cmdline (once#2953lands and Blocker 2 is resolved), with 0 AVC / 0 failed units / 0 new kernel errors. - Installed Stage 1 → Stage 2 chain boot + retained-
dcpextunbind/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).
- J473
Non-blocking Note
- Merge commit
372f94c08ea2has noSigned-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>
|
Pushed two commits. 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 ( 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
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) |
|
MERGETRAIN6 re-review at This branch's 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>
|
J473 combined hardware row at Assisted-by: LLM (Codex) |
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:
apple_rtkit_wake()times out (endpoint discovery failed: -62) and apple-drm does not bind. simpledrm keeps the boot picture.AppleDCPMCDP29XXon firmware 27, which is refused, so the EDID is never read (0-byte EDID property).Change
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.hw.adopt_live_sessionfollows the property, not the firmware version. A retained unbind also stops the HDMI HPD interrupt and the swap watchdog.AppleDCPMCDP29XXfor the built-in HDMI port,AppleDCPMCDP2900for a USB-C to HDMI adapter) under the same rules asAppleDCPDP2HDMI. That service carries the EDID.apple,rtkit-handoff = "dcp-live-v1"andapple,rtkit-buffers(<ep dva_hi dva_lo size is_mapped>, the device address being the DART input address), plusapple,rtkit-versionandapple,rtkit-epmap, which a DCP needs on top. Documented inapple,dcp.yaml, which requires version, epmap and buffers withapple,rtkit-handoff.rtkit-adopted-session-tests.pyruns 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.
-ETIMEin endpoint discovery, apple-drm unbound, simpledrm 1920x1080.-EACCES, nothing retained, simpledrm keeps the picture, 0 failed units, 0 DART faults.tools/asahi/run-host-tests.py --only rtkit21/21 (incl. the new test and its 5 mutations),--only dcp34/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-validateand yamllint clean onapple,dcp.yaml.Still to run
vrr_capablestays 0 on both monitors, as macOS 27.2 reportsSupportsVariableRefreshRate = Nofor 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-memoryiommu-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_mapped1, in the asc-firmware carveout), syslog and ioreport (loader-allocated,is_mapped0). The first rows used a parallelapple,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:0until 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)