Skip to content

drm/apple, iommu: apple-dart: drive the M4 MacBook Air's internal panel on macOS 27.2 (v27 backend, on #2541's rebase) - #2818

Merged
RyanTheTide merged 34 commits into
mainfrom
j713-disp3/dcp272-internal
Nov 26, 2026
Merged

RyanTheTide merged 34 commits into
mainfrom
j713-disp3/dcp272-internal

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What

Runs the M4 MacBook Air's (J713) internal panel when the boot loader hands over the internal DCP with the macOS 27.2 image. This replaces #2590.

  • drm/apple: admits that handed-over internal DCP to the v27 backend.
  • iommu: apple-dart: keeps the internal display DARTs' locked roots and maps the firmware segments with the protection their live leaves have.
  • DT: adds the internal DCP's bandwidth slot and the apple,panel node.

fw_mirror is decided by the DART's own state: locked, no reserved-table handoff, not borrowed. It no longer depends on the 27.2 firmware version or image UUID (0469085, ef48113). On T8132 it takes only the DARTs that an available apple,t8132-dcp carrying apple,clock-ids names. So the PMP DART (380300000) and the external DCP DARTs keep their current paths. No kernel or module parameter is needed, and nothing is gated on a board.

Tested: J713 pass at ef48113 (merged onto main 70e700c with #2541, #2819 and #2434; default cmdline, unchanged Stage 2): eDP-1 2560x1664 enabled, backlight 400/500, both internal display DARTs "locked roots kept (mirror)", s2idle 1/1, gpubench VK+GL pass, Enforcing, 0 AVC. Host tests: dart 16/16, dcp 65/65, display-gate 1/1. Arm64 W=1 build of the touched files is clean.

Risk: two-way (revert restores the previous selection). Macs: J713. The shared apple_dart_selects_fw_mirror() also runs on T6041/T6050/T8140/T8142, which keep the same result (all their DARTs qualify). The widened leaf-protection hook only changes a region whose live leaves already disagree with the request, and attach already refused that case.

Not yet

Details

…h slot

The firmware-27 DCP backend asks for apple,bw-scratch before it binds
("Incompatible devicetree!" without it). The T8132 internal DCP's slot is
in the PMC window it already has as disp-4: bandwidth agent 0, the one the
ADT's /arm-io/disp0 bw_req interrupt (BIRQ 0x35) names in the PMGR
bwr-agent table, 0x20000 into the window; agents are 0x4000 apart, which
puts the dcpexts' agents 3 and 4 at the pmgr_dcpext slots this tree
already has. Describe it the way the dcpexts' slots are described, inside
display window 4.

The M4 26.6.2 backend reads the same property and has run the internal
panel without a mailbox; keep it that way by taking the mailbox for an
external processor only, so nothing changes on 26.6.2.

Signed-off-by: Ryan Murray <[email protected]>
…27.2 table

On the macOS 27.2 stub the M4 MacBook Air's (J713) internal display
processor runs the 26B123 image the J773g's processors run (UUID
B3BA603C), and the M4 backend refuses it ("unqualified firmware 26.6.2
handoff"), so the panel stays on simpledrm.

Admit an internal T8132 DCP that the boot loader handed over with that
image (firmware version and compatibility 27.2.0) and with the
firmware-27 clock metadata (apple,clock-ids, from /arm-io/disp0) to the
firmware-27 backend with the 27.2 method table, before the M4 hw data is
looked at. Requiring the clocks keeps out a main DCP that a boot loader
leaves running idle without a handoff, as on the Mac mini.

It gets apple_dcp_hw_t8132_v27: 41-bit firmware DMA (apple,dma-range
<0x100 0 0x10 0> ends at 1 TiB + 64 GiB), no DPTX port service, and
adoption of the live session iBoot leaves running. No sleep support.

That the T8132 26B123 image numbers its IOMFB methods as the T6041 and
T8142 26B123 images do is the assumption the J773g dcpext admission
makes too.

Signed-off-by: Ryan Murray <[email protected]>
Build the real apple_t8132_dcp_v27_2() into the t6041-v27-admission unit
(of_property_present() mocked for apple,clock-ids) and check that the
internal processor handed over with the T8132 26B123 image and its
firmware-27 clocks runs the 27.2 table on either firmware path, and that
without the clocks, with the T6041 image, a missing UUID or another
release it is the M4 backend's on its path and nobody's off it.

Signed-off-by: Ryan Murray <[email protected]>
…ots like T6041's

On the macOS 27.2 stub the M4 MacBook Air's internal display processor
runs the 26B123 image and the firmware-27 backend. That backend DMAs
through ordinary IOMMU domains: RTKit and IOMFB shared memory on SID23,
PIODMA maps on SID16, scan-out on SID0. The borrowed J713 display path
cannot serve it. It admits only the 26.6.2 layout, so the DCP is left
without any IOMMU domain, and it reserves the whole SID23 window from
generic DMA for the M4 backend's own allocators.

When the internal DCP was handed over with the 27.2 image and its
firmware-27 clocks (apple_t8132_dcp_v27_2()), do not borrow its two
display DARTs. Give them the locked-root handling T6041's display DARTs
get on firmware 27 (fw_mirror): the firmware's live slots are kept and
Linux's mappings go into the rest. Refuse the DART if it is not locked
as expected. Nothing changes for a DCP on its 26.6.2 handoff, or for a
27.2 one without the firmware-27 clocks (the default Stage 2 hands it
over without them).

Signed-off-by: Ryan Murray <[email protected]>
…s its leaves do

On the J713's 27.2 handoff the internal display DARTs keep their
firmware's locked roots (fw_mirror). A Linux table in a slot the firmware
holds must then mirror the firmware's leaves exactly, protection included
(apple_dart_fw_slot_mirrors()). The boot loader re-exports the firmware's
own segments as iommu-addresses, and the core maps those read-write, and
uncached for this non-coherent DCP. The live leaves differ: the
firmware's text is read-only, and all of its segments are cacheable
(SID23 dump on the 27.2 stub: __TEXT flags 0x5, __DATA and the four
other segments 0x1). As it stood, the DCP's attach would refuse every
segment and leave the processor without a domain.

For such a DART, give each translated region the protection the live
leaves give every one of its pages. A region whose pages are not mapped
there, map elsewhere or disagree keeps its protection, and the attach
then refuses it as before.

Signed-off-by: Ryan Murray <[email protected]>
The firmware-27 DCP backend takes the internal connector type (eDP) and
the backlight range from the DCP's apple,panel child. The M4 26.6.2
backend never needed one, so the J713 has none, and on the 27.2 stub its
panel comes up as an 'Unknown' connector without a backlight device.

Describe the panel as on the other Airs: 2560x1664 at 224 ppi, 64 notch
rows above the desktop, and the published 500 nits maximum.

Signed-off-by: Ryan Murray <[email protected]>
Split the region walk from its device lookup and test it on a fake
locked root: read-only text pages and read-write data pages take the
protection of the leaves that map them (cacheable), a region whose leaf
maps another page keeps what it asked for, and nothing changes on a DART
that is not a 27.2 J713 display DART.

Signed-off-by: Ryan Murray <[email protected]>
…its tables, in its window

The live-leaf protection for a 27.2 J713 internal display DART's firmware
segments memremaps the stream's root straight from TTBR, and each leaf
table straight from its root entry, write-back. The rest of the driver
maps a firmware table only after apple_dart_fw_table_decode() has checked
it: a table entry with no stray bits, naming reserved RAM. An entry that
named a device's registers would get a Normal write-back mapping here.

The leaf slot also comes from DVA bits 14..35 alone, so a region outside
the stream's 64 GiB window aliases into it. The physical address match
made that harmless, but the region should not be looked up at all.

Map the root only when it is a firmware table in reserved RAM, decode
each leaf table entry with apple_dart_fw_table_decode(), and skip a
region that does not lie inside the stream's window (locked_window, the
DART's apple,dma-range until a domain attaches: 64 GiB at 1 TiB on the
display DARTs). A skipped region keeps the protection it asked for, and
the attach refuses it as before.

