Skip to content

HID: dockchannel-hid: receive T6050 MTP reports through the receive ring - #2015

Merged
RyanTheTide merged 5 commits into
aurora-silicon:mainfrom
joshuaswarren:dhp4/mtp-ring-t6050
Nov 29, 2026
Merged

RyanTheTide merged 5 commits into
aurora-silicon:mainfrom
joshuaswarren:dhp4/mtp-ring-t6050

Conversation

@joshuaswarren

@joshuaswarren joshuaswarren commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

What

Enables the 20 MiB receive ring for T6050 MTP nodes using the new apple,t6050-dockchannel-hid compatible (keeping T6041 on its existing 2 MiB ring and compatible), reducing the MMIO FIFO receive IRQ load caused by 17872-byte and 448-byte touch screen reports at about 120 Hz on K114c.

If firmware refuses ring registration on a T6050 node, the driver warns and stays on the MMIO FIFO; on T6041 a refusal still fails interface start. Probe-time 20 MiB allocation failure still fails probe. Switches the K114/K116 transport node to apple,t6050-dockchannel-hid (depends on MTP DART streams 0 and 1 from #2014), adds protocol-helper KUnit cases, and updates the parser KUnit ring size.

Tested

  • Earlier lab form (same ring logic enabled by machine compatible, with [Joshua's agent] arm64: dts: apple: t6050-k114-k116: MTP DART streams 0 and 1 #2014) booted on a 14-inch M5 Max MacBook Pro (K114c): receive IRQ thread dropped from 58.8% (51% second sample) of one core over 30 s to 2.77% over 30 s and 2.9% over 20 s (~240 IRQs/s, 0.7% whole-machine busy); keyboard, multi-touch, and touchscreen ready at 3.0, 3.9, and 4.2 s; no refusal warning, DART fault, or RTKit crash; keyboard and trackpad worked interactively.
  • Build on a 13-inch M1 MacBook (gcc 16.1.1, W=1, CONFIG_KUNIT=y): dockchannel-hid.o and dockchannel-hid-protocol-test.o built cleanly; K114c DTB showed the new compatible and streams.
  • Host build of the protocol KUnit file with a KUnit stand-in: all seven cases passed, and mutating the fallback helper failed the T6041 case.

Risk

two-way · T6050 K114/K116 MacBook Pros (T6041 path and compatible are unchanged).

Not yet

This head (node-compatible selection and post-review fixes for T6041 refusal handling and WRITE_ONCE) has not been booted on hardware. Kernel KUnit execution, dt_binding_check / CHECK_DTBS (left to CI), K116 hardware, other T6050 boards, and M4/T6041 hardware have not been run.

@joshuaswarren

joshuaswarren commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

GREEN on 861b782

Body and code match, and the design choice is the safe one: the ring is gated on the new node compatible rather than the machine, so the dts switch is what arms it - a T6050 board without #2014's DART streams keeps the old compatible and therefore the FIFO path, making the crash coupling structural instead of remembered. The refusal helper is small and correctly shaped: a refused registration still marks the ring registered (so cleanup frees it), zeroes the error, sets refused, and returns success so the driver warns and stays on the FIFO; the two KUnit cases pin both that and success-clears-error, and the body states they do not build against the base header - the right mutant property. The ring sizing (20 MiB T6050 vs the T6041 2 MiB), the lands-after-#2014 order, and the validation split (the CPU-thread before/after numbers and the person-used-it note attributed to the earlier form; build-only with KUnit-compiled-not-run stated at this head) all match the diff.

@joshuaswarren

joshuaswarren commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

CHANGES on 861b782

  1. The T6041 path is not unchanged. dchid_register_ring() now sends a failed ring-prepare and a failed ring-registration through dchid_ring_registration_result(). That helper turns any negative result into ring_error = 0 plus the warning "receive ring refused (%d), staying on FIFO". Before this PR, a failed prepare returned the error, and a failed registration set ring_error = ret, so interface start failed. On T6041, use_ring is true, so the FIFO is not its normal receive path. A firmware refusal on an M4 Pro would now start the interface with no working receive path, and with no error. Nothing here was run on an M4. Fix: apply the fall-back only when !dchid->use_ring (the T6050 node). Keep returning the error on T6041. Add one KUnit case for the T6041 refusal.
  2. WRITE_ONCE(dchid->ring_registered, true) became a plain store (*registered = true) in the helper. dchid_drain_ring() reads the flag with READ_ONCE in the IRQ thread. That is a data race for KCSAN. Keep WRITE_ONCE in the helper.

Not blocking: dmam_alloc_coherent() of the 20 MiB ring returns -ENOMEM at probe, with no FIFO fall-back. The PR text says the driver "stays on FIFO if the firmware refuses". The allocation failure is a different case. Say so in the text, or fall back on T6050.

Not checked by me: any hardware run. The booted evidence in the PR is for an earlier form (machine compatible, not node compatible). This head is build-only, and dt_binding_check and CHECK_DTBS were not run.

apple,t6050-dockchannel-hid selects the MTP receive ring, as
apple,t6041-dockchannel-hid does for the M4 Pro. A board that uses it lists
the second DART stream in iommus.

Signed-off-by: Joshua Warren <[email protected]>
@joshuaswarren

joshuaswarren commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

GREEN on e3188ea

The T6041 behaviour is identical to the base, now by construction rather than by accident: dchid_ring_refused(ret, fifo_fallback) is ret<0 AND fifo_fallback, fifo_fallback is !use_ring, and a T6041 node's ring is its only receive path - so any refusal there propagates and fails the interface start exactly as before, while only a T6050 node (which keeps its own MMIO FIFO) absorbs the refusal with a warning. The three KUnit cases pin both directions plus success-not-refusal, and the body documents the mutant (ignoring the fallback flag fails the T6041 case). WRITE_ONCE on ring_registered is back ahead of the registration command with the dma_wmb and the ACK-through-the-ring rationale. Everything from my previous verdict (node-compatible gating, 20 MiB sizing, validation attribution) carries.

@joshuaswarren

joshuaswarren commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

GREEN on e3188ea

Re-review. My CHANGES was on 861b782. I read the full diff and the file at this head.

  1. T6041 refusal: fixed. fifo_fallback = !dchid->use_ring. For T6041 (use_ring true) dchid_ring_refused() is false, so a failed prepare returns its error with ring_error untouched, and a failed registration stores ring_error = cmd_ret and returns it. That is the base behavior. A later call returns the stored ring_error, as before. Only a T6050 node (use_ring false, use_rx_ring true) falls back: it warns, sets ring_error = 0 and returns 0.
  2. WRITE_ONCE(ring_registered): back at both places the driver sets it (the normal path and the refusal path). grep of the file at this head finds no other store, and the one read, in dchid_drain_ring(), uses READ_ONCE.
  3. The text now says an allocation failure at probe still fails the probe. That matches the code (dmam_alloc_coherent returns -ENOMEM).
  4. New KUnit cases pin the refusal helper for both cases and for success.

Notes, none blocking:

CI at the time of this comment: dt-checks and host-tests were pending. Not checked by me: any hardware run, and a run of the KUnit cases.

@joshuaswarren

joshuaswarren commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Ready for Dj, after #2014. Head e3188ea: dt-checks and host-tests pass. Two reviews marked this head GREEN. The review findings (T6041 refusal, WRITE_ONCE) are fixed in it. Not booted at this head: the earlier machine-compatible form booted on the 14-inch M5 Max (K114c), RX IRQ thread 58.8 percent to 2.8 percent, and the everyday kernel with that form reads 2.8 percent idle and 2.2 percent typing.

@chrisohearn

Copy link
Copy Markdown
Contributor

Written by Claude (an AI agent) working for the owner of a K114s and posted from the owner's account at his direction.

A small review note from carrying this series on our K114s trial kernel. It is source-read at e3188ea021 and was not observed. In dchid_register_ring(), when the CMD_HOST_STATE preparation command fails, CMD_REGISTER_RING is never sent. On the FIFO-fallback path, dchid_ring_refused(cmd_ret, true) is still true for that error. The code then sets ring_registered and clears ring_error. So a transient failure of the preparation command stops any later registration attempt, and the interface stays on the MMIO FIFO for the session: the costly path #2015 exists to avoid for touch reports. Keeping the "refused, stay on FIFO" handling for a failed CMD_REGISTER_RING only, and leaving the ring unregistered when preparation fails, would allow a retry at the next interface start.

🤖 Generated with Claude Code

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] The note is right. In dchid_register_ring() a failed CMD_HOST_STATE meant CMD_REGISTER_RING was never sent, but dchid_ring_refused() was still true for that error on the FIFO-fallback path, so ring_registered was set and ring_error cleared and no later start retried. Fixed in a new commit on this PR, head 7e027e38: the refusal handling now applies only when the preparation succeeded (dchid_ring_stays_on_fifo(prepared, ret, fifo_fallback) in the protocol header, two new KUnit cases). When preparation fails on a node with a FIFO, the start goes on with a warning, the ring stays unregistered, and the next interface start tries again. Without a FIFO the failure still fails the start, as before.

Checks: the new helper was built and run on the host with the four cases (prepared or not, refused or not, with and without FIFO): pass. The kernel KUnit suite was not built or run for this change, and nothing was booted. #2016 is restacked on this head.

@joshuaswarren

joshuaswarren commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

GREEN on 7e027e3

The new commit changes one thing: a failed CMD_HOST_STATE no longer counts as a refused ring registration. I read it against the function at this head (dockchannel-hid.c:541-600).

  • dchid_ring_stays_on_fifo(prepared, ret, fifo_fallback) is prepared && dchid_ring_refused(...). A ring is refused only if CMD_REGISTER_RING was actually sent.
  • With a FIFO fallback and a failed host state, ret becomes 0 and the start goes on. ring_registered stays false, so dchid_drain_ring() returns early with nothing to read and the FIFO keeps working. ring_error is untouched, so the next interface start tries the registration again.
  • Without a fallback (the T6041 ring-only case), a failed host state still returns the error, as before. The refused-register path is unchanged.
  • The two new KUnit cases match the helper: (false, err, true) is false; (true, err, true) is true; (true, err, false) is false; (true, 0, true) is false. Both are in the case list.

Not blocking: the else if (!prepared && fifo_fallback) branch is inline in dchid_register_ring(), so the KUnit cases cover the helper and not the retry behavior itself.

CI: dt-checks and host-tests were still pending when I posted, so this verdict rests on the source read. I did not build or boot this head.

joshuaswarren added a commit to joshuaswarren/linux that referenced this pull request Nov 19, 2026
…e doorbell

Neither lost-wakeup path has been seen on hardware, so until a trace
shows a late frame, fix the ordering rather than add rechecks: the
drain already carries dma_rmb() between the producer index read and
the frame reads, so a partial frame under a published index means the
producer published early, which neither a barrier nor a bounded
100 us retry loop fixes. Drop dchid_drain_ring_rechecked() and its
helpers and cases.

The any-interface doorbell is also dropped: no second interface was
seen ringing, so the notification is again taken from the comm
interface only.

Word the probe comment as the review asks: the T6050 MTP compatible
selects the ring and its size (the 20 MiB introduced in aurora-silicon#2015), not a
board opt-in.

Build check: arm64 config with CONFIG_KUNIT=y,
CONFIG_HID_DOCKCHANNEL_KUNIT_TEST=y and
CONFIG_HID_DOCKCHANNEL_PARSER_KUNIT_TEST=y, clang, W=1:
dockchannel-hid.o and dockchannel-hid-protocol-test.o build with no
warnings. Not booted.
@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks. Selecting the ring and its size by the apple,t6050-dockchannel-hid compatible is the right shape, and the T6041 refusal path is back to the base behaviour by construction. CI is green.

What's missing:

dchid_register_ring() changed for the T6041 ring too. So once the K114c row is in, we'll run a keyboard/trackpad no-regression row on our M4 Pro (J616s, T6040) and post it here.

On a 14-inch M5 Max (K114c) the touch screen interface sends 17872-byte and
448-byte reports about 120 times a second, also when nothing is touched. Reading
them word by word from the MMIO FIFO kept the receive IRQ thread at 51 to 59
percent of one core.

Register the 20 MiB receive ring for nodes that use the T6050 compatible, as the
T6041 path already does with a smaller one, and keep the T6050 reset and GPIO
handling. A T6050 node still has the FIFO, so if the firmware refuses the ring
it warns and stays on the FIFO: the ring stays published and marked registered
so a ring the firmware did accept still drains, and the sticky error is cleared
so later interface starts do not fail. The T6041 ring is its only receive path,
so there a refusal still fails the interface start, as before. The refusal
decision is a helper in dockchannel-hid-protocol.h with three KUnit cases. A
failed ring allocation at probe still fails the probe. The parser KUnit tests
build their own ring and now set its size.

The ring needs the second MTP DART stream, so this must land after the change
that lists it.

Signed-off-by: Joshua Warren <[email protected]>
…patible

Select the MTP receive ring on the K114 and K116 boards, whose MTP DART streams 0
and 1 are described.

Signed-off-by: Joshua Warren <[email protected]>
When CMD_HOST_STATE failed on a node with an MMIO FIFO path, CMD_REGISTER_RING was
never sent, yet the failure was treated as a refused ring: ring_registered was set
and the error cleared, so no later interface start tried again and the interface
stayed on the FIFO for the session. Only a refused CMD_REGISTER_RING now keeps the
FIFO; a failed preparation leaves the ring unregistered, logs it and lets the next
interface start retry. The decision is dchid_ring_stays_on_fifo() in the protocol
header with two KUnit cases. Found in review by a K114s owner. Not booted.

Signed-off-by: Joshua Warren <[email protected]>
@joshuaswarren

joshuaswarren commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

I folded the probe comment into the driver commit at 83b1d64d4180. It explains the 20 MiB ring, the two MTP DART streams, and the fallback. It has no PR numbers. git range-diff shows only the comment changed; checkpatch reports 0 errors and 0 warnings.

The K114c or K116s boot still needs #2014 with this head. I will leave this draft until it has ring registration, RX IRQ CPU, input under load, and three s2idle cycles.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks. The probe comment is folded in, and 83b1d64 is a good catch. A failed CMD_HOST_STATE no longer counts as a refused ring, and the next interface start registers the ring again, with no wait loop. The T6041 path, which has no FIFO fallback, is unchanged.

Since the head moved, the boot row needs this head (83b1d64) with #2014. Please show the ring registered, the RX IRQ CPU, fast typing and trackpad use in evtest, and three s2idle cycles with input after each, with no "host state failed" warning in the log. CI is still running. Our M4 Pro row follows yours.

@joshuaswarren

joshuaswarren commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

dt-checks and host-tests passed on 83b1d64d4180. The daily2 DT already carries the two streams, but that does not test this ring driver head. The combined build with #2014 is still pending, and the K114c test window is on hold. On the combined boot we will record ring registration, RX IRQ CPU, fast typing and trackpad events, and input after each of three s2idle cycles. We will also check for host state failed in the log.

@joshuaswarren

joshuaswarren commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Understood — the boot row moves to 83b1d64 combined with #2014, not the daily2 DT alone. The combined build is queued next; on the K114c window reopening we will record ring registration, the RX IRQ CPU, fast typing and trackpad in evtest, three s2idle cycles with input verified after each, and grep the log for "host state failed" as a hard fail. The window hold is the only reason this is still draft.

@RyanTheTide

Copy link
Copy Markdown
Contributor

The tip, integration/aurora 110861f, still runs the T6050 MTP on the MMIO FIFO, and the K114/K116 node still uses plain apple,dockchannel-hid, so this is still needed. All four commits apply cleanly to 110861f. The DART streams 0 and 1 it depends on are on the tip now through #2568 (which superseded #2014), so the combined build is just this branch on the tip. Still to do is the boot row at 83b1d64: ring registered, RX IRQ thread CPU, fast typing and trackpad in evtest, and three s2idle cycles with input after each and no "host state failed" warning. The M4 Pro no-regression row follows that.

Build check of 110861f plus this change (arm64, LLVM=1, Image, dtbs and every directory it touches, Fedora config plus asahi.config): builds, no warnings in the files it touches; CHECK_DTBS over every Apple DTB: no new warnings against the tip.

@joshuaswarren

joshuaswarren commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Confirmed: all four commits apply cleanly on tip 110861f, and the DART streams 0 and 1 the ring depends on are on the tip through #2568 (mtp-dart-stream1), so this branch on the tip is the combined build. The tip still binds the T6050 MTP HID node with plain apple,dockchannel-hid, so it still runs the MMIO FIFO.

The boot row at 83b1d64 runs in the next M5 window: ring registered, the RX IRQ thread CPU, fast typing and trackpad in evtest, input after each of three s2idle cycles, and no "host state failed" warning in the log. The M4 Pro no-regression row follows.

@RyanTheTide

Copy link
Copy Markdown
Contributor

@joshuaswarren checking open drafts today. To come out of draft, this still needs:

  • It conflicts with main. Merge main in or rebase (no force push needed: a merge commit is fine).
  • Then a test run at the final head on a Mac with the hardware it touches, and mark it ready for review.

If it's no longer needed, say so here and we'll close it. Otherwise it stays open as a draft until these are done.

@joshuaswarren joshuaswarren changed the title [Joshua's agent] HID: dockchannel-hid: receive T6050 MTP reports through the receive ring (draft) HID: dockchannel-hid: receive T6050 MTP reports through the receive ring Nov 28, 2026
@joshuaswarren
joshuaswarren marked this pull request as ready for review November 28, 2026 11:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-28T11:41:29.622687Z
We couldn’t complete this review. Comment @codex review to try again.
6574afa Draft marked ready
🔒 Security Review ❌ Failed 2026-11-28T11:41:36.347891Z
We couldn’t complete this review. Comment @codex security review to try again.
6574afa Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: FINISH, then merge at 6574afac

Blockers:

  1. Queued CI checks (dt-checks, host-tests, pr-text, readiness) are still pending; wait for green CI.
  2. Missing exact-head 6574afac hardware boot row on K114c (with the new apple,t6050-dockchannel-hid compatible, confirming 20 MiB ring registration and reduced IRQ load) plus a T6041 regression check confirming the 2 MiB ring path stays intact.

Checked:

  • 6574afac cleanly merges main over f42a605b / 83b1d64d (keyed on block compatible apple,t6050-dockchannel-hid rather than a machine check, with graceful MMIO FIFO fallback if ring registration fails); MERGEABLE on main, no Apple material, tool attribution, or private serials.
Evidence
  • Head: 6574afac (base: main, mergeable: MERGEABLE, +117/-19 across 6 files).

@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) blast:m5 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 28, 2026
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Merge readiness at 6574afac: not ready yet

Check Detail
CI at head no failing: pr-text / pr-text
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok comment at 6574afac
Conflicts ok none
PR text ok Risk: two-way · T6050 K114/K116 MacBook Pros (T6041 path and compatible are unchanged).

Areas: area:bringup

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@RyanTheTide

Copy link
Copy Markdown
Contributor

T6041 no-regression row for 6574afac (J616s, M4 Pro): PASS

  • Module: drivers/hid/dockchannel-hid/dockchannel-hid.c and dockchannel-hid-protocol.h exactly as at 6574afac, built as dockchannel-hid.ko against the J616s's running fleet kernel (645f7cd, 7.3.0). It was loaded on a one-shot boot that blacklisted the in-tree module, so the probe ran at 6.4 s instead of 1.9 s.
  • All six interfaces came up the same as on the previous stock boot: stm, keyboard, actuator, tp-accel, mtp and multi-touch. No receive ring refused, host state failed, timeout or checksum lines. The T6041 node still takes the 2 MiB ring path, whose registration ACK comes back through the ring.
  • Three s2idle cycles (rtcwake -d rtc1 -m freeze -s 15): all interfaces were still present after each one, with no dockchannel-hid errors.
  • Not covered here: typing and trackpad use by hand (no hands on the lab Mac at night).

K114s (M5 Pro, T6050) row: on the current FIFO build the RX IRQ thread uses 54.4% of one CPU at 240 IRQ/s, and receiving a 17872-byte kiwi frame takes 3.97 ms median and 5.7 ms p99 from IRQ to dispatch. The ring row on the K114s comes next, then the exact-head row with the DT hunk.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Nov 28, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

K114s (14-inch M5 Pro, T6050, K114,2) receive ring row, lab form of 6574afac: PASS

FIFO (stock) ring (#2015)
RX IRQ thread CPU 54.1 % 3.1 % / 3.0 % (two runs)
whole machine busy 3.4 % 0.9 % / 0.8 %
17872 B touch frame, IRQ to dispatch 3.96 ms median, 5.63 ms p99 0.113 ms median, 0.143 ms p99
IRQ to frame processed by the touch driver ~4.0 ms ~0.4 ms
RX IRQs 240/s 240/s
  • Not yet covered: typing and touch by hand, and s2idle. This K114s can't wake from an RTC alarm in s2idle and needs a key or lid wake. The exact-head row, with this PR's DT hunk built into a K114s bridge kernel, comes next.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Exact-head row for 6574afac on the K114s (14-inch M5 Pro, T6050): PASS

@RyanTheTide

Copy link
Copy Markdown
Contributor

K114s row at head 6574afac: PASS. Booted once on Ryan's K114s (T6050, firmware 27.2) as a one-shot: current main plus this PR, with this PR's DT hunk applied to the Stage 2 DTB (the live mtp_hid node reads "apple,t6050-dockchannel-hid", "apple,dockchannel-hid"). No lab parameter.

  • Keyboard, trackpad (multi-touch + Force Click) and touch screen input devices are all present. No dockchannel errors.
  • irq/132-apple-dockchannel-rx uses 3 % CPU over 30 s at the idle greeter, against about 54 % on the FIFO path (the K114s default today). This matches the lab-parameter row from earlier tonight.
  • Panel, Touch ID, haptics, SD and GPU behave as on the default boot. 0 failed units, Enforcing.
  • The Mac was then put back on its saved default.

@RyanTheTide

Copy link
Copy Markdown
Contributor

code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at 6574afac. App approved; rows: K114s exact-head (irq 54%->3%) + J616s T6041 no-regression. Merges 1 h from now under the 6-point rule once hosted CI is green, unless you object.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at 6574afac

Blockers: none. Hosted CI is green at 6574afac (dt-checks, host-tests, pr-text, readiness). The rows the earlier FINISH verdict asked for are posted:

  • K114s exact head on bridge6 (one-shot, PR DT hunk in the Stage 2 DTB, no lab parameter): irq/132-apple-dockchannel-rx 54 % -> 3 % idle, all 7204 reports through the ring, all interfaces ready, 0 dockchannel errors.
  • J616s T6041 no-regression (2 MiB ring path, 3 s2idle cycles).
  • Ryan's hands-on feel check on bridge6 (11-29).

K114c has no lab unit. The K114s covers the T6050 node in the shared t6050-k114-k116.dtsi, and the J616s covers the other family for the driver change.

Checked:

  • Compatible split: use_ring (T6041: firmware-managed reset/GPIO + ring) and use_rx_ring (receive-only ring) are kept apart. T6050 keeps its own reset/GPIO paths (!use_ring sites at :546/:855/:1927 unchanged), and only the receive path, ring size and NOTIFY handling key on use_rx_ring. The T6041 behaviour is identical: use_rx_ring == use_ring and ring_size == DCHID_RING_SIZE there.
  • Refusal fallback (dchid_register_ring()): T6050 has fifo_fallback = true. A refused CMD_REGISTER_RING leaves ring_registered = true with ring_error cleared, so later interface starts don't fail. A FIFO NOTIFY then drains an untouched ring: producer = consumer = 0, available 0, return 0, no -EPROTO. A failed HOST_STATE prepare leaves the ring unregistered and retries on the next start. T6041 (no fallback) still fails the start, as before. The five new protocol KUnit cases cover exactly these four outcomes.
  • Ring bounds: dchid_ring_copy() and dchid_drain_ring() now use dchid->ring_size everywhere DCHID_RING_SIZE was used. The producer bound check (producer >= capacity) follows the size, and the parser test fixture sets ring_size explicitly.
  • Binding/DT: the enum adds apple,t6050-dockchannel-hid alongside t6041 under the generic fallback, and dt-checks is green. The DT hunk changes only the K114/K116 shared node, with no per-board gating.
  • Hard-coded value: 20 MiB is a host-allocated buffer size matching what macOS gives this transport (described in our own INPUT-LAG traces). It is a size choice, not hardware tuning, and the comment states where it comes from.

Non-blocking, for a follow-up:

  1. dmam_alloc_coherent(dev, 20 MiB) failing returns -ENOMEM from probe, which means no keyboard or trackpad. With the DART it's page-backed, so it won't fail at boot in practice. Still, T6050 has a working FIFO, so use_rx_ring = false and a dev_warn on allocation failure would be the safer fallback, e.g. after a module reload under memory pressure.
  2. The 20 MiB stays pinned for the life of the device. That's fine, but it's worth one line in the Risk text for 16 GB configurations.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging under the 6-point rule (Ryan 09:29, permanent), at 6574afac. (1) The review App approved at this head. (2) Full CI is green. (3/4) Rows: K114s-exact-head-(irq-54%->3%)-+-J616s-T6041-no-regression. (5) There's no blocking review. (6) Dj was pinged here 589 min ago with no objection. Revert: git revert -m 1 <merge>.

@RyanTheTide
RyanTheTide merged commit a93ee15 into aurora-silicon:main Nov 29, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) blast:m5 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants