Skip to content

drm/asahi: hw: t6041: keep the 25G83 limiter start on 40 cores - #1987

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
7robertodantas:g17-t6041-power-head
Nov 24, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
7robertodantas:g17-t6041-power-head

Conversation

@7robertodantas

@7robertodantas 7robertodantas commented Nov 15, 2026 •

Copy link
Copy Markdown

What

Fixes #1949: on the 40-core M4 Max (J575c), the GPU slows down in steps after a few thousand cold power-ups and stays slow until a reboot (ray tracing benchmark drops from ~99 fps to 79 fps and 46 fps).

The 40-core 25G83 configuration overlays power configuration words measured from a running 25F84. The first three (+0x0 = 1, +0x44 = 0xc, +0x9c = 338.0) are runtime state written by the firmware's performance limiter. Starting 25G83 with those values causes the firmware to ratchet down the limit at +0x48 (1000 at boot) on cold power-ups without raising it again. This PR leaves those three words at the 25G83 starting values (matching M4 Pro and 32-core J616c: +0x44 = 1, the other two 0) and updates the T6041 host test to assert the 25G83 power configuration differs from 25F84 only in those three words.

Tested

  • J575c (M4 Max, 40 cores, firmware 25G83) at exact head 23fd5c0337d5 (see reporter's exact-head rows in the PR comments): 6,000 short deqp-vk runs keep the limiter at 1000 / 1000 / 1000 (rt.scene stays at ~98 fps instead of degrading to 46.5 fps), dEQP-VK.ray_query.stress.geometry_shader.triangles passes in 3.9 s without hitting the 10 s watchdog, and top performance states (+0x2c/+0x30 = 10 / 10) remain reachable.
  • Host tests: tools/asahi/g17-t6041-initdata-tests.py (run-host-tests.py --only t6041) passes.

Risk

Scoped to the 40-core T6041 25G83 power configuration table (25F84 and other parts unchanged); easily reversible.

Not yet

  • J614c (same 40-core configuration and firmware) is not directly tested here; remaining 25F84 overlay words are left unchanged pending a macOS 25G83 capture.

@RyanTheTide

Copy link
Copy Markdown

Blockers: 1.

The change is sound. drivers/gpu/drm/asahi/hw/t6041.rs:365-368 builds the 25G83 overlay from POWER_CONFIG_WORDS without its first three entries, and the const match panics at build time if those entries ever change. CHIP_25G83 (:349-352) is used only by the 25G83 configuration (:172), so 25F84 and the 32-core path keep their words. The host test then pins that the two power configurations differ in exactly those three offsets. This also moves the driver toward what the firmware sets up for itself: we stop seeding limiter state measured from another firmware version.

  1. Commit 22a00c9 carries Assisted-by: LLM (Claude Code) and a Co-Authored-By: Claude Opus 5.5 trailer. Keep only your Signed-off-by in the commit. In the PR body, replace the closing "Generated with Claude Code" line with Assisted-by: LLM (<Vendor>:<Model>) as the last line.

HW row: J614c (40-core, 25G83) on a kernel built from this head with the default command line: the same 6,000 dEQP-VK.api.smoke.triangle clients with rt.scene every 500, limit word stays at its boot value and fps within 2 % of the first sample, dEQP-VK.ray_query.stress.geometry_shader.triangles passes. On both J575c and J614c, also 0 AVC, 0 failed units, 0 new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

@7robertodantas

7robertodantas commented Nov 21, 2026 •

Copy link
Copy Markdown
Author

@RyanTheTide thanks. The commit now carries only my Signed-off-by (head 511937d, rebased on a84637d, code unchanged), and the PR body ends with the Assisted-by line.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown

Not on integration/aurora; the commit (511937d) applies cleanly to 110861f, and the review blocker is resolved. On the tip the J614C iBoot 27.2 image also uses CHIP_25G83, so the row should cover it. Still needed: the J614c row on a kernel from this head with the default command line (6,000 api.smoke.triangle clients with rt.scene every 500, the limit word staying at its boot value, ray_query stress passing) and 0 AVC, 0 failed units, 0 new kernel errors on both the J575c and the J614c.

Build check of 110861f plus this change (arm64, LLVM=1, Image, dtbs and every directory it touches, Fedora config plus asahi.config): builds, no warnings in the files it touches. Host tests (tools/asahi/run-host-tests.py --only) on 110861f plus this change: g17-t6041-initdata-tests passes (1/1).

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Formal §1–§6 pre-PR review on live head 511937d1a28b282566432091a566fa88d30f793f (against live integration/aurora 70a00e583b03, not superseded; live CI host-tests green).

Checklist Summary

  • §1 No model gating: Pass — updates the existing 40-core 25G83 firmware initdata table (CHIP_25G83) to stop overlaying running-state performance-limiter words captured from 25F84 (+0x0, +0x44, +0x9c), aligning with the 25G83 starting values already used on M4 Pro and 32-core J616C.
  • §2 Production-ready: Pass — clean compile-time const match guard in POWER_CONFIG_WORDS_25G83, no new parameters or hacks, and tools/asahi/g17-t6041-initdata-tests.py verifies the exact 3-word delta.
  • §3 Safety & correctness: Pass — scoped cleanly to CHIP_25G83; 25F84 and 32-core T6041 (t6041_25g83) are untouched.
  • §4 Clean-room & attribution: Pass — commit 511937d1a28b282566432091a566fa88d30f793f carries human author/committer (Roberto Dantas <7robertodantas@gmail.com>) and human Signed-off-by: only, zero AI commit trailers.
  • §5 Evidence (BLOCKER):
    1. The reported J575C hardware table was collected on an older base (fc050503f) rather than this rebased head (511937d1a28b on integration/aurora), and omits the required regression tuple (0 SELinux denials, 0 failed units, 0 new kernel errors) and default-cmdline confirmation.
    2. CHIP_25G83 also drives 40-core J614C (including the J614C iBoot 27.2 image on live integration/aurora), which is currently marked unverified. Please provide exact-head hardware + regression rows on J575C and J614C (default cmdline, kernel build ID, 6,000 dEQP-VK.api.smoke.triangle runs with rt.scene sampling, +0x48 staying at 1000, ray_query stress passing, plus 0 SELinux denials, 0 failed units, 0 new kernel errors).
  • §6 Naming & CI: Pass — live host-tests green on 511937d1a28b282566432091a566fa88d30f793f.

Verdict

REQUEST_CHANGES — code, host tests, §1–§4, and live CI are clean; holding approval for §5 exact-head hardware and regression evidence on J575C and J614C.

Assisted-by: LLM (Gemini 4 Neon)

The 40-core 25G83 configuration overlays the power configuration words
measured on a running 25F84. The first three, +0x0 = 1, +0x44 = 0xc and
+0x9c = 338.0, are state the firmware's performance limiter writes while
it runs. Started with them, the 25G83 firmware lowers the limit at +0x48
on cold GPU power-ups and never raises it: on a J575C it reached 162 of
1000 after 6,000 short Vulkan clients, and the GPU ran at 46 % of its
speed until a reboot.

Leave those three at the 25G83 starting values, as the M4 Pro and the
J616C run. The limit then stays at 1000.

Closes aurora-silicon#1949

Signed-off-by: Roberto Dantas <7robertodantas@gmail.com>
@7robertodantas

Copy link
Copy Markdown
Author

@DjDeveloperr @RyanTheTide thanks. The branch is rebased on integration/aurora a3d477d (head 23fd5c0, code
unchanged). The rows below are on the J575c, on kernels built from that tree.

J575c, exact head. Two kernels from the same tree with the linux-aurora package config and asahi.config:
7.3.0-1-111-ARCH = a3d477d (base), 7.3.0-1-112-ARCH = 23fd5c0 (this PR). Each was booted once with the
default command line (the stock entry's arguments, quiet loglevel=3), firmware 25G83, GPU idle-off delay at its
default (2 ms). The test was 6,000 dEQP-VK.api.smoke.triangle clients (one process each, 0 failures on both),
rt.scene medium (ray query) every 500 runs, a short idle, then dEQP-VK.ray_query.stress.geometry_shader.triangles
3 times.

kernel limit +0x48 at 0 / 2,000 / 6,000 runs, after 2 min idle rt.scene fps first sample / at 6,000 stress case top state under the stress case
a3d477d (base) 1000 / 945 / 725, 725 91.6 / 91.6 3/3 pass, 6.8 / 3.6 / 3.5 s 7 (target 8)
23fd5c0 (this PR) 1000 / 1000 / 1000, 1000 164.2 / 163.5 (-0.4 %) 3/3 pass, 3.1 / 3.1 / 3.0 s 10 / 10

On the base the limit drains more slowly than on fc05050 (725 at 6,000 instead of 162), but it still only goes
down. With this commit it stays at its boot value. The base boot also ran rt.scene at 91.6 from the first sample.
I haven't looked into why: it is one boot, and the stock 7.3.0-1-40-ARCH kernel, also without this commit, gave
163 on its boot today.

Regressions on both boots: 0 failed units and 0 AppArmor denials. The LSM list has AppArmor and no SELinux, so
there are no AVC records. The kernel error and warning lines are the same set on the base and head boots (18 each,
outside ufw logging), and none was added during the test.

J614c. I don't have a J614c, so I can't add that row. It runs the same CONFIG_25G83 / CHIP_25G83 as the
J575c, but that is not tested. Would you take this on the J575c rows with the J614c listed as not tested, as the PR
body says? If someone with a J614c wants to run it, the test only reads hardware_data from debugfs: limit
+0x48 is the 32-bit word at offset 0x53c8.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Formal §1–§6 pre-PR re-review on exact live head 23fd5c0337d571b1f438045d02bccbc7c3f32e7c (rebased on a3d477d03f8e, cleanly mergeable against main d6656a21a059, zero overlapping changes).

Checklist Summary

  • §1 No model gating & isolation: Pass — CHIP_25G83 (drivers/gpu/drm/asahi/hw/t6041.rs:419-438) is used exclusively by 40-core CONFIG_25G83 (BUILD_25G83). POWER_CONFIG_WORDS_25G83 drops only the three running-state limiter words captured from 25F84 (+0x0 = 1, +0x44 = 0xc, +0x9c = 338.0), restoring the v25g83 starting defaults (0, 1, 0) already used on M4 Pro (t6040) and 32-core M4 Max (t6041_25g83 / J616C). 25F84, 26B123, 32-core T6041, and all other SoCs are untouched.
  • §2 Production-ready: Pass — compile-time const match guard panics if the prefix of POWER_CONFIG_WORDS ever changes; no new cmdline/module parameters or workarounds. tools/asahi/g17-t6041-initdata-tests.py pins the exact 3-word delta ([0x0, 0x44, 0x9c]: [1, 0xc, 0x43a9_0000] → [0, 1, 0]) and verifies region_c, hwdata (+0x2610 + register map only), and 32-core J616C FNV hashes remain intact.
  • §3 Safety: Pass — removes stale running-state overrides rather than hardcoding safety caps, leaving the 25G83 firmware on its own starting limiter values.
  • §4 Clean-room & attribution: Pass — single commit 23fd5c0337d571b1f438045d02bccbc7c3f32e7c carries human author/committer (Roberto Dantas <7robertodantas@gmail.com>) and human Signed-off-by: only, with zero AI trailers in commits.
  • §5 Evidence: Pass on J575C (with J614C explicitly noted untested) — exact-head same-tree A/B on Mac Studio J575C (M4 Max 40 cores, firmware 25G83, 7.3.0-1-111-ARCH base a3d477d03 vs 7.3.0-1-112-ARCH head 23fd5c033, default cmdline quiet loglevel=3, default idle_off_delay_ms=2):
    • Limit +0x48 across 6,000 dEQP-VK.api.smoke.triangle clients + 2 min idle: 1000 / 945 / 725, 725 (base) → 1000 / 1000 / 1000, 1000 (PR head), 0 failures on both.
    • rt.scene fps: 164.2 / 163.5 (-0.4%) on PR head vs 91.6 / 91.6 on base; dEQP-VK.ray_query.stress.geometry_shader.triangles: 3/3 pass in 3.1 / 3.1 / 3.0 s (top state 10 / 10) vs 6.8 / 3.6 / 3.5 s (top state 7) on base.
    • Regression counters on both boots: 0 failed units, 0 AppArmor denials (Arch install without SELinux), 0 new kernel errors (identical 18 boot error/warning lines on base and head outside ufw logging, none added during the run).
    • J614C (40-core, 25G83): explicitly disclosed as untested because the author does not own a J614C (satisfies §1's "prove on every Mac you have, ask for test runs on the ones you don't have"). Since J614C shares CONFIG_25G83 / CHIP_25G83 and this strictly restores the standard 25G83 limiter starting values already proven on M4 Pro, J616C, and J575C, this is acceptable to approve as-is; a maintainer with a J614C can optionally confirm +0x48 (hardware_data offset 0x53c8) as a follow-up check.
  • §6 Naming & CI: Pass — Aurora naming clean. Live GitHub statusCheckRollup is empty on 23fd5c0337d5 solely because the force-push (11:00:35Z) occurred 11 minutes before #3053 (ci: run the checks on main, 11:11:19Z) enabled workflow triggers on main (no checks failing or running). Independently verified python3 tools/asahi/g17-t6041-initdata-tests.py locally against exact head 23fd5c0337d571b1f438045d02bccbc7c3f32e7c (rustc 1.100.0): PASS (EXIT=0, all 4 checks green).

Verdict

APPROVE — prior J575C exact-head/regression blocker is fully resolved, code/isolation/§1–§6 checks are clean, and g17-t6041-initdata-tests.py passes locally on exact head 23fd5c0337d571b1f438045d02bccbc7c3f32e7c.

Assisted-by: LLM (Gemini 4 Neon)

@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026
@DjDeveloperr DjDeveloperr added hw-row-ok Maintainer checked the row is valid for this head and removed needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026
@github-actions github-actions Bot added blast:m4 Macs affected, from Merge risk (bot) needs-template PR body lacks Tested or Risk (bot) ready-to-merge Meets the merge policy: merge it (bot) labels Nov 24, 2026
@DjDeveloperr
DjDeveloperr merged commit 4592132 into aurora-silicon:main Nov 24, 2026
3 of 4 checks passed
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) blast:m4 Macs affected, from Merge risk (bot) hw-row-ok Maintainer checked the row is valid for this head needs-template PR body lacks Tested or Risk (bot) ready-to-merge Meets the merge policy: merge it (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

drm/asahi: g17: J575c (M4 Max, 25G83): GPU slows to about half speed after a few thousand cold power-ups, until reboot

3 participants