Skip to content

drm/asahi: m3: T8122 GPU states 6 to 8 under the thermal limit, with the J615 die zone and CPU thermal zones - #2203

Draft
freber wants to merge 25 commits into
aurora-silicon:integration/aurorafrom
freber:t8122-pstate-73-on-2147
Draft

freber wants to merge 25 commits into
aurora-silicon:integration/aurorafrom
freber:t8122-pstate-73-on-2147

Conversation

@freber

@freber freber commented Nov 18, 2026 •

Copy link
Copy Markdown

This series lets the M3 runtime's thermal limit run the T8122 GPU above state 5 (up to 1338 MHz at state 8), steered by the hottest of the 12 SoC die keys. On a tree that sets apple,soc-die-keys-complete on the SMC hwmon node, which today only the J615's does, states 6 to 8 are the default ceiling with hot 90 C and a cool gap of 3 C. Everywhere else the ceiling stays at 2 with 80 C and 10 C, so the J613 and J504 behave as before.

It is stacked on #2147. Until that merges this PR also shows its commits, so please review only the twelve listed below. Without #2147 the T8122 GPU doesn't power up on 7.3.

What it carries

Commit Author From
hwmon: macsmc: expose complete J615 SoC die temperature set Eric Juta omacom #410
drm/asahi: preserve state-2 fallback for T8122 thermal boost Eric Juta omacom #410
docs: asahi: document guarded T8122 performance ceilings Eric Juta omacom #410
arm64: dts: apple: t8122-j615: Add CPU thermal zones Eric Juta omacom #491
drm/asahi: m3: host tests for the T8122 knobs and the thermal limit's range Fredrik Silfver omacom #500
drm/asahi: m3: keep the thermal check running above the safe cap Fredrik Silfver omacom #500
drm/asahi: m3: accept asahi.t8122_pstate_cap 6 to 8 under the thermal limit Fredrik Silfver omacom #500
drm/asahi: m3: tunable thermal thresholds Fredrik Silfver omacom #500
dt-bindings: hwmon: apple,smc-hwmon: add apple,soc-die-keys-complete Eric Juta ericjuta/linux j615/die-keys-dt-property
hwmon: macsmc: select the complete die key rule by a DT property Eric Juta ericjuta/linux j615/die-keys-dt-property
arm64: dts: apple: t8122-j615: mark the SoC die key list complete Eric Juta ericjuta/linux j615/die-keys-dt-property
drm/asahi: m3: default T8122 states 6 to 8 and a 90 C limit with a complete die key list Fredrik Silfver new
  • macsmc_soc_die registers only when every listed key is present on a tree with apple,soc-die-keys-complete, so a missing GPU key can't leave a CPU-only zone. The rule follows the property, with no machine compatible check.
  • The J615 tree gets six CPU thermal zones (power allocator, control at 95 C, critical at 110 C).
  • t8122_pstate_cap, m3_thermal_hot and m3_thermal_cool_gap are overrides. Sysfs shows default while they're unset. Caps 6 to 8 need m3_thermal=on, which is the default. m3_thermal_hot goes up to 92 C with critical 8 C above it and the gap takes 3 to 10 C, all writable at runtime.
  • The runtime cap starts at 2 and rises only while the limit reads a usable die temperature.
  • The after-job thermal check keeps running whenever the ceiling is above the safe cap, so one client that keeps the pipeline full can't stop the cap from coming down.

The default follows the property because t8122.dtsi describes all twelve keys for every T8122 board, while only the J615 is confirmed to have them all. The ceiling also goes to the firmware in the InitData, possibly before the hwmon driver has probed.

On 7.3 the module is aurora.ko, so overrides on the boot line are aurora.t8122_pstate_cap and so on. The commit subjects and the driver's messages say asahi., as the rest of the 7.3 driver does.

Results on a J615

A 7.3 kernel built from integration/aurora 24dc42277 with this branch, #2199, #2090 and #1985 merged, plus one local commit that keeps the DRM driver name "asahi" for my installed Mesa. Default command line, two boots, balanced profile, on AC.

This head on 7.3 7.2 j615gpu at 90 C and 3 C
gpubench w4 322.1 fps 305.9 fps
Sustained w10, 600 s 126.1 and 122.0 fps 123.3 fps
Hottest die key 92.9 and 93.0 C (Tg0P) 91.4 C

Pace p50 was 7.6 ms with 0 misses. Two of the four 600 s loads stopped early on my test's 95 C guard. On the first one the driver's 98 C step had already dropped the cap to 2. A half-second trace of the second one shows a one-second burst on every CPU core that lifted the E and P core keys 13 to 16 C while the GPU keys rose 1 to 4 C. The kernel logged no GPU errors on either boot.

Evidence

  • The m3 host tests pass at the head, 126 in m3-runtime-tests and 29 in m3_thermal_policy, including the defaults with and without the property.
  • Eric ran dt_binding_check and dtbs_check on his three new commits.
  • The full kernel with this branch merged builds and booted twice on the J615 as above.

Not tested

  • Suspend and resume at caps above 5.
  • Any T8122 board other than the J615.
  • The refusal path with a listed key missing.
  • GPU loads on 7.3 under the performance governor.
  • Caps 6 to 8 through tools/aurora-sep/air-gpu/air-gpu-oneshot.sh, which still accepts caps 1 to 5 only.

Assisted-by: LLM (Claude:Opus 5.5)

javanoo6 and others added 21 commits November 17, 2026 06:22
The J514S 14.7 boot chain can load a T6030 firmware build whose full TEXT
digest is not in the admission table. Probe refuses it and no GPU render
node is created.

Desktop use with the explicit prefix override reaches firmware READY and
reduces Hyprland CPU use from several cores to single-digit percentages.
Pin the complete measured digest only for J514S, with its segment sizes
and marker, rather than requiring a persistent bring-up override.

Exercise the production firmware table and exact lookup with the override
disabled. Reject other boards, altered digest suffixes, sizes and markers.

Link: omacom/linux-aurora#247
Signed-off-by: Nikita Konkov <95355711+javanoo6@users.noreply.github.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
The J514S cd05 FirmwareBuild row adds 15 lines to the T6030 firmware
table, which changes the pinned hw.rs file and t6030 module digests.
With that row removed both digests are their previous values, so the
T6030 profile itself is unchanged. Refresh the two pins and record why.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
Some 16-inch M3 Pro (J516S) units on the 14.7 boot chain load a B0 GPU
firmware image whose TEXT digest differs from the pinned J516S row:
TEXT 0x5c000, DATA 0x114000, GKTS marker 0x58e88 and TEXT sha256
cd05af6a828b52e4c2fed20086d3d18a7db42e03a8fd6f8354f9f06e0a61363e. The
build is refused with "loaded GFX TEXT identity mismatch", so there is
no render node and the compositor falls back to llvmpipe. The GPU only
starts with the g15_accept_text_prefix bring-up override.

Add this build as a J516S-only row. Rows still pin on the machine they
name; nothing changes on the J514S or on other machines. Extend the
maintained-handoff host test to check the new row and refresh the
zero-words golden pins for hw.rs and the T6030 module, which change by
exactly this one row.

Measured on a J516S (apple,j516s apple,t6030; os-fw 14.7, system-fw
15.5, iBoot2 iBoot-10151.140.19.700.2) with linux-aurora
7.2.11.aurora14-1 and the override: the admission line reports the
identical sizes, marker and digest, and the GPU reaches READY with
renderD128 present.

Link: omacom/linux-aurora#247
Link: omacom/omarchy#17739
Signed-off-by: joel cristobal <joelcristobal97@gmail.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
Some 14-inch (J514S) and 16-inch (J516S) M3 Pro units on the 14.7 boot
chain load a third B0 GPU firmware image: TEXT 0x5c000, DATA 0x114000,
GKTS marker 0x58e88 and TEXT sha256
411833a7ded773feeac4a181552e3ff5582eaf4435f2dd8f620c1ed0b31df1b0. No
row pins it, so probe fails with "loaded GFX TEXT identity mismatch",
there is no render node and the compositor falls back to llvmpipe.

Three machines have reported it in issue omacom/linux-aurora#247, all on the 14.7 stub with
system firmware 26.6.2: a J514S and a J516S (both iBoot-10151.140.19.700.2,
mBoot-18000.161.10), which logged the identical sizes, marker and digest,
and a second 14-inch M3 Pro. With g15_accept_text_prefix=0x411833a7ded773fe
all three reached firmware READY with renderD128 present. The boot
chain matches the J514S cd05 reports, so the chain alone does not
select the image.

Add one row per board, J514S then J516S, so each pin still names the
machine it was measured on; nothing changes for other machines. Extend
the maintained-handoff host test: both boards pin to their own row with
the override disabled, other boards are refused, and an altered digest
suffix, TEXT or DATA size or marker is refused. Refresh the zero-words
golden pins for hw.rs and the T6030 module; with the two rows removed
both are their previous values.

Link: omacom/linux-aurora#247
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
Before the module's final activate() step, the G15 probe returned
-EPROBE_DEFER. That put the GPU on the driver core's deferred-probe list.
activate() then runs the real probe through driver_attach(), but if that
probe fails for good, for example because the firmware is rejected, the
driver core does not take the device off the list. It stays in
/sys/kernel/debug/devices_deferred until the deferred-probe work next
runs, so anything that waits on that list keeps waiting.

Return -ENODEV instead. activate() already reprobes every unbound device
once MODULE_READY is set, and a device added later sees it set, so
nothing needs the deferred list to retry. The display and PMP waits
inside the real probe still return -EPROBE_DEFER.

g15-probe-init-tests.py now checks that every probe before activation
returns -ENODEV, and adds a mutant that defers again.

Assisted-by: Claude:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>

