Repository navigation
drm/asahi: g17: consume T6041 v1 calibration handoff from DT when present - #2103
AxxzyWasTaken wants to merge 1 commit into
Conversation
25860ee to
bf20bd5
Compare
|
A gentle ping: this is ready for review. Head bf20bd5 merges cleanly into current integration/aurora and CI passes. Disclosure: prepared with an AI tool (the commits carry Assisted-by: LLM); tested as described. |
bf20bd5 to
d674c6e
Compare
|
Blockers: 3.
HW row: this exact head (d674c6e, not the daily tree) booted on the J616C on the default command line: firmware up, the ALU and terrain numbers from the PR, 0 GPU recoveries over a 30 min mixed load, 0 new kernel errors and 0 failed units against the base; plus a J614C boot showing its config is unchanged. Assisted-by: LLM (Claude:Opus 5.5) |
d674c6e to
50b03ae
Compare
|
Reworked and pushed |
|
Thanks for the rework. The configuration-word replay and the tuning literals are no longer part of this change, which resolves points 2 and 3 for this PR. Point 1 is still open:
So the order should be: the companion aura change publishes max-power-mw, perf-relative-a and the leak coefficients for T6041 (read-verified on the J616C, as its own comment plans for v2), and the kernel then requires them and drops the static power and leakage values. As it stands this version only moves the performance maps and AON rows to DT. Those are worth having, but they are not the part that needs the machine. Smaller:
Testing: no hardware row yet at 50b03ae. Needed are a J616C boot paired with the aura change (firmware up, the earlier ALU and terrain numbers, 0 GPU recoveries over 30 min of mixed load, 0 new kernel errors), the same J616C with a loader that publishes no handoff showing the intended behaviour, and a J614C boot showing its configuration is unchanged. Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Reviewed 50b03ae29139 against the pre-PR checklist (§1–§6) and cross-checked DT/ABI compatibility against aurora-silicon/aura#450 (7e417ad1).
What looks good
- Cross-repo DT/ABI compatibility with
aura#450(7e417ad1): All seven v1 properties match in type, length, endianness, and validation rules:apple,t6041-handoff-version(u32, must be1when present; deleted up front and written last byaura#450).apple,core-mask(u64, 40-bit mask split into four 10-bit cluster masks matchingid.core_masks).apple,active-mcc-bit-vector(u32, nonzero 8-bit mask;count_ones()verified against register-map slot 3instances).apple,perf-base-pstate(u32 == 1).apple,perf-map-a,apple,perf-map-b,apple,perf-relative-b(16 x u32, 11 active states + 5 trailing zeros; integerrelative_bladder formula matchesaura#450).apple,aon-table(15 x u32, canonicalg0TR..g3TR,r0TRBE 4CC keys round-tripping cleanly in bothv25g83andv26b123).
- Fallback & non-T6041 safety: Non-T6041 GPUs skip
T6041Calibration::read_optentirely (and T6040'sCalibration::check_oppsbehavior is unchanged viacheck_perf_opps). Olderauraboots withoutapple,t6041-handoff-versionreturnOk(None)and cleanly fall back to the static profile. 40-core T6041 on 25G83 keepsaon_va = 0because!base_aon.is_empty()is false. - §4 Attribution: Single commit with human author/committer and human
Signed-off-by:; PR body carriesAssisted-by:.
Blockers
- Failing CI (
host-tests—FAIL t6040-calibration-tests, 460/461 passed):tools/asahi/t6040-calibration-tests.pycompilesdrivers/gpu/drm/asahi/g17/calibration.rsdirectly against its mockof::Node/Propertyharness and fails with 2 errors:g17/calibration.rs:201:error[E0599]: no method named 'get_opt_property' found for reference '&of::Node'g17/calibration.rs:208:error[E0277]: the trait bound 'u64: Property' is not satisfied
Update the mockof::NodeandPropertyimpls intools/asahi/t6040-calibration-tests.py(and add aT6041Calibration::read_optproperty-adapter test covering absent, valid v1, wrong version, and malformed/missing property cases) sohost-testspasses cleanly.
- Missing §5 live hardware verification rows for the live head SHA: Please attach the queued live J616C boot rows once run on the updated head SHA:
- Paired with
aura#450v1 handoff (apple,t6041-handoff-version = 1) on default cmdline, plus fallback boot without the DT property, including kernel/build IDs and regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors).
- Paired with
(Non-blocking note: on 40-core T6041 26B123, upgrade_26b123 still overrides relative_b with the static float RELATIVE_B array when active_cores == 40, while consuming DT states_a/states_b/aon_table; and 25F84 validates t6041_cal in Gpu::new() without consuming it in its legacy initdata path. Both are harmless for v1 scope.)
Assisted-by: LLM (Gemini 4 Neon)
…sent Read optional T6041 v1 GPU calibration properties published by aura under apple,t6041-handoff-version = 1 (apple,core-mask, apple,active-mcc-bit-vector, apple,aon-table, apple,perf-map-a/b, apple,perf-relative-b, and apple,perf-base-pstate) while keeping a clean fallback to the static T6041 profile when the handoff property is absent. When apple,t6041-handoff-version is present: - Require version 1 and cross-check apple,core-mask (40-bit across four clusters) against the probed hardware core masks in Gpu::new(); - Cross-check popcount(apple,active-mcc-bit-vector) against the register-map slot 3 MCC instance count (leaving hwdata +0xf8c untouched until verified on hardware); - Validate both 11-state perf maps and recompute the relative-B ladder from the probed 4-cluster OPPs, merging them into T6041 PerfConfig; - Populate the 25G83/26B123 AON temperature-source table from DT when the active firmware profile uses AON (leaving 40-core J614C 25G83 unchanged). This is the v1 machine-sourced handoff consumer; static MAX_POWER_MW, leakage coefficients, and remaining per-chip power/hwdata tables in hw/t6041*.rs remain in place until v2 four-cluster efuse handoff is verified on hardware. The T6040 calibration host test now mocks of::Node::get_opt_property and big-endian two-cell u64 properties, and covers T6041Calibration::read_opt: absent handoff, a valid v1 handoff, wrong versions, and missing, short or out-of-range properties. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
50b03ae to
5aa9060
Compare
|
Updated to
Paired J616C boot rows (with |
Reworked to consume the optional v1 T6041 calibration handoff published by
aura(apple,t6041-handoff-version = 1) when present in DT, falling back cleanly to the existing static tables when absent:apple,t6041-handoff-version,apple,aon-table(fixed[u32; 15]with key validation),apple,perf-map-a/b,apple,perf-relative-b,apple,perf-base-pstate, and cross-checksapple,active-mcc-bit-vectorviacheck_mcc()(no unverified hardware register writes).MAX_POWER_MW, leakage coefficients, and hwdata fallback in place for v1 scope (removal of static power/leakage awaits a v2 efuse handoff).Testing
scripts/checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks.tools/asahi/g17-t6041-initdata-tests.py: PASS.drivers/gpu/drm/asahi/aurora.ocross-compile (ARCH=arm64 LLVM=1): PASS (0 warnings in touched files).aurav1 handoff Stage 2 is queued next.Assisted-by: LLM (Anthropic:Claude Opus 5.5)