Skip to content

soc: apple: rtkit-helper: preserve an adopted T8142 MTP session - #1123

Merged
RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
dmitzsaz:pr/rtkit-t8142-mtp-preserve
Nov 8, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
dmitzsaz:pr/rtkit-t8142-mtp-preserve

Conversation

@dmitzsaz

@dmitzsaz dmitzsaz commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

When the boot loader hands over a running T8142 MTP, the keyboard and trackpad are already served by that RTKit session. This marks the adopted session preserved, as is done for the adopted J713 and J614s MTPs, so dockchannel-hid (through apple_rtkit_helper_preserves_input()) holds the multi-touch AFE reset while it uploads the trackpad firmware and powers the interface on without powering it off first. Without the flag the adopted T8142 session is handled like a cold-started one.

The check is keyed on the apple,t8142-mtp compatible rather than on a machine. It only applies to a session that was handed over live; a cold-started MTP (the J813 path, apple_rtkit_wake_early_ap()) is unchanged.

Tested on: J704, same boot as PR A: keyboard, stm and multi-touch ready, trackpad working, across an s2idle suspend/resume. Part of our J704 kernel since 2026-11-05.

Prepared with Claude Opus 5.5; tested by me on the hardware.

When the boot loader hands over a running T8142 MTP, the keyboard and
trackpad are already served by that RTKit session. Mark the session
preserved, as is done for the adopted J713 and J614s MTPs.

dockchannel-hid reads this through apple_rtkit_helper_preserves_input().
For a preserved session it holds the multi-touch AFE reset asserted
while it uploads the trackpad firmware, and then powers the interface
on without first powering it off, because the inherited interface is
already off while reset is asserted. Without the flag the adopted T8142
session is handled like a cold-started one.

The check is keyed on the apple,t8142-mtp compatible rather than on a
machine, so it applies to every T8142 MTP that the loader hands over
live; a cold-started MTP is unaffected.

Signed-off-by: Dmitriy <noc@pimk.in>
Assisted-by: LLM
(cherry picked from commit 7e93cff)
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merge-train rows so far (MTR3, 2026-11-08). Test kernel 7.3.0-aurora-f4mtr3g = integration/aurora af6d986 + #1122 + #1123 + #1124 + #1176, built with 0 warnings. Each Mac got one silent one-shot boot. The checks were our FLEET regression suite vs the same Mac's fleet31/fleet30 rows, plus keyboard/trackpad/HID/DART/MSI error counts and gpubench, test boot vs default boot:

  • M2 (J413): PASS. No hard regressions. MTP keyboard and multi-touch present, 0 HID/MTP errors.
    • The first glmark read 3890, so I re-checked with 3 runs each: default 4614/4802/4462, test fresh boot 4253/3843/4612, and a plain-reboot control on fleet31 4636/3773/4555. The low reads are fresh-boot noise, not a regression.
    • gpubench light rows are equal.
  • Neo (J700): PASS. No hard regressions. glmark x3 2604/2700/2670 (default) vs 2634/2672/2665 (test). gpubench equal on the x3 re-check. AVD bit-exact. Keyboard and trackpad present, 0 HID errors.
  • J616s (M4 Pro): PASS. No hard regressions. glmark 6562 vs 6570. dEQP timeline semaphores 3835 pass, the same as fleet30, with 0 firmware crashes, 0 device-lost and 0 GPU faults. Keyboard and trackpad present, 0 HID/DART/PCIe errors.
  • M1 Pro (J316s): NOT RUN YET. Other lanes held it, and the swarm is handing over to a new orchestrator now.

Not merged yet: the plan was to merge after the M1 Pro row. The kit is kits/test/20261108-f4mtr3g on the S500, and the row script is work/linux/mtr3-20261108/comborow.sh (M1 Pro, TID=0).

@RyanTheTide

Copy link
Copy Markdown
Contributor

M1 Pro row done (the last of the four), 7.3.0-aurora-f4mtr3g = integration af6d986 + #1122 + #1123 + #1124 + #1176, one-shot vs the fleet31 default:

  • glmark 9861 vs 9848 (+0.1%), kernel errors 0, AVC 0 (enforcing), failed units 0.
  • Keyboard/trackpad input devices, hwmon fans and rtkit timeouts/errors: same as the default boot. 0 DART/PCIe/MSI errors.
  • Wi-Fi/BT reconnect, camera, 6+6 sleeps, ANE resume: same as the default.
  • gpubench A/B within noise (worst row copy.bw buf2img d4 +6.3%, one sample).
  • One new boot warning class, kauditd_printk_skb: N callbacks suppressed (audit printk rate limit, AVC 0). It is environmental. None of the four PRs touch audit, and the iommu: apple-dart: keep a T8142 DART that a live coprocessor uses #1122-PCI: apple-msi: program the MSI map of every listed port #1124 paths are gated to T8142, so they don't run on this T6000.

Rows passed on all four Macs (M2, Neo, J616s, M1 Pro). The trial merge onto integration d4d2678 is clean. Merging.

@RyanTheTide
RyanTheTide merged commit 838af99 into aurora-silicon:integration/aurora Nov 8, 2026
3 checks passed
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merged, thanks @dmitzsaz. It will ride the next fleet kernel.

RyanTheTide added a commit that referenced this pull request Nov 8, 2026
Brings #1122, #1123, #1124 (T8142 DART/MTP/MSI), #1176 (G17 fw-id fence),
#1201 (J700 speaker full scale) and the rest of integration since
11943fb into aurora-wip.

Conflicts were in four device-tree binding documents only, where
aurora-wip has the T8152 versions and integration the T8142/T8152/T6050
generalisation:
- apple,admac: keep both the lone apple,t8152-admac and the
  apple,t6050-admac/apple,t8140-admac pair.
- apple,t8152-aop: take integration (it still allows a lone
  apple,t8152-aop, one or two mailboxes).
- apple,t8152-aop-audio: take integration and keep a lone
  apple,t8152-aop-audio compatible.
- apple,dwc3: keep the T8152 host-mode rules, and require resets and
  usb-role-switch on every enabled non-T8152 controller.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
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.

2 participants