Skip to content

drm/asahi: g15: admit the T6030 GPU by SoC and firmware identity, not by board - #2438

Draft
RyanTheTide wants to merge 2 commits into
mainfrom
hack/asahi-retry-b
Draft

RyanTheTide wants to merge 2 commits into
mainfrom
hack/asahi-retry-b

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown

Problem

Native G15 admission on the T6030 (M3 Pro) refused every machine that is not apple,j514s or apple,j516s. asahi_g15_board() (drivers/gpu/drm/asahi/g15/glue.c:209-214 at 0abc2f3) is checked in admit() (g15/boot.rs:466), asahi_g15_pmp_prepare() and asahi_g15_pmp_get(). The pinned B0 firmware build was also listed twice in g15/hw.rs, once per board, with each row pinned to its machine. The list is the set of boards the generation was first qualified on (1633fb9, "the boards the generation was qualified on"). It names no hardware difference.

Change

Admission on T6030 now rests on the hardware and firmware properties it already checks:

  • The platform device is the apple,agx-t6030 GPU node, and the PMP helpers check that node again.
  • The machine is apple,t6030: the configuration's machine compatible, now checked first on T6030 as it already was on T6031.
  • The PMP supplier and its AGX bridge must be up.
  • The boot loader's ADT export must hold the GPU regions and the four exact reserved UAT regions.
  • The loaded firmware TEXT must match a pinned build by size, GKTS marker and SHA-256.

The board images come from the hash-checked templates, patched with the ADT's own performance states.

The J514S and J516S boot chains load the same B0 image: identical sizes, marker and digest, as measured in 986132e. That build is now listed once, as a T6030 build that names no board. The stub-firmware row is unchanged.

T6031 keeps its apple,j516c pin. Its board record's reference words and measured layout are that machine's and not the J514C's, which is a hardware reason (g15/hw/t6031.rs:162).

Every T6030 machine in the tree (t6030-j514s.dts, t6030-j516s.dts) is a J514S or J516S, so nothing changes on existing hardware. A machine is now refused only by a missing supplier, a missing ADT export or unknown firmware, and each of those has its own message.

The host tests follow the change:

  • g15-maintained-handoff-tests.py checks the single unpinned B0 row.
  • g15-zero-words-tests.py refreshes its two hw.rs pins. Only the firmware table changed, and no board data, template or word.
  • The PMP bridge fixtures lose the board stub. They keep the GPU-compatible and missing-node rejections.

Testing

  • Combined tree with the companion G17 change (bd796f07), release config, ARCH=arm64 LLVM=1: make prepare and make drivers/gpu/drm/asahi/ build, and W=1 on g15/glue.o gives 0 warnings. The module's 13 remaining rustc warnings are existing dead_code warnings in g17/g16/mmu/regs; none is in the touched code.
  • Host tests pass:
    • tools/asahi/g15-maintained-handoff-tests.py --mutations: actual passes, all mutants fail as intended.
    • tools/asahi/g15-zero-words-tests.py --mutations: rc 0.
    • tools/asahi/t6030-display-admission-tests.py --mutations: control passes, 8/8 mutants caught.
    • tools/testing/selftests/drivers/gpu/asahi-g15/run.py: rc 0, Rust host suite 81 passed, 2 ignored.

Still to run

  • J514S or J516S (M3 Pro), when one is on the bench: boot with CONFIG_DRM_ASAHI_G15. Expect "GPU firmware build: T6030 B0 RTKit-2419.140.12 (maintained 14.x handoff)" (before: the J514S or J516S row name), "M3: firmware identity accepted", and a render node. Then run vkmark --winsys headless and glmark2-es2-drm --off-screen, expecting N/N pass and 0 device losses.
  • None of the Neo, J616s, M1 Pro or M2 builds or reaches the G15 backend: no row there.

Thanks to Eryk Wieliczko, who wrote the G15 generation and its admission, and to Jeppe Bylov, who measured the J514S B0 build.

Hardware rows (combined test kernel, 2026-11-20)

This change was booted in a combined test kernel: integration/aurora 0abc2f3 plus the open gate-sweep drafts plus this and the related drafts (7.3.0-aurora-hk2/pwr1/hk3). It ran once on each lab Mac (M1 Pro J316s, M2 J413, J616s, Neo J700) and was compared against the production kernel on the same Mac, using the same silent row script:

  • kernel errors, failed units and SELinux denials;
  • microphone capture byte counts;
  • camera frame counts;
  • USB speeds;
  • panel brightness steps;
  • every retry/refusal message these drafts touch;
  • 2 s2idle cycles on M1 Pro, M2 and J616s.

M1 Pro, M2 and J616s matched production on every row, apart from the new counters and lines the drafts add. The Neo row found the old-DTB display regression that #2358's follow-up commit fixes.

This PR: No lab Mac has a T6030; boot-clean regression rows only.

… by board

