Skip to content

drm/asahi: start the M2 Pro GPU (T6020, G14S) on GPU firmware 27.2 - #3998

Open
DjDeveloperr wants to merge 14 commits into
mainfrom
feat/t6020-g14s-v27-2
Open

DjDeveloperr wants to merge 14 commits into
mainfrom
feat/t6020-g14s-v27-2

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

What

Starts the M2 Pro GPU (T6020, G14S) when its boot loader reports GPU firmware 27.2, on the runtime that already starts G13G and G14G there. Eleven commits on main (bf7d80caf992), with review fixes pushed on top of ab7f9d1ab63b:

  1. soc: apple: pmp: add the T602x AGX vote: the PMP grants the GPU clusters on T602x 27.2 only while the AGX soc-device record (ID from the PMP's apple,tunable-soc-device table) holds a device-power vote.
  2. arm64: dts: apple: t602x: request GFX from the PMP for the GPU: a PMP report entry for soc-device GFX_, backed by ps_gfx. Since 51e809cf3c3d no DT uses it as it ships: every T602x GPU keeps ps_gfx, as on main, and the unused entry writes nothing. aura#649 moves the GPU of an M2 Pro on firmware 27.2 to the entry in its handoff; with firmware 13.5 nothing changes.
  3. drm/asahi: time 27.2 compute commands from the front of the queue: the compute timeout started at publication, so a backlog of slow commands that were all progressing was failed as a hang. The clock now restarts when a command reaches the front. Applies to G13G/G14G too.
  4. drm/asahi: start the G14S (T6020) GPU with firmware 27.2:
    • a per-family layout maps every G14G record offset to its G14X place; G14G is the identity;
    • power-up data: CS/AFR auxiliary operating points, the peak-power limiter configuration from the 13.5 shared power tables, fabric monitor tunables, active memory-cache mask, host-assisted power-up off, and the PMP AGX vote;
    • G14X queue header and scheduler context;
    • G14X compute/TA/3D commands, whose register lists the GPU fetches, so they come from the GPU read-only allocator;
    • the scene's user-buffer and control-word registers, and the parameter-buffer descriptor page;
    • failure-only diagnostics.
  5. 05ede094d569..6a2ac7dbaf18: move firmware 27.2 per-SoC data into HwConfig::v27_2 (removing the chip_id match in shared probe code), fail cleanly if the PMP AGX vote fails (and drop the unconditional APPLE_PMP Kconfig dependency), gate failed-boot fault reads on gpu_powered(), rate-limit recovery dumps, mask 0x1c9e8 with 0x4fff as on 13.5, fix pmp.h formatting, and update the three host-test harnesses.

Tested

Static checks at exact head 6a2ac7dbaf18:

  • Full run-host-tests.py (CI image) on merge with main:
    • merged onto main@5fe340acef00 (2bdab222827e): 1028/1028 PASS, 0 failures.
    • merged onto main@cebaa8a69fea (9a186229a4cb) and main@2b2681932a5c (9bca1d16eea4): 1027/1028 PASS; the sole failure (apple/pmgr-inherited, missing apple_pmgr_ps_probe_auto_enable) reproduces identically on plain main at cebaa8a69fea and 2b09f588bbd7.
    • All 3 affected harnesses (g14-v27-2-try-bind-tests.py, g14-v27-2-pool-tests.py, display26-tests.py): controls pass, all 2 pool mutations and all 9 try-bind mutations killed (exit 101).
  • Host ABI unit tests: 62/62 PASS, including the G14G identity and unchanged compute-encoder tests.
  • W=1 object builds for changed paths: 0 errors, 0 warnings in changed lines; Kconfig checks verified with APPLE_PMP=n and DRM_ASAHI=y + APPLE_PMP=m.
  • CLIPPY=1 on drivers/gpu/drm/asahi/: 0 errors, identical warning list vs baseline (0 new warnings).
  • checkpatch --strict on 05ede094d569..6a2ac7dbaf18: 0 errors, 0 warnings, 0 checks.

Pre-rebase hardware qualification (J414s M2 Pro, 16-core G14S B1, firmware 27.2, aura#649 7cdedb7f80c5, bring-up head 1ed7f1bdfb9f, boot_id=4e597297-7f3d-4036-815e-102a0881c5da):

  • DRM registered in 7 ms (/dev/dri/card0 + /dev/dri/renderD128); Vulkan 1.4.363 (Borealis), OpenGL 4.6 / GLES 3.2, and Rusticl OpenCL enumerate Apple M2 Pro (G14S B1).
  • 64-frame triangle and 100-frame 1024×1024 textured+depth 3D renders pixel-exact PASS; OpenCL fma_mad_control 8/8 PASS.
  • clpeak-3.1.0 --opencl --single-precision-compute: float 5.22, float2 5.60, float4 5.65 TFLOPS (98.7% of 16-core @ 1398 MHz peak, ABBA 0.00 variance, governor state 8 at 24.02 W peak).
  • 20s steady idle power (display ON, live GPU): 2.493 W median Total System Power (Heatpipe 0.936 W).
  • 0 GPU/MMU/RTKit faults.

Merge with main@c09b61228e62 (6a35e126703e, no conflicts; main touches none of these files except asahi/Kconfig) and the T6020-only DT commit on top:

  • LLVM=1 W=1 drivers/gpu/drm/asahi/ drivers/soc/apple/ drivers/pmdomain/apple/: builds, warnings identical to main. The eight T602x DTBs build with W=1.
  • fb5b5f56cc01 leaves the T6020 DTBs byte-identical to those at 6a2ac7dbaf18 (t6020-j414s.dtb e889ef6ffd0e).

DT-only commit on top (T6020 GPU back on ps_gfx):

  • All eight T602x DTBs build with the dtc warnings of the parent. T6021/T6022 are byte-identical; t6020-j414s.dtb is 2b6e512e51af (the parent reproduces e889ef6ffd0e).
  • Against main the DT change is the report@a node only, so firmware 13.5 has its main wiring on every T602x Mac.
  • The aura#649 rewire, run on the three T6020 DTBs on a host, gives the e889ef6ffd0e tree apart from phandle numbers, so the J414s run below stands for firmware 27.2.
  • No C or Rust file changes, so no object changes.
  • run-host-tests.py at 6a35e126703e: 1037/1039, the other two (pmp-agx-vote-tests) were stopped by the container's seccomp filter and pass without it.

Tested: J414s (M2 Pro, GPU firmware 27.2) at 6a2ac7d with aura#649 7cdedb7f80c5: GPU desktop on the panel, vkmark 1926, clpeak 5.64 TFLOPS, deqp smoke 8/8 before and after s2idle, 0 faults.
Risk: two-way · G14G/G13G compute encoder is byte-identical (unit-tested); compute front-of-queue timeout and failure-only logging apply across G14 27.2; firmware 13.5 wiring is main's on every T602x Mac; T6020 on 27.2 needs aura#649 (older aura leaves the GPU off there), and a boot loader without apple,tunable-soc-device fails that probe with ENODEV instead of warning.

Not yet

  • The J414s run above is from 6a2ac7dbaf18. It has not been repeated since the merge of main and the two DT commits (same effective tree with aura#649). Either merge order is safe: without aura#649 the GPU of a 27.2 M2 Pro stays off, and aura#649 leaves it off with a DT that lacks the entry. Only an unmerged aura#649 build older than bfa2557c does not fit this DT.
  • A run on a Mac we do not have: one T8103/T8112 machine on GPU firmware 27.2 (shared 27.2 code: probe, 3D, compute, one s2idle cycle).
  • T6020 tiles on one cluster only (single-cluster tiling).
  • The AGX vote is not released on a failed start or unbind.
  • G14G still has the compute event-slot/tracking-index order that G14X fixes; left as is pending a G14G row.

On T602x (M2 Pro, Max and Ultra) with GPU firmware 27.2, the PMP
grants the GPU clusters only while the soc-device record named AGX
holds a device-power vote, as on T6030.

Add apple_pmp_t602x_agx_vote(). It looks the record's ID up in the
PMP's apple,tunable-soc-device table (ID 11 on T6020 and T6021) and
sends the vote. It returns -EPROBE_DEFER until an available PMP has
registered and -EAGAIN while the PMP is asleep. The caller owns the
vote.

Signed-off-by: DjDeveloperr <hey@djdev.me>
Add the PMP report entry for soc-device "GFX_" (position 10 of the
ADT's iop-pmp-nub soc-device list on T6020, T6021 and T6022), backed
by ps_gfx, and make it the GPU's power domain when the PMP is used.
The PMP then sees the GPU requested whenever the GPU's domain is on.

Signed-off-by: DjDeveloperr <hey@djdev.me>
The 27.2 runtime fails compute work as hung once the front command has
run longer than COMMAND_TIMEOUT_MS. The clock starts when a command is
published, though, so when several commands are published together the
later ones also count the time spent running the commands ahead of
them. A backlog of slow commands that were all making progress was
failed although nothing had stopped.

Compute commands run in queue order: restart the next command's clock
when the one ahead of it retires.

Signed-off-by: DjDeveloperr <hey@djdev.me>
Start the M2 Pro GPU (T6020, G14S) when its boot loader reports GPU
firmware 27.2, on the runtime that already starts G13G and G14G there.

The G14S firmware's records differ from G14G's. A per-family layout
now maps every G14G offset the root writes (hardware data, power
controller, Globals, control, power and directory records) piecewise
to its G14X place, and the G14G layout is the identity. Unit tests pin
both layouts and check that the G14G and G13G records and encodings
stay byte-for-byte the same.

Power-up:
- Fill the CS and AFR auxiliary operating-point tables. Without them
  the firmware caps its performance request at state 0 and never
  powers the clusters.
- Fill the peak-power limiter configuration from the 13.5 shared power
  tables, where the G14X controller and Globals keep it. Left zero,
  the firmware programs every power budget and threshold as zero.
- Enable the fabric performance-state monitor with the chip's tunables.
- Give the firmware the active memory-cache mask, keep it off its
  host-assisted power-up path, and vote AGX with the PMP before the
  run bit.

Commands:
- Lay out the G14X queue header (scheduler pointer at +0x78) and
  scheduler context.
- Lay out the G14X compute (0x8e0), TA (0x960) and 3D (0xca0)
  commands. They carry register lists the GPU fetches by address, so
  commands come from the GPU read-only allocator. The compute command
  takes the event slot at +0x824 and the tracking index at +0x828.
- Add the scene's user buffer and control word registers to the TA and
  3D register lists, and name the control word in the scene.
- Name the GPU's parameter-buffer descriptor page at directory +0x2d0
  and +0x2d8; the parameter manager reads it.
- Enable the firmware log on G14X.

When the firmware fails to start, a boot job fails, or a render is
stopped, log the firmware and queue state from host memory and the MMU
fault status.

Signed-off-by: DjDeveloperr <hey@djdev.me>

@DjDeveloperr DjDeveloperr 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: CHANGES at ab7f9d1ab63b: fix three host tests and one chip check, then three hardware runs at the new head. The approach is right.

Blockers:

  1. Host tests break. Merged onto main 53732c475cb2, tools/asahi/run-host-tests.py passes 1006 of 1020. All 14 failures come from this PR; the same tests pass on main (25/25 and 1/1). Fix the harnesses and keep their mutation runs:
    • g14-v27-2-try-bind-tests.py (10 runs): its KVec has no first_mut, which g14_v27_2.rs:1909 now calls.
    • g14-v27-2-pool-tests.py (3 runs): it does not know CommandPool's new layout field (gpu/v27_2.rs:507).
    • display26-tests.py (1 run): its stubs lack of_find_compatible_node, used at pmp-export.c:167, and the new linux/unaligned.h include leaves its helpers unused, which it treats as errors.
  2. driver.rs:482 picks the register tables with match cfg.chip_id. Main selected them by GPU generation; this is a new chip check in shared probe code. Put the table, the writable mask and the memory-cache mask in HwConfig (for example v27_2: Option<...>) and read them from cfg; no entry means ENODEV. The device-tree compatible already selects the config.
  3. No hardware run at this head. The J414s numbers are from 1ed7f1bdfb9f, a bring-up branch on an older base. The shared 27.2 code under it has changed since then (ring and boot-job cache maintenance in gpu/v27_2.rs, the sleep hooks in driver.rs). Needed:
    • J414s: boot, 3D, compute and one s2idle cycle, with aura 7cdedb7f80c5.
    • One M1 or M2 (T8103/T8112) on GPU firmware 27.2: 3D, compute, s2idle. The shared root builder, power controller, queue header and render encoders are rewritten. Only the compute encoder is compared byte for byte with the old one; the body's "encodings are byte-identical (unit-tested)" does not cover the rest.
    • M2 Max (T6021): GPU probe and one s2idle cycle. Its GPU now powers on through PMP entry 0xa, which waits up to 50 ms for the PMP's answer and fails the GPU if a running PMP does not give it.

Checked: other GPUs and firmware versions, register windows and their write permissions, the G14X record maps, command memory, power domains and sleep, what aura hands over, builds, device trees. No Apple material, no new parameters, no attribution lines.

Evidence and small things

What I verified:

  • T6021, T6022 and T600x stay on the old path. On T6020 any firmware other than 27.2 still takes the 13.5 path. With this PR, T6020 on 27.2 never reaches start_cpu() without the handoff.
  • By reading the diff: the G13G/G14G layouts map every offset to itself, and the T8103/T8112 sensor masks and global_unk_54 equal the constants they replace. Every controller word the G14G writer sets has a place in the G14X map, so none is dropped.
  • The T6020 windows and read/write modes match the 13.5 T602x mappings. The compute, TA and 3D register lists match the 13.5 G14X lists, plus the additions named in the comments.
  • aura copies soc-device to apple,tunable-soc-device, so the vote finds its record. Its apple,sleep-retained mark now lands on the PMP entry, where nothing reads it; sleep_pd.c holds that domain in s2idle, as on T8112.
  • arm64 W=1 at the merge: drivers/gpu/drm/asahi/, pmp-export.o, pmp.o build, no new warnings in changed code. ABI unit tests 62/62. Eight T602x device trees build with W=1, no warnings; schema check on J414s, J414c, J180d gives the same output as main apart from phandle numbers. T6022's GPU stays on ps_gfx.
  • checkpatch --strict: 0 errors; 24 long lines, one missing blank line at pmp.h:28.
  • Merges cleanly with linux#3940.

Small things, not blocking:

  • g14_v27_2.rs:638: if the PMP vote fails, the driver warns and still sets the run bit, although the comments say the firmware then waits for clusters that never come. Return the error instead.
  • g14_v27_2.rs:711: the failed-boot path reads the fault registers without the gpu_powered() check the timeout path uses.
  • g14_v27_2.rs:1698: every recovery that stopped a render now prints several long error lines; a client can trigger these. Rate-limit them.
  • Kconfig: M1 and M2 now also need APPLE_PMP; only the G14S vote does.
  • g14_v27_2_render.rs:242: T6020 tiles on one cluster only, while the 13.5 path uses both for large renders. Please list it under Not yet.
  • Register 0x1c9e8 uses mask 0x47ff where 13.5 uses 0x4fff. Same value for every allowed layer count, but the comment says 13.5 values.

Not run: no GPU tests here; J414s is unreachable.

The 27.2 probe selected the register table, its writable slots and the
memory-cache mask by chip ID. Keep them in the SoC's HwConfig, which the
compatible already selects. A SoC without an entry gets ENODEV as before.

The tables do not change.

Signed-off-by: DjDeveloperr <hey@djdev.me>
The G14S firmware waits without a timeout for the GPU clusters, which the
PMP grants only on the AGX vote. Return the vote's error instead of
starting the firmware without it.

Only the G14S makes the vote, so do not require APPLE_PMP for the G13G and
G14G. Keep out the one combination that cannot link: a built-in driver
with a modular apple-pmp.

Signed-off-by: DjDeveloperr <hey@djdev.me>
The report of a failed boot job read the MMU fault registers even when the
GPU was off. Check gpu_powered() first, as the firmware-timeout path does.

Signed-off-by: DjDeveloperr <hey@djdev.me>
A client can cause recoveries, and each one that stopped a render logs
several long lines. Put the snapshot entries and the render report under
the rate limit of the other GPU fault reports. The one-line summary of
each recovery stays; recovery itself does not change.

Signed-off-by: DjDeveloperr <hey@djdev.me>
The G14X TA list is documented to carry the 13.5 values, but it masked
0x1c9e8 with 0x47ff where the 13.5 path uses 0x4fff. Both give the same
value for every allowed layer count (at most 2048). Use the 13.5 mask.

Signed-off-by: DjDeveloperr <hey@djdev.me>
Separate the T602x AGX vote's stub from the function before it, as
checkpatch --strict asks.

Signed-off-by: DjDeveloperr <hey@djdev.me>
Teach the harnesses what the production code they extract now uses:

- g14-v27-2-try-bind: KVec::first_mut.
- g14-v27-2-pool: CommandPool's layout.
- display26: the device-tree helpers, the errno and the unaligned header
  of the T602x AGX vote. Also check that a J613 PMP never gets that vote.

The mutation runs do not change.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Addressed review 6160682149 with plain commits pushed on top of ab7f9d1ab63b (new HEAD: 6a2ac7dbaf1831c6033bd0279f79dc2f0994a577):

  1. Host tests (6a2ac7dbaf18): updated g14-v27-2-try-bind-tests.py, g14-v27-2-pool-tests.py, and display26-tests.py without weakening any mutation (all 3 controls pass; 2/2 pool mutations and 9/9 try-bind mutations fail with exit 101). Full run-host-tests.py in the CI image:
    • merged onto main@5fe340acef00 (2bdab222827e): 1028/1028 PASS, 0 failures.
    • merged onto main@cebaa8a69fea (9a186229a4cb) and main@2b2681932a5c (9bca1d16eea4): 1027/1028 PASS — the lone failure (apple/pmgr-inherited, missing apple_pmgr_ps_probe_auto_enable) reproduces identically on plain main at cebaa8a69fea and 2b09f588bbd7.
  2. HwConfig per-SoC 27.2 data (05ede094d569): moved the 27.2 register tables, writable mask, and memory-cache mask into HwConfig::v27_2: Option<HwConfigV27_2>, removing the chip_id match from driver.rs.
  3. Additional review items (e897c1e1b7f5..b7ff8b0296aa):
    • Return the PMP AGX vote error before starting the ASC; drop the unconditional APPLE_PMP Kconfig dependency (only excluding DRM_ASAHI=y + APPLE_PMP=m; checked with APPLE_PMP=n and m/y).
    • Guard failed-boot fault reads with gpu_powered().
    • Rate-limit 27.2 recovery dumps via fault_log_ratelimit().
    • Mask 0x1c9e8 with 0x4fff as on 13.5, and add the missing blank line in pmp.h.
    • Updated the PR description (single-cluster tiling under Not yet, tightened compute-encoder byte-identical wording, noted ENODEV on older boot loaders lacking apple,tunable-soc-device).
  4. Static checks at 6a2ac7dbaf18: W=1 objects 0 errors / 0 warnings in changed lines, CLIPPY=1 identical warning list vs baseline, 62/62 ABI unit tests, checkpatch --strict 0 errors / 0 warnings / 0 checks.

Remaining (blocker 3): exact-head 6a2ac7dbaf18 hardware rows on J414s with aura#649 (7cdedb7f80c5) (boot, 3D, compute, s2idle), one T8103/T8112 on 27.2, and T6021 (GPU probe, s2idle).

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Exact-head hardware receipt (6a2ac7dbaf1831c6033bd0279f79dc2f0994a577)

  • Machine: J414s (MacBook Pro 14-inch M2 Pro, T6020, 16-core G14S B1, firmware 27.2)
  • Bootloader: aura#649 (7cdedb7f80c5) + u-boot#82 (41e527fa2b) + exact-head t6020-j414s.dtb (e889ef6ffd0e)
  • Kernel: 7.3.0-g14s272-6a2ac7db (boot_id=9d6972c6-7ae2-4136-ad59-18a16ec6a147, autoloaded aurora.ko)
  • DRM & Desktop on Panel:
    • /dev/dri/card0 + /dev/dri/renderD128 (406400000.gpu, G14 firmware 27.2 running; DRM device registered in 32 ms) + /dev/dri/card1 (soc:display-subsystem).
    • plane[35]: plane-0 on eDP-1 (3024x1964@120Hz) owned by kwin_wayland (AR30, imported=yes DMA-BUF from G14S GPU); plasma-login-wayland.target reached cleanly with 0 EGL errors.
    • Vulkan 1.4.363 (Borealis, Apple M2 Pro (G14S B1)).
  • 3D & Vulkan CTS:
    • vkmark 2025.01 (1920x1080 headless): vertex 1900 FPS, texture 2019 FPS, shading 1751 FPS, cube 2036 FPS -> vkmark Score: 1926.
    • deqp-vk (vulkan-cts-1.4.7.0): dEQP-VK.api.smoke.* 8/8 PASS (100%) pre-sleep and 8/8 PASS (100%) post-sleep; dEQP-VK.compute.pipeline.basic.*ssbo* (22 inline SPIR-V cases) 22/22 PASS.
  • Compute (clpeak-3.1.0 --opencl --single-precision-compute, Rusticl, 16 CUs @ 1398 MHz):
    • float 5.21, float2 5.60, float4 5.64 TFLOPS, float8 4.79, float16 3.29.
  • s2idle (rtcwake -d rtc0 -m freeze -s 5):
    • rc=0, GPU held for sleep: submitted=33624 completed=33624 pending=0 -> GPU released after sleep: running=Ok(0) pending=0; kwin_wayland plane-0 + post-resume deqp-vk (8/8) + clpeak (5.64 TFLOPS) PASS.
  • Faults: 0 GPU, 0 MMU, 0 RTKit faults.

@DjDeveloperr
DjDeveloperr marked this pull request as ready for review December 3, 2026 04:49
@DjDeveloperr
DjDeveloperr requested review from a team as code owners December 3, 2026 04:49
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m2 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Merge readiness at 51e809cf: not ready yet

Check Detail
CI at head running running: apple-build, host-tests, KUnit plan
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA 51e809cf, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · G14G/G13G compute encoder is byte-identical (unit-tested); compute front-of-queue timeout and failure-only logging apply across G14 27.2; firmware 13.5 wiring is main's on every T602x Mac; T6020 on 27.2 needs aura#649 (older aura leaves the GPU off there), and a boot loader without apple,tunable-soc-device fails that probe with ENODEV instead of warning.

Areas: area:gpu, area:platform

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

@DjDeveloperr DjDeveloperr 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: FINISH, then merge at 6a2ac7dbaf18. The code needs no change; two hardware rows are missing.

Blockers:

  1. One M1 or M2 (T8103/T8112) on GPU firmware 27.2 at this head: GPU probe, 3D, compute, one s2idle cycle. They run the shared code this PR rewrites, and two things change for them: the compute timeout now starts when a command reaches the front of the queue (g14_v27_2.rs:1933), and a firmware timeout event now also reads the fault registers (g14_v27_2.rs:1853).
  2. One M2 Max or M2 Pro on GPU firmware 13.5: GPU probe, 3D, one s2idle cycle. t602x-die0.dtsi:1082 puts the GPU of every T6020 and T6021 behind PMP entry 0xa. A running PMP that does not answer within 50 ms leaves the GPU without power. The J414s row shows the answer comes with 27.2 firmware; 13.5 has no row. An M2 Max covers T6021 as well.

Checked: the code points of the earlier review (host tests, the chip check, the small things) are fixed. The whole diff, error paths, other chips, builds, device trees, KUnit build, host tests. The J414s row at this head covers T6020 on 27.2. No Apple material, no new parameters, no chip or board checks, no attribution lines.

Evidence

Merge of 6a2ac7dbaf18 into main 13dc5a79c0ec (tree e2082cafb8a6, no conflicts):

  • Host tests in the Ubuntu 24.04 host-tests image, every run-host-tests.py job matching g14|legacy|display26|display-sleep|pmp|pmgr|agx|asahi|t602|rtkit|event|t8112|t8103|uapi|t6030-: 118/118. That includes all G14 27.2 mutations and g14-v27-2-abi-tests (62 cases).
  • Hosted host-tests is red only on apple/pmgr-inherited (1027/1028, merged onto 2b2681932a5c, before #4025). It passes on this merge tree.
  • arm64 W=1 drivers/soc/apple/ drivers/gpu/drm/asahi/ (GCC 16.2, rustc 1.100.1): builds, no new warnings in the changed files. The same with CONFIG_KUNIT=y: drivers/gpu/drm/asahi/ builds. The KUnit cases themselves were not run.
  • 8 T602x device trees with W=1: same warnings as main. Decompiled, J414s and J414c differ from main only in the new report@a and the GPU's power domain; on J180d nothing uses the new node, and it starts off.
  • checkpatch --strict on the whole diff: 0 errors; long lines and one spelling only.

G13G/G14G on 27.2, by reading:

  • Render encoders: with the G14G offset maps (identity) applied to both versions, the normalized old and new source write the same values at the same offsets. Compute encoder, queue header, root records, controller and register tables: same sizes, offsets and values; fast_sensor_mask, global_unk_54 and the T8112 sensor coefficients give the old constants.
  • T6021, T6022 and T600x have no 27.2 entry and stay on the old path; T6020 on any other firmware does too. T6020 on 27.2 never reaches start_cpu().
  • PMP vote: taken before the run bit, its error is returned, and a missing PMP defers the probe. With APPLE_PMP=n only the G14S start is refused.

Not blocking: the vote is made only at probe. A later T6020 deep sleep (#3999) restarts the PMP and has to make it again before the firmware runs.

Signed-off-by: DjDeveloperr <hey@djdev.me>
… Pro only

The GPU power domain moved to the PMP GFX report entry on T6020 and T6021.
Only T6020 has a 27.2 GPU backend that waits for the PMP to grant the
clusters. M2 Max (T6021) still starts its GPU on 13.5 firmware from ps_gfx,
and a PMP that did not answer the new request would leave it without a GPU.

Keep ps_gfx in the shared file and point only the T6020 GPU at the report
entry. The T6020 device trees are unchanged byte for byte. On T6021 the
entry has no user: it starts off and writes nothing.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Dec 3, 2026
@DjDeveloperr

DjDeveloperr commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Merged main and narrowed the DT change; two commits on top of 6a2ac7dbaf18. I read the whole diff (test bodies only skimmed) and found no other code change needed. I wrote the DT commit myself, so it still needs a reviewer who did not.

Changed: the DT commit keeps the GPU of M2 Max and M2 Ultra on ps_gfx; only T6020 uses the PMP GFX_ entry. T6021 has no 27.2 backend, so it gained nothing from the request and would have lost its GPU if a 13.5 PMP did not answer. On T6021/T6022 the entry now has no user: it starts off, is not part of the report's known bits and writes nothing. The T6020 DTBs do not change by one byte (t6020-j414s.dtb e889ef6ffd0e, the one in the J414s row).

Still open

  1. One approving review (not the author).
  2. A repeat of the J414s run on this kernel (main moved by 317 commits under it; its device tree did not change).
  3. Row: one T8103/T8112 on GPU firmware 27.2 (probe, 3D, compute, one s2idle cycle).
  4. Row: one M2 Pro on GPU firmware 13.5 (probe, 3D, one s2idle cycle). An M2 Max on 13.5 is no longer affected. Failure would look like repeated probe deferral of the GPU; the entry is not proven to be acknowledged by a 13.5 PMP, only by 27.2 (J414s).
Checks and what was read

On the merge 6a35e126703e (no conflicts; main and this branch share only asahi/Kconfig; #3695/#3699 touch only g16/ and the M4 selftests):

  • make LLVM=1 ARCH=arm64 W=1 drivers/gpu/drm/asahi/ drivers/soc/apple/ drivers/pmdomain/apple/ (asahi config, GPU as module): builds. Rust and C warnings per file are identical to main built the same way.
  • make W=1 of all eight apple/t602[012]-j*.dtb: builds, same warnings as main (line numbers aside).
  • tools/asahi/run-host-tests.py --jobs 12 in the Ubuntu 24.04 image: 1037/1039. The two others are pmp-agx-vote-tests (setarch blocked by the container's seccomp filter); with seccomp=unconfined, --only pmp passes 24/24. apple/pmgr-inherited passes (selftests: apple: fix the pmgr-inherited fixture and catch a retained HPD rearm #4025 is in).
  • After the DT commit (no host test reads these files; host tests were not run again): DTBs rebuilt and compared with cmp. checkpatch --strict: 0/0/0.
  • KUnit was not run locally (no arm64 guest). Hosted KUnit asahi was green at 6a2ac7dbaf18; it runs again at this head.
  • aura main@70d844e3e + PCI: apple: use a DT-selected T8140 radio PCIe bootstrap #649 7cdedb7f80c5: merges clean, make RELEASE=1 CHAINLOADING=1 builds aura.bin and aura.macho, run-t8122-gpu26-identity.sh passes.

Order with aura#649:

  • drm/asahi: validate legacy firmware compatibility before starting the ASC #3940 is not needed for T6020 once this merges: T6020 on 27.2 no longer reaches start_cpu(), with or without CONFIG_DRM_ASAHI_G14_V27_2. It stays useful for the other old-path GPUs.
  • Old kernel + new aura, T6020 on 27.2: the old path starts the coprocessor before it refuses 27.2, so this PR goes first.
  • New kernel + old aura, T6020 on 27.2: the GPU node stays disabled, as today. On 13.5 the node and the old path are as before, apart from the power domain in point 4.
  • T6021/T6022: aura#649 adds an image row and a target for T6020 only, so nothing changes there on any firmware.

Other Macs:

  • G13G/G14G on 27.2: same layouts through the identity map, same Fender word (0xd01000). Timeout: a compute command's 5 s now counts from the later of publication and reaching the front, so it can only fail later than before, never earlier; a hung front command still fails after 5 s.
  • The publication-order problem found in drm/asahi: enable HIGH priority GPU queues across G14 v27.2, G15-G17 and split-KMS compositors #4080 is not in this PR: pending is first in, first out, a render waits for all compute in flight and nothing is published while a render runs. drm/asahi: enable HIGH priority GPU queues across G14 v27.2, G15-G17 and split-KMS compositors #4080 needs its own fix when it lands on top.
  • G15, G16, G17 and the 12.3/13.5 paths: not touched, apart from a pub(crate) and the new None/Some config field.
  • apple_pmgr_ps_set_auto_pm() answers "unsupported" on the PMP entry, as on T8112, so ps_gfx auto-PM is not switched on for T6020.
  • s2idle: the PMP report withdraws requests only for a sleep through firmware, so GFX stays requested while the GPU firmware is live.

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed needs-hw-row No hardware row at the PR head (bot) labels Dec 3, 2026
A Mac with GPU firmware 13.5 does not need the PMP for its GPU. With the
PMP GFX_ report entry as its power domain, the GPU would only probe where
that Mac's PMP acknowledges the request: genpd turns a request the
running PMP does not acknowledge within 50 ms into -EPROBE_DEFER. Nothing
shows that the 13.5 PMP on T6020 does.

Only firmware 27.2 waits for the GPU clusters, and only the boot loader
knows the firmware when the device tree is made. Keep ps_gfx here, so
13.5 runs as before, and let the boot loader move the GPU to the entry
when it hands over 27.2 (aura#649). The entry itself stays: without a
consumer it writes nothing.

Signed-off-by: DjDeveloperr <hey@djdev.me>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m2 Macs affected, from Merge risk (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.

1 participant