Repository navigation
drm/asahi: g17: per-board GPU die temperature limit, J700 at 107 C - #2456
Draft
RyanTheTide wants to merge 4 commits into
Draft
RyanTheTide wants to merge 4 commits into
RyanTheTide wants to merge 4 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
apple,fast-die0-target-temp(new) andapple,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.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:
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
die_limit.rsneed a KUnit-enabled kernel build. The fleet configs have KUnit off.Assisted-by: LLM (Claude:Opus 5.5)