Native G15 admission on the T6030 refused any machine that is not
apple,j514s or apple,j516s (asahi_g15_board(), checked in admit(),
asahi_g15_pmp_prepare() and asahi_g15_pmp_get()), and the pinned B0
firmware build was listed twice, once per board, each row pinned on its
machine. The board list was the set the generation was first qualified
on; it names no hardware difference.

What admission depends on is already checked by hardware and firmware
properties: the platform device is the apple,agx-t6030 GPU node (also
checked again by the PMP helpers), the machine is apple,t6030, the PMP
supplier and its AGX bridge must be up, the boot loader's ADT export
must hold the GPU regions and the four reserved UAT regions, and the
loaded firmware TEXT must match a pinned build by size, GKTS marker and
SHA-256. The board images come from hash-checked templates patched with
the ADT's own performance states. The J514S and J516S load the same B0
image (986132e), so its identity does not depend on the board.

Check the configuration's machine compatible on T6030 as on T6031
(apple,t6030 here; T6031 keeps its apple,j516c pin, whose board record
reference words and measured layout are that machine's), drop the board
helper, and list the B0 build once, unpinned.
Every T6030 machine in the tree is a J514S or J516S, so nothing changes
on today's hardware; a T6030 machine would now be refused only by a
missing supplier, ADT export or unknown firmware, each with its own
message. The maintained-handoff host test checks the single row.

Credit: Eryk Wieliczko wrote the G15 generation and its admission;
Jeppe Bylov measured the J514S B0 build.

Fixes: 1633fb9 ("drm/asahi: g15: Add the UAPI glue and register the G15 generation")
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Author

Blockers: 1.

  1. host-tests fails on this head (run 44564128933, g15-display-order-tests). That test was not updated: admit() now calls glue::machine() first on T6030 (g15/boot.rs:460). The test still stubs glue::board() (tools/asahi/g15-display-order-tests.py:333) and expects the old call order: with_tail(&["board", "pmp"]) at :363, vec!["board", "pmp"] at :364, and the same at :388 and :391. CI fails with left: ["machine", "pmp", ...] right: ["board", "pmp", ...]. Fix: drop the board stub and its State.board field (:283/:286/:349/:375), and expect ["machine", "pmp"]. Also add a T6030 case with machine: false that expects ENODEV and no pmp call. Without it, nothing catches the machine check moving back behind the PMP vote. The PR body lists the host tests that pass, but this one was not run.

The rest checks out. With machine: None, identity.rs:99 (map_or(true, ...)) qualifies the single B0 row on any T6030. That row's size, marker and SHA-256 are unchanged from the two removed rows. asahi_g15_pmp_prepare() and asahi_g15_pmp_get() (g15/glue.c:131, :174) still refuse anything that is not apple,agx-t6030. T6031 keeps its machine check, now on the shared path. Only the commit's own human sign-off is present.

HW row: J514S or J516S on this head with CONFIG_DRM_ASAHI_G15. Expect "GPU firmware build: T6030 B0 RTKit-2419.140.12 (maintained 14.x handoff)", a render node, vkmark and glmark2 N/N with 0 device losses, 0 AVC, 0 failed units and no new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Author

The J514S/J516S board check (asahi_g15_board()) and the two per-board B0 firmware rows are still on integration/aurora (4a17f73); none of this branch's files changed on the tip, so it applies cleanly. host-tests fails on this head: tools/asahi/g15-display-order-tests.py still stubs glue::board() and expects the ["board", "pmp"] call order; it needs the machine order plus a T6030 machine: false case. It also needs a J514S or J516S row on this head (firmware identity accepted, render node, vkmark and glmark2 with no device loss). #2146 edits the same firmware table in g15/hw.rs, so whichever lands second will need a rebase.

admit() no longer asks for a J514S/J516S board on T6030: it checks the
configuration's machine compatible first, as it already did on T6031,
and then takes the PMP vote. The admit() model still stubbed
glue::board() and expected the old ["board", "pmp"] call order, so the
control failed:

  left:  (Ok(()), ["machine", "pmp", "adt", ...])
  right: (Ok(()), ["board", "pmp", "adt", ...])

Drop the board stub and its state, and expect ["machine", "pmp"] on
the four T6030 rows. Add a T6030 row for a machine that is not a
T6030: it must be refused with -ENODEV before any PMP vote. Two new
admit() mutants keep that honest: one moves the machine check behind
the PMP vote or display wait, one checks the machine on T6031 only.
Both must fail the control.

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

Copy link
Copy Markdown
Author

Host-test blocker fixed in 1dc2531: g15-display-order-tests follows the machine check instead of the old board stub (T6030 rows expect machine then pmp), adds a T6030 machine: false row (ENODEV, no PMP vote) and two admit() mutants (check after the vote, T6030 unchecked) that must fail.

Testing: run-host-tests.py --only g15: g15-display-order-tests and asahi-g15 now ok (5 static checks, 8 scenarios, 12 C mutants, 4 admit() mutants). g15-pb-growth/g15-stats-drain time out locally both before and after (our partial clone lacks the old revision their control reads); CI's full clone should run them.
Still to run: J514s/J516s owner row.

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.

1 participant