Skip to content

accel/ane: bind the H17 device so its power domain can turn off - #838

Merged
RyanTheTide merged 1 commit into
aurora-wipfrom
ane/h17-bind
Nov 2, 2026
Merged

RyanTheTide merged 1 commit into
aurora-wipfrom
ane/h17-bind

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

On the Neo (T8140, H17) the staged ANE backend left the ANE platform device unbound: probe returned -ENODEV and the backend drove the engine itself. Because that device never bound, the PMGR power controller that owns ANE_SYS never got its sync_state (sync_state() pending due to 400000000.ane), so genpd kept every boot-on domain under that controller powered. ANE_SYS never turned off, not at idle and not across system sleep, whatever the backend put.

Change

  • With the H17 platform, ane_fw_platform_probe() binds the device for the staged backend (ane_fw_staged_bind()). platform_probe has already attached the device to its single power domain, and the backend now powers ANE_SYS through the bound device's own runtime PM instead of a second virtual genpd device.
  • If the loader handed the engine over still running, the bind keeps ANE_SYS on until the bring-up takes its own reference (or stops), so genpd can't switch it off underneath the running engine. Without a hand-off the device is left runtime-suspended and the domain is free to go off.
  • System sleep callbacks of the bound H17 device go through the per-generation dispatch from accel/ane: fix M4 Pro sleep callbacks, refuse sleep cleanly while the ANE runs #829 to an H17 backstop. It refuses (-EBUSY) only while the firmware is retained, the same as the existing PM notifier.
  • There is no new sleep support here: with the firmware running, suspend is still refused cleanly.
  • KUnit: only the staged (Exclave-owned) platform binds for the backend; H16 keeps its own probe.

Testing (fleet14k, modules built from this commit only)

  • KUnit 181/181. arm64 build, W=1 and checkpatch are clean.
  • Neo, default Stage 2 (ANE node disabled, nothing loads): no sync_state lines, ane_sys off, display (eDP-1, DP-1) and USB unchanged, and rtcwake -m mem suspends and resumes.
  • Neo, ANE started at boot from the loader hand-off:
    • "H17 ANE: bound; ANE_SYS held until the bring-up owns it", and no sync_state lines;
    • display and USB unchanged, no error-level log lines;
    • MobileNet top-1 16/16;
    • rtcwake refused cleanly ("ANE: system sleep not supported yet, suspend refused"), no oops, and MobileNet 16/16 again afterwards.
  • An earlier run that included this change showed display and USB still healthy after a suspend attempt.

🤖 Generated with Claude Code

…tate

The staged H17 backend left its platform device unbound: probe returned
-ENODEV and the backend attached a separate virtual genpd device for
ANE_SYS. The unbound device is a fw_devlink consumer of the PMGR power
controller, so "sync_state() pending due to 400000000.ane" stayed
forever. Until sync_state runs, genpd keeps every boot-on domain under
that controller on (stay_on), ANE_SYS included, whatever its users put.
On the Neo, ANE_SYS never powered off, at idle or across system sleep.

- The H17 probe now binds the device (ane_fw_staged_bind()).
  platform_probe has attached it to its single power domain, so the
  backend powers ANE_SYS through the device's own runtime PM. A second
  virtual device is not possible on a bound single-domain device.
- With a loader hand-off the engine is powered as the loader left it:
  the bind holds ANE_SYS (runtime active, one reference) until the
  bring-up takes its own reference or stops. Without a hand-off the
  device is runtime suspended and the domain may go off.
- The bound device's system sleep callbacks go through the generation
  dispatch (ane_fw_platform_suspend()/resume()) to an H17 backstop that
  refuses only while the firmware is retained, as the PM notifier does.
  H16 keeps its backend callbacks.

KUnit: only the staged (Exclave-owned firmware) platform binds for the
backend, and it keeps the backend sleep path.

Tested on the Neo (C5, fleet14k): bound with the hand-off hold, no
sync_state pending line, display and USB up at boot.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide merged commit c9e74a7 into aurora-wip Nov 2, 2026
@RyanTheTide
RyanTheTide deleted the ane/h17-bind branch November 2, 2026 04:51
notmysegv pushed a commit to notmysegv/linux that referenced this pull request Nov 4, 2026
…tion/aurora

Bring integration/aurora up to aurora-wip e1524e6, the source of
7.3.0-aurora-fleet14l, promoted on all four machines on 2026-11-02.
The range also covers the fleet14i, fleet14j and fleet14k sources
(a8fa302, d67eece, ce900d1). It adds aurora-silicon#822, aurora-silicon#823, aurora-silicon#824, aurora-silicon#827,
aurora-silicon#829, aurora-silicon#834, aurora-silicon#835, aurora-silicon#836, aurora-silicon#838, aurora-silicon#840 and aurora-silicon#839. No conflicts.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
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.

1 participant