KUnit: the tables are now reserved pages; new cases for a region whose
two pages have different protections, a region 64 GiB above the window,
and a leaf table outside reserved RAM. All three stay unchanged.

Signed-off-by: Ryan Murray <[email protected]>
A 27.2 J713 internal display DART that the boot loader did not leave
locked is refused (-EINVAL), but the line saying so was logged with
dev_info() as one of two cases of the same message. Log the refusal with
dev_err() on its own.

Signed-off-by: Ryan Murray <[email protected]>
The T8132 internal DCP's 27.2 case in dcp_check_firmware_version() sat
between the J773g dcpext comment ("ASSUMED, NOT TRACED") and the code
that comment describes. Move it below that code; the two predicates match
different compatibles, so the order changes nothing.

Signed-off-by: Ryan Murray <[email protected]>
…s handoff

A T8132 DART took the firmware-27 path for the internal display when it
sat at one of the two J713 internal display DART addresses on the M4
firmware path and any available internal DCP anywhere was handed over
with the 27.2 image (apple_t8132_internal_dcp_v27_2(), a global scan).
The address list and the scan say nothing about whether this DART
belongs to that processor.

Ask the DART's own user instead: a T8132 DART is a 27.2 internal display
DART when an available apple,t8132-dcp that the boot loader handed over
with the 27.2 image (apple_t8132_dcp_v27_2(): image, firmware version
and its firmware-27 clocks) names it, in its own iommus (the firmware
DART) or in a child's (the PIODMA's display DART). Such a DART also
skips the "leave it untouched off the qualified firmware" refusal, which
is keyed on the same addresses: its processor was handed over.

