Repository navigation
accel/ane: t8112: set the firmware perf mode at power-on - #1450
Merged
Merged
Conversation
macOS writes the engine performance-mode property (value 1) once at every firmware power-on. Linux only sent it when fw_perf_mode was written by hand, so the M2 ran its calls in the default mode. Set it on T8112 at probe, right after the CONFIG_GET that arms the transport; restarts already send it again once it has been set. On the M2 (H14) it lowers the fixed cost of every call: a one-task program 131 -> 123 us p50 (three rounds of 1000), the fused ReLU6 MobileNet ring 593 -> 584 us, the ReLU ring within noise, outputs bit-identical. Build the property write from named offsets, ids and values (ane_t6021_prop_write(), ane_t6021_perf_mode_cmd(), CSNE_CMD_CH_PROPERTY_WRITE) and use it for all three senders: power-on, the restart path and the fw_perf_mode parameter. A firmware refusal keeps the default mode and the transport; any other error fails the install like a failed CONFIG_GET. perf_mode_at_boot=0 keeps the old behaviour. KUnit checks the command layout. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
RyanTheTide
marked this pull request as ready for review
November 10, 2026 10:58
This was referenced Nov 11, 2026
Merged
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.
macOS writes the ANE engine performance-mode property (value 1) once at every firmware power-on. Linux sent it only when
fw_perf_modewas written by hand. This sends it on T8112 at probe, right after the CONFIG_GET that arms the transport; firmware restarts already resend it once set.ane_t6021_prop_write(),ane_t6021_perf_mode_cmd(),CSNE_CMD_CH_PROPERTY_WRITE), used by power-on, the restart path and thefw_perf_modeparameter; no raw words left at the call sites.perf_mode_at_boot=0keeps the old behaviour.Tests: KUnit
perf_mode_cmd_test(command layout, header and tail untouched),ane-t6021-lifetime17/17 under arm64 QEMU;run-host-tests224/224; checkpatch clean.M2 (T8112), Linux, one-shot boot with the same config as the current default, 3 interleaved rounds x 1000 runs, p50:
Outputs bit-identical (relative L2 9.5e-5 / 1.5e-3 / 1.5e-3, reference top-5), 0 DART faults, 0 timeouts, 0 AVCs, Enforcing.
🤖 Generated with Claude Code