(cherry picked from commit 6447458 on omacom/linux-aurora, omacom/linux-aurora#470)
[7.3 base: the probe-init test also runs with the G16 registration here, so
 its pre-activation probe count follows the registration order; the new
 mutant is added to this base's expected-failure table.]
…e M3 runtime

The 7.2 rebase replaced the T8122 14.x branch of
apple_pmp_report_wait_supplier_ready() with a T6030-only one, so on an M3
MacBook Air every GPU power vote returns -ENODEV even with the PMP
running. With the new hidden APPLE_T8122_GPU_PMP_LINK, which
DRM_ASAHI_M3_T8122 selects (as DRM_ASAHI_G15 selects
APPLE_T6030_GPU_PMP_LINK), wait for the unique T8122 report's display
request (DISP, reg 7) to be ready and acknowledged before AGX, as on the
7.1.12 kernel the runtime was qualified with.

The PMP graph and supplier host tests copy the dispatch, so they copy the
T8122 wait too, built off there; their mutations still target the T6030
path.

Generated-by: LLM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
The supplier suite built apple_pmp_report_wait_t8122_14() only with
APPLE_T8122_GPU_PMP_LINK off, so every case returned at its first
check. Build it also as the M3 runtime does (T6030 and T8122 links on)
and run the T8122 graph: the unique, available report linked to this
PMP, with DISP (reg 7) acked, and its failures (machine, supplier and
report compatibles, a duplicate or disabled report, the apple,pmp shape
and identity, a missing, duplicate, disabled, incompatible or no-ack
DISP entry, the managed start and its readiness). With the link off, a
well-formed T8122 graph is refused.

Mutants cover the wait's config scope, compatibles, report checks,
readiness result and entry reference, and the dispatch's machine
scope in both directions.

Reported-by: Marcelo Alcantara <maralc@gmail.com>
Generated-by: LLM
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
The 14" M3 MacBook Pro (J504) runs the same T8122 DCP image as the M3
MacBook Airs (90F849E1-..., named by the J504 ADT), so the 14.x IOMFB
path can drive its panel once the boot loader hands the display over.
Its panel is the J514S mini-LED panel: 3024x1964 with 74 notch rows,
at 60 or 120 Hz.

Add a J504 record with that geometry, ProMotion allowed, bring-up
logging on, and this image's colour matrix methods. The panel level
block is not qualified on this board, so brightness stays closed, and
its swaps keep zero timestamps as on the Airs. Other T8122 Macs (the
J433 and J434 iMacs) still have no record.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
The J504 (14" M3 MacBook Pro) loads the same 14.8.3 G15G firmware image
as the M3 MacBook Airs (UUID DF697F05-..., TEXT 0x64000, from its ADT).
Move the T8122 board list into t8122_admission as T8122_BOARDS, add the
J504, and test the exact list on the host. Firmware identity, resource
admission, the performance-state cap and the thermal limit are
unchanged; the J504 starts at the same conservative cap (state 2) as
the Airs. The J433 and J434 iMacs stay unlisted.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
Give the J504 DCP its panel node (the J514S 14" mini-LED panel: 302 x
196 mm, 189 mm below the notch, 500 nits) and point the boot
framebuffer at it, as on the J613, so simpledrm and the DCP driver use
the same physical size.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
The J504 runs the J613's DCP image, whose panel level block (brightness
in nits) is qualified on the J613. Mark the J504 record panel_nits and
admit the J504 machine for it, with the KUnit and host tests.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
On 7.3 the M3 MacBook Air runtime adopts the firmware's UAT through
Uat::new_adopted_with_user_upper(), which always asks for a
write-combined mapping of the handoff and TTBAT regions. On these Macs
the boot loader leaves both regions in the kernel's memory map as
reserved RAM, and memremap() refuses a write-combined mapping of RAM:

  memremap attempted on ram 0x00000103fff70000 size: 0x4000
  aurora 292400000.gpu: probe with driver aurora failed with error -12

On 7.2 the same helper chose the mapping per region: write-back for
reserved RAM, write-combined for a carveout. Uat::new_adopted() still
does that on 7.3.

Add Uat::new_adopted_ram_with_user_upper(), which makes the same
per-region choice and keeps the caller's choice of user upper half, and
use it for the M3 runtime. The M4 caller keeps the write-combined
constructor; no other backend calls either.

Seen on a J613 with a 7.3 kernel on the m1n1 1.6.1.aurora23 handoff.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
DRM_ASAHI_M3_T8122 depended on DRM_ASAHI_G15 only because the T8122
runtime adopts the firmware's UAT with the G15 backend's handoff
helpers (g15::uat::Window and g15::memory_mode). Turning the M3 Air on
therefore also turned the G15 backend on for M3 Pro/Max.

Split the adoption out behind a hidden DRM_ASAHI_UAT_ADOPTION, selected
by both options:
- without G15, g15/adopt.rs builds only g15/{uat,regs,hw}.rs (no probe,
  no driver registration); what in them needs G15's Config or ADT
  (adopt(), Window::new, Regs::identity and the T6030/T6031 tables) stays
  under G15;
- the RAM helpers memory_mode needs move from g15/glue.c to
  g15/uat_glue.c, so the runtime doesn't take glue.c's display helpers;
- M3_T8122 now states its own dependency on APPLE_PMP, whose PMP votes
  the runtime calls directly (before, it was implied by nothing);
- the mmu and pgtable items the runtime uses (the adopted
  Uat, with_tracked_status, read_user and point-of-coherency cleaning)
  are built with UAT_ADOPTION instead of G15.

G15 selects UAT_ADOPTION, so every configuration that builds today is
unchanged: off, G15 only and G15 with T8122 give the same warnings as
before, and M3_T8122 alone now builds without warnings. The asahi-g15
selftest reads the helpers from their new file, and the g15-zero-words
test pins the new hw.rs (its separate T6030 table pin is unchanged).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>

(ported from commit 9dff537 on omacom/linux-aurora)
[7.3 base: G15 keeps this base's "default y" and selects the new option. The
 base builds what the runtime shares with G15 under "G15 or G16" and keeps
 the point-of-coherency cleaning unconditional, so the mmu and pgtable gates
 become "UAT_ADOPTION or G16" and gain no new #[cfg] on clean_poc. The
 module is aurora.ko here. g15-zero-words-tests pins hw.rs after the test's
 own normalisation. Built with G15 and T8122 (same warnings as before) and
 with T8122 alone: that builds, and none of its dead-code warnings is in
 g15/, m3/, mmu.rs or pgtable.rs. Not run on hardware.]
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
[Fredrik Silfver: 7.3 already lists the twelve T8122 die keys in
 t8122.dtsi for every board, so the J615 board entry is dropped. Only
 the check that all twelve are present remains, keyed on the J615
 compatible. The hwmon documentation notes the J615 exception.]
Signed-off-by: Eric Juta <ericjohnjuta@gmail.com>

Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
Signed-off-by: Eric Juta <ericjohnjuta@gmail.com>
Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
[Fredrik Silfver: 7.3 has no macsmc_hwmon.soc_die_keys parameter, so
 the warning now names the apple,soc-die-keys list in t8122.dtsi.]
Signed-off-by: Eric Juta <ericjohnjuta@gmail.com>
Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
Nothing limits the J615's CPU temperature: with all eight cores busy the
die sensors pass 105 C in 150 s, still rising, and a -j8 kernel build
holds 110-114.6 C for 22 minutes. The J613 got CPU thermal zones for the
same reason; the J615 has the same die, the same six CPU die sensors in
t8122.dtsi and no fan either, but no zones.

Add the J613's zones unchanged: one zone per CPU die sensor, each
throttling both clusters through the power allocator, switch-on 58 C,
control 95 C, critical 110 C, E cluster weighted three to one and capped
at cooling state 3. The compiled thermal-zones node is identical to the
J613's.

sustainable-power stays at the J613's 6 W after load tests on a J615
with these zones applied as a boot-time DT overlay: eight busy cores for
170 s peak at 87.7 C with the P cores at 3.1-3.6 GHz, and a 20 minute
-j8 kernel build holds a level 91-92 C with the P cores at 2.9 GHz (peak
97.2 C, 6 of 545 samples at or above 95 C). 8 W peaks at 96.3 C under
the eight-core load with no gain in P-core frequency.

Not tested: CPU and GPU load together, and the critical trip.

Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Eric Juta <ericjohnjuta@gmail.com>
Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
… range

Two gaps in the host tests that the rest of this series leans on.

The nine unit tests in m3/t8122_knobs.rs have never run. No file in
tools/asahi includes the module. It does not compile on its own either,
because it takes its default InitData version from m3_firmware, which
needs the kernel crate. pstate_cap_accepts_one_to_five_only, the test
that pins the range of asahi.t8122_pstate_cap, is one of them. Include
the module in tools/asahi/m3-runtime-tests.rs, the suite the kernel CI
already runs, with a stand-in for that one constant. The stand-in's
value is checked by defaults_are_the_plan_baseline, so it cannot drift
from m3_firmware without a failing test.

Policy in m3_thermal_policy.rs moves the runtime cap between the safe
cap and the ceiling. The cap_tests from aurora-silicon#410 drive it with a ceiling of
5 over a safe cap of 2. Nothing covers ceilings 6 to 8, or the check
that finds a firmware ignoring the cap. Add tests for the rules as
they are, for ceilings 6 to 8 above a safe cap of 5 and for ceilings 1
to 5:

- the cap starts at the safe cap and rises one state per 2 s on cool
  readings, never above the ceiling;
- between cool and hot it holds;
- hot lowers one state per fresh reading, at most every 500 ms, never
  below the safe cap;
- critical, no reading, a failed, stale, implausible (including the
  -2.849 C an unpowered SMC GPU key reads) or stuck reading returns to
  the safe cap at once, with the previous cap tolerated for 1 s;
- after a fallback the cap climbs again at the same pace;
- hold never leaves the safe cap;
- a ceiling equal to the safe cap never moves;
- a firmware that stays above a lowered cap is found after 20 checks
  spanning at least 3 s.

Three mutations of Policy (critical keeps the cap, the 3 s span dropped,
the raise not bounded by the ceiling) each fail one to three of the new
tests.

No driver code changes.

Link: omacom/linux-aurora#317
Link: omacom/linux-aurora#410
Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
The thermal limit moves the runtime cap only inside
Config::check_pstate. That runs after a job only in two conditions,
which a ceiling above the safe cap makes matter.

First, the job thread runs the check only when asahi.m3_retire_mmio has
bit 2 (the performance-state register read). The parameter is
root-writable at runtime, so writing 0 to 3 stops both the thermal limit
and the check that the firmware stays within the runtime cap. Once the
ceiling is above the safe cap, the runtime cap is the only thing that
keeps the firmware below the ceiling. A frozen governor would leave it
at whatever state it last allowed. Add Policy::above_safe()
(host-testable), Governor::enforces() (the limit is on or holding and
the ceiling is above the safe cap) and Config::pstate_check_required().
Run the after-job check when bit 2 is set or the check is required. Bit
2 is the T8122 default, so this forces only what runs by default. The
first retirement of a module load at which the check runs although bit 2
is clear logs one line, so a write that leaves bit 2 out is not silently
overridden.

Second, the check runs only at a retirement with no later batch in
flight. The T8122 default pipeline depth is 2. A render batch of the
same VM is published behind the running one while its passes fit the
4000 us budget. So one client that keeps submitting short passes, with
no other client rendering (a still or blanked screen, offscreen work),
can keep the check from running at all, at 90 C too. While the ceiling
is above the safe cap, pipeline_slot() now refuses a slot behind batches
in flight once the last check is 500 ms or more old
(Policy::overlap_allowed, CHECK_EVERY_NS), so the pipeline drains and
the existing checked retirement runs. The sensor is read every 500 ms
while busy, so more frequent checks would see no newer reading. The
longest time between checks is then 500 ms plus the run time of the
batches in flight. Every firmware-visible action stays where it runs
today, after the last batch has retired and the pipes are idle. The
other way, moving the cap on a pipelined retirement, would be a Globals
store with a later batch running on the GPU, which has never been done
on this firmware.

With aurora-silicon#410 the T8122 safe cap is 2, so both already apply to boots that
set asahi.t8122_pstate_cap to 3 to 5 with the thermal limit on or
holding. Those boots now drain the pipeline once per 500 ms under
sustained pipelined load. With the ceiling at the safe cap nothing
changes, since overlap_allowed() returns true before reading the clock.

New tests in m3_thermal_policy.rs simulate a client that keeps the
pipeline full (depth 1 to 4, batches of 0.1 to 50 ms). Without the bound
it is checked once, at boot, so 90 C leaves the cap at 8. With it the
longest gap between checks is within 500 ms plus the batches in flight,
the cap falls from 8 to the safe cap within that time of a critical
reading, a firmware that ignores the cap in hold mode is found. With the
ceiling at the safe cap, the publication order is identical to today's.
Three mutations of the bound each fail two to four of them.

Link: omacom/linux-aurora#317
Link: omacom/linux-aurora#410
Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
… limit

asahi.t8122_pstate_cap refuses anything above 5 (PSTATE_CAP_MAX in
t8122_knobs.rs). The stated reason is that J613 and J615 had no SoC die
temperature zone, so there was no temperature feedback above the
driver's no-feedback limit. Both boards have one now (macsmc_soc_die).
The rest of the path already exists. The firmware always gets the whole
eight-state table. With the thermal limit on, PstatePolicy::new already
makes the cap the ceiling, so only the knob range keeps the governor
below 6.

Accept 6 to 8, as the thermal limit's ceiling only. With aurora-silicon#410 below
this, the runtime cap of every T8122 boot starts at state 2 and falls
back to it, whatever the ceiling.

- asahi.m3_thermal=on (the default). The ceiling is the cap. The runtime
  cap starts at 2 and rises one state per 2 s only on usable, cool
  readings of the SoC die zone. No zone, or a failed, stale,
  implausible, stuck or critical reading, puts it back to 2 at once.
  These are the governor's existing rules.
- asahi.m3_thermal=hold. 6 to 8 are lowered to 5, with one boot line.
  The firmware gets 5 and the runtime cap stays at 2.
- asahi.m3_thermal=off. 6 to 8 are lowered to 5, with one boot line.
  aurora-silicon#410's fixed cap without the limit then gives the firmware 2. These
  values were refused before in every mode (ENODEV, no GPU for that
  boot). A cap left on the command line from a ranging boot while the
  thermal limit is switched off should not cost the GPU.

Values of 0, 9 and up are refused as before.

Whether the zone is usable can only be decided at runtime. On a J615 the
GPU firmware starts about 1.6 s into boot from the initramfs. The
macsmc_soc_die zone appears at about 7.6 s, when macsmc_hwmon registers
it. A probe-time zone check would refuse every boot, so the zone
condition is the governor's existing rule that only a usable reading
raises the runtime cap. The line the governor logs for a usable reading
now ends in "the runtime cap may rise above 2 up to N (MHz)" while the
ceiling is above the safe cap, so the boot log shows when the higher
states became possible. It is one line per change of the reading's
source, as before.

pstate_cap_use() in t8122_knobs.rs states the rules above in plain code
that the host tests drive. PstatePolicy::new gets the lowered ceiling
from admitted_cap(). Contents::select refuses the start if what
PstatePolicy::new computed is ever more than pstate_cap_use() allows, so
the two cannot drift apart silently. A host test checks that they are
equal for every cap and mode. Const assertions tie the no-feedback limit
(5) and the fallback (2) to the two constants of m3_thermal_policy.rs
that PstatePolicy::new uses. The boot lines name the case (lowered,
ranging or held) and the knob's value, which asahi.m3_max_pstate can
still lower later. When that parameter is given they say so and point to
the "firmware highest state" line, which has the result.
tools/aurora-sep/M3-GPU.md gets a paragraph on caps 6 to 8.

Tested on a J615 (15-inch M3 MacBook Air) with this series and aurora-silicon#410 on
bed544b (the 7.2 line), asahi.t8122_pstate_cap=8 and the thermal limit
at its defaults. On a cool die the runtime cap rose from 2 to 8 within
10 s of boot. Under GPU load the die passed 80 C within about 2 s at
state 8 and the cap fell back to 2 one state per 500 ms. A 600 s GPU
load and a 300 s combined CPU and GPU load ran without asahi errors,
faults or timeouts.

Link: omacom/linux-aurora#317
Link: omacom/linux-aurora#410
Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
The M3 thermal limit lowers the runtime cap at asahi.m3_thermal_hot
(default 80 C, at most 85 C) and raises it again only 10 C below that.
On a J615 under a sustained GPU load the die then settles between the
two (83 to 84 C with hot at 85). The cap stays at the safe state 2 for
the whole load, since nothing ever reaches the cool point again.

Let both be set further for boards and users that want it. The defaults
do not change.

- asahi.m3_thermal_hot goes up to 92 C. Critical stays 8 C above it, so
  at most 100 C, below the 110 C critical trip of the J613 and J615 CPU
  thermal zones.
- asahi.m3_thermal_cool_gap (default 10 C, 3 to 10 C) sets how far below
  hot the die must be before the cap rises again.
- Both are writable at runtime in /sys/module/asahi/parameters. The
  governor reads them at each update, applies the clamped values from
  the next reading with the usual pacing and logs the new thresholds.

The bounds and the clamping move into m3_thermal_policy so the host
tests cover them. New tests cover the clamping, the default gap, a
narrower gap, a higher hot and thresholds changed at runtime.

Tested on a J615 with asahi.t8122_pstate_cap=8, stepping the two values
at runtime. A 600 s GPU load (gpubench w10, depth 2) ran at 80.0 fps
with the defaults, 85.8 fps with hot 88 and gap 3, 88.1 fps with hot 90
and gap 3 and 95.2 fps with hot 92 and gap 3. A 300 s combined CPU and
GPU load stayed at the safe state 2 at every setting. The CPU thermal
zones kept the hottest die sensor at 92 to 94 C on average, with peaks
of 93.9 to 97.6 C.

Link: omacom/linux-aurora#317
Link: omacom/linux-aurora#410
Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for porting these and for keeping Eric's authorship.

Two things do not match how we do things here. We select behaviour by a hardware property, not by machine, and we avoid boot options that a machine needs to run as intended.

  1. drivers/hwmon/macsmc-hwmon.c:1425 requires all die keys only when of_machine_is_compatible("apple,j615"). The rule (no CPU-only zone when a GPU key is missing) holds for any board that lists apple,soc-die-keys, so it could apply whenever that property is present, or follow a DT property if some board needs a partial set. As you offered, a DT property is fine too.
  2. GPU states 6-8 are only reachable through aurora.t8122_pstate_cap plus m3_thermal=on, with new m3_thermal_hot and m3_thermal_cool_gap parameters (drivers/gpu/drm/asahi/m3/m3_params.rs:572, :578, :663; m3/t8122_knobs.rs:39-44). If the thermal limit makes 6-8 safe, it should be the default where the die keys are described, with the parameters kept only as overrides.

A CI run on the head is also missing.

@RyanTheTide

Copy link
Copy Markdown
Contributor

macsmc_hwmon_die_register() only refuses an incomplete CPU/GPU die zone when of_machine_is_compatible("apple,j615"); the rule is about the key list the DT gives, so it should apply wherever that list is present, or be a property of the hwmon node. In apple_pmp_report_wait_supplier_ready(), the T8122 branch is picked by of_machine_is_compatible("apple,t8122") although apple_pmp_report_wait_t8122_14() already checks the supplier's apple,t8122-pmp-v2 compatible; dispatch on the supplier node's compatible instead and drop the machine checks. Until then this should stay a draft.

@ericjuta

Copy link
Copy Markdown

@freber @RyanTheTide the die-key ask is my code from #410, so I wrote the fix: https://github.com/ericjuta/linux/tree/j615/die-keys-dt-property (3 commits on top of b2db791, cherry-pick as you like).

It replaces the of_machine_is_compatible("apple,j615") check in macsmc_hwmon_die_register() with a boolean on the hwmon node, apple,soc-die-keys-complete (binding, driver, and t8122-j615.dts sets it). I chose the property over "whenever apple,soc-die-keys is present" because t8122.dtsi lists the keys for every T8122 board and only J615 is confirmed to provide all twelve.

Tested: macsmc-hwmon.o and the J615/J613 DTBs build, checkpatch clean. Not tested: dt_binding_check (no dtschema on this host) and a boot. I did not touch the 6-8 default or the PMP dispatch.

@ericjuta

Copy link
Copy Markdown

Follow-up to my comment above: I have now run the schema checks on c070bebd9dd0 (dtschema 2026.9). dt_binding_check on apple,smc-hwmon.yaml is clean, and dtbs_check on the J615 and J613 DTBs against that schema is clean. No changes were needed, so the branch is unchanged. A boot is still not tested.

@ericjuta

Copy link
Copy Markdown

Boot report for this series on J615, head b2db7916faee plus my three die-key commits (c070bebd9dd0), as 7.3.0-j615-combined-20261121 under aura 1.0.0b13, aurora.t8122_pstate_cap=5 aurora.m3_thermal=on.

  • 12/12 SoC die keys registered; GPU cap starts at 2 and rose to 5 once the die temperature read usable (53.7–75.5 °C at boot, 52–56 °C idle)
  • six CPU thermal zones present, 49–57 °C idle
  • no failed units, no GPU faults across three boots

Not exercised: the apple,soc-die-keys-complete rule itself. My boot.bin DT predates the property, so that path is still untested on hardware. No load test on 7.3 yet. The build also carries the omacom/linux-aurora#356/#354/#357 display and USB ports, so it does not isolate this series.

@ericjuta

Copy link
Copy Markdown

Follow-up on the die-key patch (c070bebd9dd0 on ericjuta/linux j615/die-keys-dt-property): it is now boot-tested on J615.

Kernel 7.3.0-j615-combined-20261121 (this PR's head b2db7916faee plus the three die-key commits, plus my local ports of the dcpext, brightness and USB work), booted under aura 1.0.0b13.

  • apple,soc-die-keys-complete and the 12-entry apple,soc-die-keys are both present on the live smc/hwmon node.
  • The zone registers: SoC die temperature zone macsmc_soc_die: hottest of Tg0D Tg0P Tg0X Tg0b Tg0j Tg0v Te05 Te0P Tp05 Tp0L Tp0b Tp0r (12 of 12 listed keys present).
  • With aurora.m3_thermal=on and aurora.t8122_pstate_cap=8, the runtime cap started at 2 and rose to 8 (618 → 1338 MHz) in about 25 s at 62–69 °C die, with one 78.1 °C sample at cap 6 and no lowering.
  • No DART or GPU faults, no failed units.

Not tested: the refusal path (a listed key missing), and cap 8 under sustained GPU load — the climb happened at idle. This is a combined build, not this PR alone.

@ericjuta

Copy link
Copy Markdown

One clarification on my boot report above (the die-key rule test on J615).

The kernel I booted has the driver change (4c98e7d, rule keyed on apple,soc-die-keys-complete), so that code path ran: 12 of 12 keys read and the cap moved 2 -> 8.

The property itself did not come from the DTS commit c070beb. This machine boots its device tree from a locally built m1n1 boot.bin, and I added apple,soc-die-keys-complete to the smc_hwmon node there with a local overlay that has the same content. So c070beb is build-tested and dtbs_check-clean, but not boot-tested as a DTS change.

Still untested: the refusal path with a missing key, and cap 8 under sustained GPU load.

A board whose firmware provides every key in apple,soc-die-keys can say
so. The SoC die thermal zone is then registered only when all listed
keys are found, instead of skipping absent keys.

Signed-off-by: Eric Juta <ericjohnjuta@gmail.com>
The SoC die zone was refused on a partial key set only when the machine
is apple,j615. Select that by hardware description instead: with
apple,soc-die-keys-complete on the hwmon node, the zone is registered
only when every listed key is found. Other boards keep skipping absent
keys, as the binding documents.

Signed-off-by: Eric Juta <ericjohnjuta@gmail.com>
All twelve die keys were confirmed readable on J615, so a missing key
there is a discovery failure. Keep the previous J615 behaviour, no zone
on a partial set, through the DT property instead of a machine check.

Signed-off-by: Eric Juta <ericjohnjuta@gmail.com>
satchlj pushed a commit to satchlj/linux that referenced this pull request Nov 22, 2026
Nothing limits the J615's CPU temperature: the CPU thermal zones that
keep the fanless J613 safe are in t8122-j613.dts only. The J615 has the
same die, the same six CPU die sensors behind smc_hwmon and no fan
either; with all eight cores busy its die sensors pass 105 C in 150 s,
and a -j8 kernel build holds 110-114.6 C for 22 minutes.

Move the zones unchanged into t8122-j613-j615.dtsi, which both boards
include. The J613's compiled tree is unchanged (decompiled and sorted,
the old and new t8122-j613.dtb are identical); the J615's gains the
same thermal-zones node.

sustainable-power stays at 6 W. On a J615 with these zones applied as a
boot-time overlay, eight busy cores for 170 s peak at 87.7 C with the
P cores at 3.1-3.6 GHz, and a 20 minute -j8 kernel build holds 91-92 C
with the P cores at 2.9 GHz (peak 97.2 C). Those numbers are Eric
Juta's, from linux#2203.

Link: aurora-silicon#2203
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…mplete die key list

States 6 to 8 were reachable only with asahi.t8122_pstate_cap and
asahi.m3_thermal=on. The measured behaviour needed two more boot
parameters. A machine should not need boot options to run as intended.
The behaviour belongs to the hardware description.

Make the ceiling default to 8 on a T8122 whose device tree has a node
with apple,soc-die-keys-complete while the thermal limit is on, which is
the default. The property says that the firmware provides every key in
apple,soc-die-keys. The hwmon driver then registers the macsmc_soc_die
zone only with all of them present. In the tree only the J615 sets it.
J613 and J504 list the same keys through t8122.dtsi but are not
confirmed to provide them all, so they keep the old ceiling of 2. So
does an unset cap with asahi.m3_thermal=off or hold.
asahi.t8122_pstate_cap still sets any ceiling from 1 to 8 and is now
only an override.

The ceiling goes to the firmware in the InitData before the GPU starts,
when the hwmon driver may not have probed yet. So the default follows
the property, not whether the zone exists at that point. The runtime
cap still starts at 2 and falls back to 2. It rises only while the
limit reads a usable temperature from that zone, so a J615 whose zone
did not register stays at 2.

The limit's thresholds follow the same rule. With the property, hot
defaults to 90 C and the cool gap to 3 C. Elsewhere the old 80 C and
10 C stay, so the other M3 boards are unchanged.
asahi.m3_thermal_hot and asahi.m3_thermal_cool_gap are overrides.
Sysfs shows "default" while they are not given.

The choice of 90 C with a gap of 3 C comes from the J615 measurements.

  hot, gap   throughput   sustained 600 s   combined peak
  80, 10     218 fps      80.0 fps          95.8 C
  85, 10     272 fps      79.9 fps          not run
  90, 3      289 fps      88.1 fps          94.4 C
  92, 3      295 fps      95.2 fps          93.9 C

At 90 C with a gap of 3 C a 600 s GPU load held the hottest GPU key at
93.8 C with no missed frames. With a gap of 10 C the cap never left
state 2 under a sustained load, because the die settles a few degrees
under hot but above hot minus 10. The 85 C of the released form gave no
sustained gain while 80 C cost throughput. 92 C is a little faster, but
the GPU keys then reach 95.9 C, above the 94 C GPU die target in the
boot firmware's tree. 90 C is the highest value that stays under it in
the measurements. Critical is then 98 C, below the 110 C trip of the CPU
thermal zones. Critical or any loss of a reading returns the cap to 2.

This was measured on a J615 only, the one board that sets the property.
A 7.3 kernel built from this branch with aurora-silicon#1985, aurora-silicon#2090 and aurora-silicon#2199 merged
booted there with the default command line. The cap rose from 2 to 8
once the die reading arrived and gpubench w4 gave 322 fps. Of three
600 s w10 loads at the default, two ran to the end at 126 and 122 fps
with the hottest die key at 93.0 C. The third stopped at the test's
95 C guard after 416 s when one die reading reached 99.2 C, where the
98 C step returned the cap to 2. A half-second trace of the same jump
on a later load showed a one-second burst on every CPU core, which
lifted the CPU keys by 13 to 16 C while the GPU keys rose about 4 C.
The host tests in tools/asahi/m3-runtime-tests.rs cover the new
defaults and that the old defaults remain without the property.

Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
@freber
freber force-pushed the t8122-pstate-73-on-2147 branch from b2db791 to 833f0b3 Compare November 22, 2026 13:41
freber added a commit to freber/linux that referenced this pull request Nov 22, 2026
The M3 runtime publishes one render pass at a time unless
asahi.m3_render_batch_size or the writable m3_render_batch_override
asks for more. On a J615 (15-inch M3 MacBook Air) that costs frames
while Chromium scrolls an image-heavy page. Make the boot default 2.

Measured on a J615 with the stock 7.2.11 aurora16 module, whose
next_batch() and render_batch_size() match this tree's, booted with
asahi.t8122_pstate_cap=5 and setting m3_render_batch_override at
runtime. Chromium images scene, median of three runs:

  batch   dropped frames   p99 frame interval
  1       2.2 %            33.3 ms
  2       0 %              16.7 ms
  4       0.1 %            16.7 ms

Two same-session control runs at batch 1 dropped 2.6 % and 2.4 %. With
2, a burst of eight glprobe draws retired 1.6 render commands per
retirement instead of 1.0, its median fell from 4.53 ms to 4.00 ms and
GPU mailbox interrupts per run fell from 320 to 200. gpubench
throughput and idle power stayed within noise. The kernel log had no
GPU errors.

Only T8122 is affected. This parameter exists only with
CONFIG_DRM_ASAHI_M3_T8122, its only reader is the runtime's
next_batch(), the runtime's only SoC table is T8122 and it starts only
on the J613 and J615. T6030 and T6031 keep the G15 backend or the
probe refusal. The first render draw is still published alone for
InitBM, and the T8122 pipeline depth of 2 and the 4000 us batch budget
still bound every batch. m3_render_batch_override=1 restores the old
behaviour at runtime, asahi.m3_render_batch_size=1 at boot.

A 7.3 kernel built from this head with aurora-silicon#1985, aurora-silicon#2199 and aurora-silicon#2203 merged
then booted on a J615 with the default command line. In the same
Chromium scene under the balanced profile at panel scale 1.6, median
of three runs, 11.8 % of frames dropped at the
default of 2 against 15.6 % on the same kernel booted with
asahi.m3_render_batch_size=1. The eight-draw glprobe burst retired
1.52 render commands per retirement against 1.00. The kernel log had
no GPU errors. aurora-silicon#2203 raises that build's ceiling to state 8.

The J613 runs the same runtime and gets the same default but was not
tested. Neither was a 7.3 build at the T8122 ceiling of 2 that
applies without aurora-silicon#2203.

Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
freber added a commit to freber/linux that referenced this pull request Nov 22, 2026
The 15-inch M3 MacBook Air (J615) has the J613's SoC, DRAM, PMP tables
and PACC0 request layout. Its device tree is a legacy handoff tree. The
report binds the generic "apple,t8122-pmp-v2-report" and names its PMP
with apple,pmp. This driver starts that PMP, which runs the 14.x
firmware (3B18C886-4C70-349B-B1C4-70F35DE2C5CD). Without a memory floor
nothing raises the DRAM or fabric state for the CPUs. A 4-thread membw2
read then reaches 19.8 GB/s.

Give its report apple,cpu-memory-floor = <0x21 2 0x25 4>. The levels
come from the J615 runs of the earlier J615 floor patch, not from the
J613 tree. That patch stored DCS 4 in bits 51:48 and fabric level 2 in
bits 35:32 of the PACC0 request, word 0x2004000200000000. Those are the
lanes of request classes 0x25 and 0x21, so these pairs build the same
word. The 14.x PMP answered it with DVFS-STATE 0x24 within 5.1 ms. That
is class 0x25 at 4 in the low nibble with class 0x21 at 2 in the high
nibble. In one boot it confirmed 39 of 39 raises and 38 of 38 releases.
With the floor the same membw2 read reached 68.2 GB/s. The levels equal
the J613's because the SoC, DRAM and PMP tables are the same, but they
were measured on this board.

The driver needs no change. pmp_floor_probe() runs for any report with
the property. pmp_floor_find_pmp() takes the report's apple,pmp without
an availability check, so it does not matter that the PMP is still
disabled when the report probes. The start work waits for the report to
read READY. It does once the PMP runs, which apple_pmp_start_init()
arranges when the display asks for it. Admission then reads the tables
m1n1 fills in on the PMP node. Run on this board's live tables, the
upstream check admits 2 CPU clients and puts the PACC0 update alias at
+0x10888, where the earlier patch wrote it. pmp_floor_word_of() builds
0x2004000200000000 from the pairs. The binding already allows the
property on apple,t8122-pmp-v2-report.

The generic T8122 report does not set floor_confirm. Raises and
releases are published without the DVFS-STATE check, as on every report
but the J613 25G83 one.

The experimental t8122-j615-25g83 tree includes this file. It binds the
native J613 report, where the floor has not run on a J615. It deletes
the property so that it stays uncovered, as it was before.

Tested by building both J615 trees. Decompiled, the J615 report carries
the property while the 25G83 report has none. pmp-report.o builds with
clang 18. The floor ran on a J615 with the 14.x firmware on a 7.2.11
kernel carrying the earlier patch. A 7.3 kernel built from this tree
with aurora-silicon#2090, aurora-silicon#2199 and aurora-silicon#2203 merged then booted on a J615 with the 14.x
firmware and the default command line. The report admitted the floor
from the property with the PACC0 update alias at +0x10888. During three 4-thread membw2 reads the floor was up,
DVFS-STATE read 0x24 each time and the read reached 69.3 GB/s. The
boot logged no floor fault or refusal. On a later boot of the same
kernel the read gave 21.6 GB/s with the floor's enable attribute at 0
and 69.3 GB/s with it at 1.

Signed-off-by: Fredrik Silfver <1684291+freber@users.noreply.github.com>
@freber

freber commented Nov 22, 2026

Copy link
Copy Markdown
Author

Claude Code wrote this up from my tests.

Thanks for the two reviews, Ryan. Eric, thanks for writing the die-key fix.

The branch has four new commits on top of what you reviewed. Every commit of mine now carries only my Signed-off-by and the description ends with the Assisted-by line, as you asked.

  • Eric's three commits from j615/die-keys-dt-property, unchanged. The hwmon rule follows apple,soc-die-keys-complete on the hwmon node. Only t8122-j615.dts sets it.
  • One commit of mine that makes states 6 to 8 the default ceiling with hot 90 C and a cool gap of 3 C, on a T8122 whose tree sets that property while m3_thermal is on (the default). Without the property the ceiling stays at 2 and the thresholds at 80 C and 10 C, so the J613 and J504 behave as before. t8122_pstate_cap, m3_thermal_hot and m3_thermal_cool_gap are now only overrides. Sysfs shows default while they're unset.

You suggested the default wherever the die keys are described. t8122.dtsi describes all twelve keys for every T8122 board, though. Only the J615 is confirmed to have them all. Without the property the zone can register with part of the set, so states 6 to 8 could end up steered by CPU keys alone. The ceiling also goes to the firmware in the InitData, possibly before the hwmon driver has probed. So the default follows the property in the tree. The runtime cap still starts at 2 and only rises while the limit reads a usable temperature from the zone, so a J615 whose zone didn't register stays at 2.

The of_machine_is_compatible("apple,t8122") dispatch in apple_pmp_report_wait_supplier_ready() comes from Scott's 24e790b12 in #2147, which this branch stacks on. You raised the same point there, so I've left it to #2147 and will rebase onto whatever lands.

Results on a J615

The kernel is integration/aurora 24dc42277 with this branch, #2199, #2090 and the reworked #1985 merged on top, plus one local commit that keeps the DRM driver name "asahi" for my installed Mesa. m1n1-aurora 1.6.1.aurora23 loads this build's t8122-j615.dtb. The command line is the default one, with no aurora.* or pmp_report.* words. On AC, balanced profile, built-in panel only. I booted it twice.

This also tests Eric's DTS commit on hardware. The live hwmon node carries apple,soc-die-keys-complete from this tree and the zone logged 12 of 12 keys.

HW row: J615, kernel built from this head, default command line (no t8122_pstate_cap, no thermal parameters): m3_thermal_hot and m3_thermal_cool_gap read default; the boot log gives runtime cap 2..=8 with hot 90 C and gap 3 C and the cap reached 8 under load; macsmc_soc_die has 12 of 12 keys and the live hwmon node has apple,soc-die-keys-complete; gpubench w4 322.1 fps (3 runs), pace p50 7.6 ms with 0 misses; sustained w10 for 600 s at 126.1 and 122.0 fps with the hottest key at 92.9 and 93.0 C, while a third run stopped early on the 95 C guard (below); 0 AVC, 1 failed unit, 2 new kernel errors.

This head on 7.3 7.2 j615gpu, same limit set by boot words
gpubench w4 322.1 fps 305.9 fps
Sustained w10, 600 s 126.1 and 122.0 fps 123.3 fps
Hottest die key 92.9 and 93.0 C (Tg0P, 0.5 s samples) 91.4 C (5 s samples)

The failed unit is speakersafetyd. m1n1 passes no amp levels on my setup, so the speakers stay off, as on every 7.3 boot I've had. The two new kernel error lines came at boot, before any test. The video encoder found no preloaded firmware and the ISP firmware didn't answer. There were none during the tests.

Early stops on the 95 C guard

My first 600 s run stopped at 416 s on my test's 95 C guard. One die reading went from 84.3 C to 93.5 C within a second and the next read 99.2 C. The driver's 98 C step dropped the cap to 2 at once, 0.9 s before the guard. My samples were 5 s apart then, so I booted again and ran three 600 s loads with every key logged each half second, at hot 90 C, 88 C and 90 C.

Both 90 C runs went the full 600 s. The cap stayed mostly between 4 and 6 and the hottest key, Tg0P, peaked at 92.9 and 93.0 C, under the 94 C GPU die target.

The 88 C run stopped at 199 s. For about one second just before that every CPU core went busy, the P cores at 90 percent and 3864 MHz and the E cores at 71 percent. Te0P on the E cluster rose 16 C to 98.3 C and the four P-core keys rose about 13 C. The GPU keys rose 1 to 4 C. A second later, with the load already stopped, they reached 95.6 C as the heat spread across the die. So that spike came from the CPU side. I think the 416 s stop was the same, since it has the same shape, but its 5 s samples can't show the cores.

I haven't found what loaded the cores. Both spikes came 5 to 8 s after systemd-tmpfiles-clean ran, about 15 minutes after boot, but that unit finished in 65 ms and the journal shows nothing else in the window. The 100.1 C stop on 2026-11-18 came while I copied a file over SSH.

So I'd keep 90 C, which holds the GPU keys at about 93 C. A lower hot value does nothing about heat the CPUs put on the shared die and the 98 C step catches what gets through. If you'd like another run, for example with a deliberate CPU burst during the GPU load or with a different gap, I can do it.

In the trace the six Tg0 keys sometimes read -2.85 C for a sample or two, at idle and one to three times during each load. macsmc_soc_die takes the hottest key, so its value never dropped.

Checks

On the new head the m3 host tests pass, 126 in m3-runtime-tests and 29 in m3_thermal_policy, including new tests for the defaults with the property and for the old defaults without it. Eric ran dt_binding_check and dtbs_check on his commits. No CI run shows on the PR yet.

I haven't tested suspend and resume at caps above 5, the refusal path with a listed key missing or any T8122 board other than the J615.

The description now matches the new defaults.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for the rework and the half-second traces, and thanks Eric for the property.

Earlier points:

  • The SoC die zone rule now follows apple,soc-die-keys-complete on the hwmon node (drivers/hwmon/macsmc-hwmon.c:1425), with the binding and the J615 tree setting it. Fixed. I agree with using a property here, since t8122.dtsi lists all twelve keys on every T8122 board.
  • States 6 to 8 no longer need boot words. The three parameters are overrides and read default while unset (m3/m3_params.rs:569-606, m3/t8122_knobs.rs:45). Fixed.
  • The PMP dispatch is in 24e790b from drm/asahi: T8122: run the M3 runtime as on 7.2, and admit the J504 #2147, so it gets fixed there.
  • Commits 18 to 21 changed only their trailers. Their trees match the commits I reviewed.
  • CI: the three workflow runs on 833f0b3 are waiting for approval, so there is no CI result yet.

New in 833f0b3:

  • m3/m3_thermal_policy.rs:108-109: hot 90 C and gap 3 C are J615 measurements. They apply wherever apple,soc-die-keys-complete is set, but that property only says that every listed die key is present. It now also raises the GPU ceiling from 2 to 8 and moves the protection thresholds, and the binding (apple,smc-hwmon.yaml:72-77) doesn't mention either. The commit message and m3/m3_thermal.rs:40 explain 90 C by the 94 C GPU die target in the boot firmware's tree, but the driver never reads that value, and it differs between firmware versions: a J615 on 27.2 boot firmware reports gpu-fast-die0-target as 88 C, which is below the fixed 90 C. Please take hot (and so critical) from the ADT die target, or describe them in DT as trip points on a GPU thermal zone (the way the J615 CPU zones in this series carry theirs), and raise the ceiling only when that value is present. Without it, keep 2, 80 C and 10 C.
  • m3/m3_board.rs:36: of_find_node_with_property(NULL, ...) matches any node in the tree, disabled ones included. If the property stays the selector, read it from the SMC hwmon node.
  • In the J615 runs at the new default, two of four 600 s loads stopped on the 95 C guard. One die reading reached 99.2 C, above the new 98 C critical, and the GPU keys reached 95.6 C after the CPU burst. Since this is now what ships on the J615, the run you offered with a deliberate CPU burst during the GPU load would show whether the default stays under critical. One s2idle cycle at a cap above 5 would also help, since the cap now goes above 5 by default.

Rows: only the J615 tree sets the property, so the J613 and J504 keep 2, 80 C and 10 C by construction, and the host tests cover that. The J615 row at 833f0b3 on the default command line covers the default load. Still missing are the GPU load with a CPU burst and the s2idle cycle.

Assisted-by: LLM (Claude:Opus 5.5)

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.

6 participants