Repository navigation
soc: apple: pmp-telemetry: expose read-only hwmon temperatures on T8122 - #3974
Conversation
T8122 27.2 (26B123) PMP firmware exposes the same six named temperature records (ta000m, te000m, te001m, tp000m, tp001m, tp002m) in PMP SRAM data as T8132, located dynamically via apple_pmp_temps_locate() from SRAM header word 0x234 (0x36000 on J615 27.2). Register the shared read-only apple_pmp hwmon device on apple,t8122-pmp-v2 while keeping apple_pmp_telemetry_supported(), GPU policy leases, and the T8132-specific apple-pmp-thermal child scoped to apple,t8132-pmp-v2 so G16 GPU cooling on T8122 continues to use thermal-zone telemetry and reaches S8 cleanly. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
satchlj
left a comment
There was a problem hiding this comment.
Reviewed 78bd50d599dd across drivers/soc/apple/pmp-telemetry.c and its callers (drivers/soc/apple/pmp.rs, drivers/gpu/drm/asahi/g16/glue.c):
- Clean compatible-based gating (
apple,t8122-pmp-v2) for read-onlyapple_pmphwmon viaapple_pmp_hwmon_supported()while keepingapple_pmp_telemetry_supported()scoped toapple,t8132-pmp-v2. sensors->has_gpu_policydefense-in-depth looks solid:apple_pmp_gpu_get()returns-ENODEVwith all locks/refs cleanly released, andapple_pmp_telemetry_register()skips theapple-pmp-thermalchild when!has_gpu_policywhile keepingdevmteardown (apple_pmp_telemetry_release) wired up before list insertion, locate work, and hwmon registration.- DCO,
## Risk,checkpatch0/0, and exact-head J615 27.2 default-cmdline + 2/2s2idle+ G16S8cooling row all check out.
LGTM.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Merging at |
What: Expose read-only
apple_pmphwmon temperatures on T8122 (apple,t8122-pmp-v2), while keepingapple_pmp_telemetry_supported(), GPU policy leases (apple_pmp_gpu_get()->-ENODEV), and the T8132-specificapple-pmp-thermalchild scoped toapple,t8132-pmp-v2.T8122 27.2 (
26B123) PMP firmware (c6ccb960-ac83-34a2-9493-c3131bd5ae4b) exposes the same six named temperature records (ta000m,te000m,te001m,tp000m,tp001m,tp002m) in PMP SRAM data as T8132, located dynamically viaapple_pmp_temps_locate()from SRAM header word0x234(0x36000on J615 27.2).drivers/soc/apple/pmp-telemetry.c: addapple_pmp_hwmon_supported()(apple_pmp_telemetry_supported(np) || of_device_is_compatible(np, "apple,t8122-pmp-v2")) andsensors->has_gpu_policy, returning-ENODEVfromapple_pmp_gpu_get()and skippingapple-pmp-thermalregistration when!sensors->has_gpu_policy.Tested: J615 (MacBook Air 15" M3, T8122, macOS 27.2 /
26B123stub, Stage 2c9800c1d87243555, default cmdline, SELinuxEnforcing, silent) at exact head78bd50d599dd1c4c4ecf286f43f37c47d4ba2692(kernel7.3.0-m3uportd2):apple_pmp 2d0500000.pmp: temperature records at 0x59dcc 0x59e70 0x59f14 0x59fb8 0x5a05c 0x5a100 (data from 0x36000);/sys/class/hwmon/hwmon3(apple_pmp) boot readings: hotspot42250,Ta000m=34250,Te000m=36000,Te001m=35250,Tp000m=42250,Tp001m=35000(mC).aurora-g16 292400000.gpu: M4 cooling: ... governor=0 power=0 backstop=0 limit=S8(clean S1 -> S8 step-up);vulkaninfo:Apple M3 (G15G C0)OK.s2idle(rtcwake -m freezeonrtc0apple-pmu-rtc) PASS;apple_pmphwmon live after resume (cycle 2: hotspot35500,Ta000m=34250,Te000m=35250,Te001m=35250,Tp000m=41500,Tp001m=34750mC); Wi-Fi OK, 0 Oops/WARN/fault, 0 AVC,Enforcing.scripts/checkpatch.pl --no-tree: 0 errors, 0 warnings;git merge-tree --write-tree aurora/main HEAD: clean againstae1fe6357d1709.Risk: two-way · T8122 (M3) — read-only hwmon sensor exposure on
apple,t8122-pmp-v2using the existing SRAM record locator; T8132 and all other SoCs are unchanged, GPU policy leases remain gated onhas_gpu_policy, and a plain revert restores prior behavior.