Skip to content

drm/asahi: g17: per-board GPU die temperature limit, J700 at 107 C - #2456

Draft
RyanTheTide wants to merge 4 commits into
pwr/gpu-cooling-v3-20261119from
pwr/gpu-dielimit-20261120
Draft

RyanTheTide wants to merge 4 commits into
pwr/gpu-cooling-v3-20261119from
pwr/gpu-dielimit-20261120

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

On the MacBook Neo the GPU die runs at 107.7 C under sustained load, while macOS holds it at or below 105.5 C. The host power ceiling from #2336 lowers the average temperature but not the peak: the die jumps from about 102 C to 107.7 C faster than an averaged power limit can react, and the GPU firmware's own die limiter clamps it there. That limiter's target is a shared constant (110 C) for every G17 firmware build.

Change

  • Two optional GPU-node properties, apple,fast-die0-target-temp (new) and apple,fast-die0-release-temp (the name older generations already use), in whole degrees Celsius. Without them every firmware build keeps its current values. Values can only lower the defaults: a target above 110 C is clamped and one below 85 C is ignored, with a warning in both cases.
  • One reader is shared by the A18 Pro (26A428) and M4 Pro (25G83) firmware layouts. The M5 build warns that the property isn't applied, because its limiter words sit elsewhere.
  • J700: target 107 C, chosen from our own measurements on this machine.

Stacked on #2336.

Testing

On the Neo, 10 minutes of off-screen glmark2 load, each kernel booted as a one-shot on a trial Stage 2 with only the DTB changed:

run GPU die peak mean after 2 min fps (vs 460) firmware crashes
production kernel 107.75 C 107.66 C 460 0
#2336 alone 107.71 C 105.12 C 421 (-8.4 %) 0
this PR, target 108 C 105.78 C 105.65 C 433 (-5.9 %) 0
this PR, target 107 C 104.73 C 104.64 C 417 (-9.3 %) 0

With the lower target the firmware holds the die flat, and the host ceiling barely moves. At 107 C the peak stays under the macOS level, and the frame-rate cost is lower than macOS's own (about 16 % in its run).

Still to run

  • The Rust KUnit cases in die_limit.rs need a KUnit-enabled kernel build. The fleet configs have KUnit off.
  • The 107 C value ran as a DTB variant of the 108 C build. The kernel code is identical; only the DT value differs.
  • M4 Pro boards: same code path, no board values yet.

Assisted-by: LLM (Claude:Opus 5.5)

The GPU firmware runs a die temperature limiter: above its target it
lowers the GPU state on its own, below its release temperature it lets
go. Its target and release are firmware defaults today, the same for
every board. A board whose enclosure must run the GPU cooler has no way
to say so.

Describe both on the GPU node, in degrees Celsius like the release
temperature the older generations already read
(apple,fast-die0-release-temp). Both are optional and can only lower
the firmware default.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Every G17 firmware build carries a die temperature limiter whose
target and release temperatures the host writes from constants
(26A428: 110 C / 80 C in the power configuration and the power
state; 25G83: 110 C / 80 C in the power configuration, 101 C / 96 C
in the power state). A board has no say in them, so a machine whose
enclosure must stay cooler than the default runs at the firmware's
limit no matter what its thermal zones ask for: on the J700 the host
power ceiling lowers the mean die temperature but bursts still climb
to the limiter's clamp.

Read apple,fast-die0-target-temp and apple,fast-die0-release-temp from
the GPU node once per build and apply them to every limiter table of
the running build, never above that table's default and with the
release kept below the target. A target above 110 C is clamped with a
warning, one below 85 C or a release out of range is ignored with a
warning. Without the properties every table keeps its default, so no
board changes behaviour until its device tree asks for it.

The M5 graph's limiter words move with its firmware's layout and are
not located here; a board limit on such a build is reported and not
applied.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Under a sustained GPU load our own macOS measurement on this machine
holds the hottest GPU die key at or below 105.5 C. Linux, with the
firmware die limiter at its default 110 C target, reads a clamp of
about 107.7 C on the same keys, and the GPU power ceiling cannot pull
the peak down: the firmware averages the ceiling over a window longer
than the bursts that reach the clamp.

Set the limiter target to 108 C, which moves that clamp near the macOS
level.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Our own 10 minute sustained GPU load rows on this machine: with the
108 C target the hottest GPU die key still peaks at 105.78 C (fps
-5.9 %), above the 105.5 C macOS holds it at. A 107 C target peaks at
104.73 C (mean 104.64 C, 417 fps against 460 fps without the limit
change), within the macOS level.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
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