On the J713 the same two DARTs qualify as before. Another M4 whose
internal DCP is handed over with the 27.2 image and its clocks now gets
its DARTs on the same path instead of the backend running on DARTs left
on the borrowed path. The 26.6.2 path and its address keys are
unchanged. apple_t8132_internal_dcp_v27_2() has no users left.

Link: #2621
Signed-off-by: Ryan Murray <[email protected]>
…oard

dcp_check_firmware_version() runs a T8132 internal DCP that the boot
loader handed over with the 27.2 image and its firmware-27 clocks on the
firmware-27 backend wherever it is (apple_t8132_dcp_v27_2(): processor,
image and handoff). apple_dcp_usable() still kept every apple,t8132-dcp
out of the component match unless apple_t8132_firmware_path() held,
which off 26.6.2 is true only for the J713/J715 board names. An M4
MacBook Pro handed over the same way would have probed and never bound.

Admit it on the same handoff predicate. Nothing changes on the Airs
(already on the path), on 26.6.2, or for a DCP without the 27.2 image or
its clocks (a Mac mini's parked main DCP stays out).

The t6041-v27-admission host unit now runs apple_dcp_usable() for the
T8132 internal DCP and dcpext on both paths and asserts it names no
machine; the readiness unit stubs the new helper as unreachable.

Signed-off-by: Ryan Murray <[email protected]>
A DCP whose device tree names its display power words but not its
DART streams stops the streams its DARTs have enabled before its first
power-down and enables them again at power-up. Let it read them: the
first 32 streams of a T8110 DART, read while its domain is up.

Signed-off-by: Ryan Murray <[email protected]>
…ry hw.s2r SoC

The system-sleep stop ran with an active panel only where the power
words are measured, or on the J813, so another SoC's internal DCP stayed
running into a deep sleep unless DPMS had turned its panel off first,
and the sleep was refused. A derived layout only survives probe with
appledrm.s2r_untested set, which already decides it: drop the board
check.

Signed-off-by: Ryan Murray <[email protected]>
… power words from the device tree

The M4 MacBook Air's internal DCP runs the firmware-27 backend on macOS
27.2 but has no firmware stop, so a deep sleep is refused with the
processor still running, and DPMS off only darkens the backlight.

Give it the hw.s2r stop the T8142 runs on 27.2: set_power_state(0),
D572, the AP link's release (A550 in the 27.2 table), RTKit idle and the
CPU stop, then the DCP DART's streams. It has no secure mailbox.

Its power words are not a per-SoC table: a hw.s2r DCP without a layout
in its hw data takes them from its device tree, the ones its deep sleep
lowers. DISP_CPU is the first state of its power-domains, DISP_FE that
state's parent and DISP_SYS theirs; the retention words are DISP_CPU's
apple,retention-workaround, of which only the masked bits are written,
the off value at power-off and the value read at probe at power-on;
pmc-dcp counts it where the display-power node has that word; and the
DART streams are the ones its DARTs have enabled before the first stop.
Without those properties the firmware keeps running, as before.

Signed-off-by: Ryan Murray <[email protected]>
The T8132's words are T8140's: pmc-dcp, the power manager's power
states and its power gate block.

Signed-off-by: Ryan Murray <[email protected]>
Name the power manager blocks the internal DCP's firmware-27 stop
writes, the ones the deep sleep lowers (pmc-dcp, the power states and
the power gate block), and the DCP DART's clock-protection slice (42 in
the ADT's dart-dcp) as its gapf word: the stop clears it after the
DART's power-down flush so that DISP_CPU's power state can be written.

Signed-off-by: Ryan Murray <[email protected]>
… probe, and only all of them

Review points on the device-tree power layout:

- Its DART streams were read at the first stop, with dcp_streams == 0
  standing for "not read yet". A first read of 0 would have had later
  stops and power-ons read the DART again, maybe with DISP_CPU still
  lowered, and the restart would enable no streams. Now the streams are
  read once at probe, with the firmware running. A DCP DART that reads
  none refuses the layout, and the firmware keeps running as with no
  power words.
- apple_dart_enabled_streams() read only the first enable word. If a
  stream above 31 is enabled, the 32-bit mask can't describe the DART,
  so it now reads every word up to num_streams, warns once, and reports
  0 in that case.
- Comments still described the stop as behind appledrm.s2r_untested or
  J813-only. The device tree's words stop the firmware by default; only
  a SoC whose static words are merely derived (T8142) needs the
  parameter. The same holds for the layout added in "drm/apple: dcp:
  stop a DCP for a deep sleep with its panel lit on every hw.s2r SoC",
  whose message says otherwise.

Signed-off-by: Ryan Murray <[email protected]>
…and check power word alignment

A DCP with a piodma child restores the display DART's streams at power-on
from the layout. If that DART is not found, or reads no streams (none
enabled, or streams above 31 that the 32-bit mask cannot describe), the
layout kept disp_streams = 0 and power-on would have enabled none. Refuse
the layout then, like a DCP DART that reads none: the firmware keeps
running.

The DISP_CPU/FE/SYS offsets are checked against the "ps" block without
underflowing on a block shorter than a word, and must be word aligned like
the retention offsets.

The overview comment named the old first-stop stream read; point it at
dcp_s2r_layout_streams().

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Open item before this is ready, from Dj's review of #2596 (same pattern here):

The two internal display DARTs get fw_mirror through j713_display_v27, which apple_dart_serves_t8132_dcp_v27() decides from the DCP's 27.2 handoff (apple_t8132_dcp_v27_2(): firmware version 27.2.0, the 26B123 UUID and the firmware-27 clocks). A later 27.x image would then lose the mirror and the panel with it. The DART's own state should decide this, as it already does for T6041/T8140/T8142.

What the J713 reports (PROTECT bit 0, 27.2 stub, from our boot logs): seven T8132 DARTs are locked. Six are display DARTs: dcpext0/dispext0 286340000/286300000, dcpext1/dispext1 48a340000/48a300000, and the internal 30a340000/30a300000. The seventh is the PMP DART 380300000 (protect 0x1e7, serving pmp@380500000).

Plan: key fw_mirror for apple,t8132-dart on locked && !fw_handoff && !borrowed. Borrowed would be decided by the positive 26.6.2 identification the M4 backend already uses, so anything not on that path, including later 27.x images, defaults to the mirror. That also covers #2596's J773g dcpext DARTs. It newly mirrors the PMP DART, so it lands only with a J713 row that shows the PMP firmware and its reports unchanged, next to the panel rows.

Converted to draft until then.

@RyanTheTide
RyanTheTide marked this pull request as draft November 22, 2026 15:04

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adversarial pre-PR checklist review (§1–§6) at verified live head a912b89b3c469d92a3dd00c9a812533fd053fa42: requesting changes for a real runtime-PM bug in __apple_dart_j713_v27_fw_prot(), the §1 firmware-build gating of T8132 fw_mirror (which you also noted when converting to Draft), and missing CI / rebased-head hardware evidence.

Blockers

  1. Code bug — MMIO read after pm_runtime_put() (drivers/iommu/apple-dart.c:4600-4607):

    if (pm_runtime_resume_and_get(dart->dev) < 0)
        return;
    ttbr = apple_dart_readl(dart, DART_TTBR(dart, sid, 0));
    pm_runtime_put(dart->dev);
    if (!(ttbr & dart->hw->ttbr_valid) ||
        (dart->hw->tcr_4level &&
         (apple_dart_readl(dart, DART_TCR(dart, sid)) & dart->hw->tcr_4level)))
        return;

    pm_runtime_put(dart->dev) releases the runtime-PM reference before apple_dart_readl(dart, DART_TCR(dart, sid)) runs. On apple_dart_hw_t8110, tcr_4level is non-zero (DART_T8110_TCR_FOUR_LEVEL), and apple_dart_probe() drops its probe PM ref at line 6280 for non-borrowed/non-MTP DARTs (j713_display_v27), so dart->dev can runtime-suspend before DART_TCR is read. Read both ttbr and tcr before calling pm_runtime_put(dart->dev).

  2. §1 (No firmware-version gating in DART fw_mirror):
    apple_dart_serves_t8132_dcp_v27() (drivers/iommu/apple-dart.c:5485-5499) keys T8132 fw_mirror and dart->j713_v27 on apple_t8132_dcp_v27_2() (hardcoding 27.2.0 + the 26B123 UUID), rather than deciding fw_mirror from the DART's own hardware state (locked && !fw_handoff && !borrowed) as T6041/T6050/T8140/T8142 already do. Any subsequent 27.x firmware build would lose fw_mirror and fail to attach the internal panel. Agreed with your Draft comment's plan to key T8132 fw_mirror on locked && !fw_handoff && !borrowed (and verify the PMP DART 380300000 is unaffected on hardware). Similarly, generalize the live-leaf firmware-segment protection hook from a J713/27.2-specific flag (dart->j713_v27) so it does not require per-build/per-board opt-in.

  3. Stack, CI & §5 evidence:

    • Currently Draft, stacked on unmerged Draft #2541 (djdev/j773g-272-dcpext0), with 0 CI runs executed on a912b89b. Needs #2541 landed, retargeted onto integration/aurora, and green CI (dt-checks, host-tests).
    • Once reworked, post a fresh J713 hardware row on clean integration/aurora + this PR proving: (a) internal panel (eDP-1, backlight, DPMS, s2idle, 0 DART faults, 0 failed units, 0 AVC, 0 new kernel errors), (b) PMP DART 380300000 / PMP reports unchanged under fw_mirror, and (c) J713 26.6.2 borrowed-path regression check.

What Checks Out (§2, §3, §4, §6)

  • §2 (No hacks): Runs on the default kernel command line with no new parameters.
  • §3 (Memory safety & other SoCs): Aside from the pm_runtime_put() ordering bug above, __apple_dart_j713_v27_fw_prot() validates roots via apple_dart_fw_table_ram(), leaf tables via apple_dart_fw_table_decode(), overflow-safe window bounds via locked_window[sid], exact PA matches, and uniform page protections (never widening beyond the live leaves, failing closed on mismatch). iomfb_m4.c gating bw_mailbox on if (external) preserves 26.6.2 behavior; t8132-dcp.dtsi pmgr_dcp slot (0x382820000) and t8132-j713.dts panel geometry (290x189/181 mm, 500 nits) check out. Non-T8132 SoCs and J773g's idle main DCP are unaffected. #2819 stacks cleanly on top.
  • §4 (Clean-room & attribution): Clean. All 12 commits carry human identity (Ryan Murray) and human Signed-off-by: with zero AI trailers (old #2541 Co-Authored-By history from #2590 is cleanly gone); PR body includes Assisted-by:.
  • §6 (Naming): Clean.

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Review at a912b89.

  1. drivers/iommu/apple-dart.c:4603-4606: pm_runtime_put(dart->dev) runs before the DART_TCR read in the same condition, so the TCR is read after the reference is dropped. Read TTBR and TCR together, then put.
  2. Selection is keyed on the processor's compatible, the firmware UUID and version/compat 27.2.0 from the handoff (include/linux/soc/apple/display.h:60-65), and the DARTs follow their DCP rather than their address. That is the right shape. But apple,clock-ids is used as a "was handed over" signal, and it is not one: it describes clocks. The commit messages say the default Stage 2 does not write it, so on the default boot chain this series does nothing and J713 stays on simpledrm. Please name the boot-loader change it needs and whether it is the default. If a handoff marker is the intent, check an explicit one instead of whether clock metadata is present.
  3. apple-dart.c:430, 4568, 6058-6060: the bit is j713_v27 and the log lines say "J713", but since cd2c258 no board is involved. Name it after the handoff (e.g. t8132_dcp_v27) so an M4 MacBook Pro doesn't log as a J713.
  4. apple-dart.c:6051-6064: fw_mirror also needs !fw_handoff. A DART that is locked and has a reserved-table handoff is refused with "NOT locked", which is wrong in both outcome and message. Refuse on !dart->locked and handle (or reject with its own message) the fw_handoff case.
  5. drivers/gpu/drm/apple/dcp.c:7218-7250: the new hw-data comment is placed between the J773g dcpext comment and apple_dcp_hw_t8132_dcpext_v27, so the dcpext struct has lost its comment. Put the new comment and struct after the dcpext struct.
  6. dcp.c:6036-6049: the internal DCP uses the same "ASSUMED, NOT TRACED" IOMFB numbering as the J773g dcpext. The J713 rows are then the only evidence for it. Please post them at this head: boot to appledrm on eDP-1 with the panel, backlight, a modeset and 60 Hz pacing, no DART faults, and the firmware segment ... protection lines.
  7. Rows owed at this head: J713 on 27.2 (above, plus s2idle with the panel bound). J773g on 27.2 as a no-regression row: the main DCP must still be left alone and dcpext0 must be unchanged by the apple_dcp_usable() and DART changes. J713 on 26.6.2: the M4 backend still binds and bw_mailbox is unchanged.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

J713 row (M4 MacBook Air, macOS 27.2 stub), one-shot boot of integration/aurora f1d5b24 merged with this stack (#2819 head 888805b on #2818 a912b89). Default kernel command line, unchanged Stage 2:

… PM reference

__apple_dart_j713_v27_fw_prot() took a runtime-PM reference, read the
stream's TTBR, dropped the reference and only then read DART_TCR for the
four-level check. apple_dart_probe() drops its own probe reference for
these DARTs, so the TCR read could hit a suspended DART.

Read TTBR and TCR while the reference is held, then put it. The KUnit
case now also checks that a stream whose TCR says four-level is left as
it asked.

Signed-off-by: Ryan Murray <[email protected]>
@github-actions github-actions Bot added area:display Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:all Macs affected, from Merge risk (bot) changes-requested A reviewer requested changes (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Merge readiness at 13e3abcb: not ready yet

Check Detail
CI at head running running: KUnit trusted-keys
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes no requested by DjDeveloperr
Hardware row at head no no line with the head SHA 13e3abcb, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · (revert restores the previous selection). Macs: J713. The shared appledartselectsfwmirror() also runs on T6041/T6050/T8140/T8142, which keep the same result (all their DARTs qualify). The widened leaf-protection hook only changes a region whose live leaves already disagree with the request, and attach already refused that case.

Areas: area:bringup, area:display, area:platform

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

@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 26, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Row: 7a8022a6 (#2673 tip, which carries #2818 8e87aefe = this stack + #2541 5f66e697 + main a851ca0e) on the J713 (M4 Air, 27.2 stub), default fleet cmdline, one boot, no monitor attached: 27.2: Type-C routes and display DARTs enabled for 2 dcpext(s), 6/6 display DARTs locked roots kept (mirror), apple DRM + GPU + ANE initialized, s2idle +1 on the same boot, 0 new kernel errors (parity), 0 failed units, Enforcing, gpubench pass. The rerun of the lit-monitor row (EDID, DPMS, cable pull) at this head waits for the MSI. Host tests at this head: apple-dcp 1/1, dcpext 24/24, dcp-v27 5/5, apple-dart 12/12, display-gate 1/1, t8132 4/4. (After the row, the J713's restore reboot stalled before Linux and was recovered with a VDM reboot from the J616s; the test kernel had shut down cleanly, so that is the known boot-chain issue, not this stack.)

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Nov 26, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

CI note at 8e87aefe: host-tests failed with every failing case running about 150 s before exit 1: dcpaud-sleep-hold --ref, clpc-high-power-cleanup --old-ref, compute-preempt --old-ref, dma-heap-fd --old-ref, g15-input-error --ref, g15-retention --mutations. The same cases pass locally at this head in under 3 s each (run-host-tests.py --only), so this looks like the overloaded runner, not the change. I re-ran the job once.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adversarial non-author review at 8e87aefe: no blocking findings. MERGE after #2541, once CI is green at this head (MERGETRAIN6)

Dj's three blockers from a912b89b, checked against the code at this head (the effective diff onto main a851ca0 is 27 files, +2393/-62):

  1. PM order. __apple_dart_j713_v27_fw_prot() is gone. The one new pm_runtime_resume_and_get()/pm_runtime_put() pair in apple-dart.c reads TTBR and (when tcr_4level) TCR while the DART is held, and only decides after the put. Fixed.
  2. Firmware gating of fw_mirror. apple_dart_selects_fw_mirror() returns false unless locked && !fw_handoff && !preserve_display, then takes apple_dart_keeps_locked_roots() (the same four compatibles main lists: t6041/t6050/t8140/t8142) or apple_dart_serves_t8132_dcp(). No version, UUID or board is involved in the DART decision. preserve_display is only set from the existing T8132 26.6.2 borrowed-path flags, so T6041/T6050/T8140/T8142 get exactly main's result.
  3. CI and row. The J713 exact-stack row is posted (7a8022a carries this head: 6/6 display DARTs keep their locked roots, three DCPs bound, s2idle, 0 new kernel errors). The KUnit jobs at this head are still queued. Your host-tests timeout note (cases at ~150 s on the runner, under 3 s locally) needs a green rerun before merge.

Gates (checked because of the no-gates rule): the DCP side still selects the firmware-27 backend by the handed-over image (apple_dcp_image_v27_2 with the T8132 26B123 UUID plus apple,clock-ids). That is the convention main already uses for T6041 (APPLE_T6041_DCP_26B123_UUID). The IOMFB interface belongs to the firmware image the boot loader hands over, and an unknown image fails closed (display left off, logged), never into the wrong ABI. The installer pins the stub to 26B123, so a newer image is a qualified change that adds its UUID. I don't count this as a new gate. The j713_display MMIO-address test predates this PR.

Non-blocking:

  • The dcp.c comment marks the T8132 26B123 IOMFB method numbering as "ASSUMED, NOT TRACED". The J713 rows exercise it, but keep the comment until a trace confirms it.
  • The monitor row at this head (EDID, DPMS, s2idle, cable pull) is booked; it belongs with #2673.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merged main 8c6992d (incl. #2541) into the branch: head 13e3abcb, clean auto-merge, fast-forward of 8e87aefe. Relative to 8e87aefe the merge only brings in main's own change (dcp.c +11, dcp_dropped_swap_test.c). Host tests at 13e3abcb: apple-dcp 1/1, dcpext 23/23, dcp-v27 5/5, apple-dart 10/10, display-gate 1/1, t8132 4/4. The J713 no-monitor row at 7a8022a6 (this stack's code + main a851ca0) and the non-author review at 8e87aefe both still cover this PR's code.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verdict carries to 13e3abcb: the new commit is only a merge of main (after #2541 landed). The tree this PR adds on top of current main is byte-identical to the one I reviewed at 8e87aefe. MERGE once CI is green at this head.

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed area:gpu Area from CODEOWNERS (bot) labels Nov 26, 2026
@RyanTheTide
RyanTheTide merged commit 2094ccb into main Nov 26, 2026
21 of 23 checks passed
@RyanTheTide
RyanTheTide deleted the j713-disp3/dcp272-internal branch November 27, 2026 13:21
DanteCpp pushed a commit to DanteCpp/linux that referenced this pull request Dec 1, 2026
…silicon#2818 review fix) into j713-dcpext/air-dcpext-272

apple-dart.c takes the new stack's state-keyed fw_mirror selection
(apple_dart_selects_fw_mirror(): locked, no fw_handoff, not borrowed) and
its fw_mirror leaf-protection hook in place of this branch's
j713_display_v27/t8132_dcpext_v27 flags and fw_live_prot. The Air's
external display DARTs keep this branch's behaviour through the same
helper: apple_dart_serves_t8132_dcp() now takes the processor compatible,
and a DART named (iommus, or its PIODMA child's) by an available
apple,t8132-dcpext that the boot loader handed over with its firmware
clocks (apple,clock-ids) is a fw_mirror candidate, decided before the
borrowed 26.6.2 j713_dcpext/j713_dispext classification, which it
clears. Such a DART that is not locked, or is locked with a reserved-table
handoff, is refused, as the internal one is. No image, board or chip
check is added: the candidate is keyed on the processor's handoff, as the
internal DCP's DARTs are.

Signed-off-by: Ryan Murray <[email protected]>
DanteCpp pushed a commit to DanteCpp/linux that referenced this pull request Dec 1, 2026
…ora-silicon#2819) into airs-promote/dcpext-deep-refusal

aurora-silicon#2673 now sits on aurora-silicon#2819 + the aurora-silicon#2818 review fix. The only conflict was
the T8132 hw data in dcp.c: the internal table keeps aurora-silicon#2819's sleep stop,
and the firmware-27 T8132 dcpext table gets this branch's
external_processor flag.

Signed-off-by: Ryan Murray <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) area:display Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:all Macs affected, from Merge risk (bot) changes-requested A reviewer requested changes (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants