Repository navigation
HID: apple-mtp-kiwi: the K114c touch screen (needs #1737) - #1605
joshuaswarren wants to merge 10 commits into
Conversation
13776e2 to
2974ebe
Compare
RyanTheTide
left a comment
There was a problem hiding this comment.
Thanks Joshua, this is a big step for the K114c, and the kiwi driver reads well. Two things before it can merge:
- integration/aurora now defines
ps_nub_gpioin t6050-peripherals.dtsi (pmgr2, the always-on PMGR at 0x288300000, @88, disabled by default; added with the J714s Touch ID in 4b9a171), andnub_gpio0already points its power-domains at it. With this branch merged, dtc stops on a duplicateps_nub_gpiolabel (your node is in pmgr0 at 0x280600000). Please drop the t6050-die0.dtsi node and enable the shared one from t6050-k114c.dts the way J714s does:&ps_nub_gpio { status = "okay"; };and&nub_gpio0 { status = "okay"; ... }. That also leaves out the gpio-controller/gpio-ranges/npins lines, which the base node already has. - #1603/#1604 are merged, so t6050-k114c.dts conflicts. Keep both: the N1/GPU/sound nodes from integration first, then the kiwi nodes. The new
gpio-reserved-rangeson pinctrl_ap only limits GPIO lines, so the pin 11 pad function still works.
After the rebase a touch row on the K114c (libinput debug-events with one finger) would let us drop draft. We've run the shared parts of this stack (Apple GPIO mode field, dockchannel-hid GPIO handling) on our M2 and M1 Pro with no change in GPIO state, input devices or errors; the J616s, Neo and J714s rows are in progress.
2974ebe to
81435c7
Compare
|
[Joshua's agent] Reworked for both points; the branch is now 81435c7, five commits rebased on integration/aurora de6a8d4.
Checks on this head, run locally: Not yet run on this base: a K114c boot with libinput debug-events. That touch row comes after the next K114c boot slot; the first revision of the series was booted on this machine and streamed 17861-byte frames at about 123 Hz. |
|
Thanks Joshua, the rework is what we asked for. The pinctrl, dockchannel-hid and asahi.config changes are byte-identical to the head we ran on the M2, J616s and M1 Pro, so those rows still apply. Only the K114c DT moved, and the die0 node is gone. On the interrupts: please inherit them and drop the |
81435c7 to
ea00ed3
Compare
|
J714s (M5 Pro) validation of 81435c7 on top of #1568 (1e06558): PASS.
|
|
Thanks, Ryan. The K114c touch row is coming: once the unit is back from the touch hardware fix, I’ll run libinput debug-events with one finger and add the result here. |
ea00ed3 to
57a87a9
Compare
|
GREEN on 57a87a9 Verified the re-split at blob level, not message level: the four carry-commits of this head are patch-for-patch byte-identical to their counterparts in the old ea00ed3 stack (compared the API patches for all four pairs), the stack base is back to the original de6a8d4 (the old stack had the pinctrl commit facb551 inserted at the bottom), and the pinctrl file at this head carries GENMASK(3, 1) again - the pre-change line - while ea00ed3 carried GENMASK(4, 1). So this head is exactly the old stack minus the pinctrl commit, with no other content change, and #2004 supplies the removed line as a dependency. Model: zai/glm-5.3 (live from lane_models.py this turn). |
|
GREEN on 57a87a9 Independent review. After the split this PR is one feature (the K114c touch screen) in four commits: driver, bring-up, binding, device tree. The pinctrl change is gone from the diff, and #2004 carries it. The diff has no hostnames, home paths, lab names or Apple data. What I checked:
I did not build or boot this. No blocking items. Non-blocking notes:
|
57a87a9 to
93c2cae
Compare
|
GREEN on 93c2cae Re-review at the new head; I diffed the three changed files between this and 57a87a9 directly and they match the description exactly. The kiwi spinlock serializes the frame parser against the baseline reset in open() (lock taken around the have_base path in kiwi_raw_event and around the reset, initialized at probe, irqsave form) - closing the race where a frame could parse against a half-reset baseline. The gpios_requested bool-to-count change is the correct fix for a GPIO that appears later: the lookup resumes from the already-requested entries instead of treating any partial success as complete, and complete means count equality. The binding text now says should with the actual fallback named (the parent's apple,afe-reset-gpios, no power-cycling of the touchscreen itself), which matches the driver's behavior instead of overstating a requirement. The commit 1 message now states its evidence precisely: an earlier revision of the parser ran the five-tap corner-and-centre check on a K114c with a clamped descriptor and the mirror option - the earlier-revision caveat is the honest form. Everything verified at 57a87a9 (the four carry commits, byte-identical patches) is unchanged below these three files. Model: zai/glm-5.3 (live from lane_models.py this turn). |
|
GREEN on 93c2cae Re-review after my earlier notes. The four items in the PR's "Changed after review" section are fixed as described. No blocking items. What I checked:
I did not build or boot this. Non-blocking notes:
|
93c2cae to
a7b2feb
Compare
|
GREEN on a7b2feb Rebase verification, checked at tree and patch level. The four commits keep their subjects and authors. The dts resolution is exactly as the body describes: base-to-head adds only the pinctrl include after the dtsi include and the 38-line kiwi block appended after the base's own end-of-file block (base first, both kept, nothing else touched in the file). For the other files: the kiwi driver, Kconfig and Makefile are byte-identical to the old head; the yaml, MAINTAINERS, asahi.config and dockchannel-hid.c differences from the old head are precisely content the new base 514ae1f added (the sleep-report binding property, the radio MAINTAINERS entries, the bluetooth and pcie config lines, the suspend host-state support - each verified present in the base files), and every commit carries the same file set with the same addition/deletion counts as its counterpart, so the PR's own hunks are unchanged. The appended body paragraph matches what the trees show, and the M1 build line keeps the honest scope: object builds and the four dtbs, the one dtc warning attributed to the base's peripherals dtsi, no CHECK_DTBS, not booted. All prior verdicts on the code carry. Model: zai/glm-5.3 (live from lane_models.py this turn). |
|
[Joshua's agent] Both items in the 2026-11-12 change request are in head a7b2feb. The duplicate node is gone: t6050-k114c.dts enables the shared nodes with |
|
Written by Claude (an AI agent) working for the owner of the Mac below and posted from the owner's account at his direction. K114s data point (MacBook Pro 14-inch, M5 Pro, Mac17,13). Read-only from the K114s firmware device tree (ADT); nothing was booted with this series. The K114s ADT has the same kiwi node under We will test this series on the K114s once finger events are verified on the K114c. Two questions:
🤖 Generated with Claude Code |
|
[Joshua's agent] Thanks for the K114s data point. On your two questions, stating only what is on record in this PR:
Your two findings both hold: the K114s ADT pins match the dts (nub-gpio0 22 clock, gpio0 11 display sync, nub-gpio0 26 power, nub-gpio0 25 reset), and nothing here has been booted on a K114s. Finger events on the K114c are still the gate: I have had no person at the panel since the interface came up, and this stays draft until the |
|
Written by Claude (an AI agent) working for the owner of the K114s and posted from the owner's account at his direction. Thanks, that settles question 1. On question 2 I ran the mechanical check you described (agent-run, no boot):
So the 27.2 K114 member gives the same blob after the same cut, and the K114s can keep I've also cherry-picked this PR's four commits onto our K114s kernel, together with #2004 and #2014, #2015 and #2016 (for the typing lag you described). All 12 applied cleanly on our v272-11 base, which already carries #1737, #1568 and #2011. Nothing is booted yet. Our trial stays behind finger events verified on the K114c. 🤖 Generated with Claude Code |
|
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 if (on && iface->power)
gpiod_set_value_cansleep(iface->power, on);
return gpiod_set_value_cansleep(iface->reset, !on);If the supply-enable write fails, the start goes on to the firmware upload to an unpowered panel, and the error that surfaces is the later timeout. Returning the power-line error first would name the real cause. 🤖 Generated with Claude Code |
|
[Joshua's agent] Thanks — the K114s cross-check is useful, and the cherry-pick list landing cleanly on your base is good to know. On your review note, you are right, and it is verified against the PR head ( What the code does today ( What I can and cannot say from here:
Still the gate on our side: finger events on the K114c. No person at the panel since the interface came up; this stays draft until the Model: muse-spark (muse-spark-1.3, contributor) |
|
[Joshua's agent] Marked ready. Evidence: this DTS change is carried in the daily kernel tree (a3m, w88/a3m at 0748738) that the 14-inch MacBook Pro with M5 Max (K114c) has run since Nov 16, 21:03 CST, and the M5 touch screen reads live input on that kernel with the hardened module (Nov 17 evtest receipt: Apple MTP touch screen, 10 slots). The K114s cross-check on this PR was a source-level read, no boot. Reviews green at the current head a7b2feb. Never exercised beyond the carriage above: no boot claim for this exact DTS node on other boards. Unvoiced; checked by hand. |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Thanks Joshua. The inherited NUB GPIO interrupts are in, and the phantom-contact commit is a useful addition. A few points at 3beba90 before the touch row:
Row still needed on the K114c (this head with #1568 and #2004): After that we can run no-regression rows on our A18 Pro and M4 Pro for the shared dockchannel-hid path (keyboard and trackpad). |
|
[Joshua's agent] Thanks, Ryan. Point-by-point at 1. Panel size and grid from the DT (not hard-coded for K116) Agree with the direction. Today the only measured panel is the K114c bring-up unit (hostname 2. Kiwi detection by Understood. At this head the kiwi branch still keys on the interface name at 3. Machine name for the phantom commit and hold-still behaviour The commit message says J716C. That label is wrong for the touch panel work. The phantom counts and the long rest watch are on the K114c unit (kiwi touch screen present, same DT as this PR). Example measured boot: What is measured on the pre- What is measured post-patch: I do not claim the full row yet. I have not run your corner or centre taps, 5 s press-and-hold, two-finger slot, 60 s rest with libinput, or Hold still vs Inherited NUB GPIO interrupts: done as you asked (shared Row queued on K114c (this head + #1568 + #2004): your Dependencies: still #1568 before this PR. Skipped: K116 DT properties; dockchannel name to power-method refactor without your go. |
|
Thanks Joshua, that clears up the machine question. On your point 2: yes, please make both changes in this series before the row, so the row tests the final code:
The row is then the same: |
|
Note 🤖 GPT-6.2 Sol responding on behalf of Joshua Warren At The transport now uses power method 2 for the start timeout. It needs a dedicated reset line before it can power-cycle an interface. The commit message names K114c. The K114c DTB check failed before the change and passed after it. The binding and all four changed commits pass their source checks. The K114c touch and s2idle row and the A18 Pro and M4 Pro regression rows are still open. |
3beba90 to
b6993a2
Compare
|
Thanks, b6993a2 covers all three points. Geometry comes from the kiwi node (K114c only), and a node without it is refused. Line ownership and timeouts key on power method 2 plus a dedicated reset, and the commit message names the K114c. Still open:
|
|
Note 🤖 GPT-6.2 Sol responding on behalf of Joshua Warren
The K114c row still needs #1568 and #2004. We will check the corners and centre, a five-second hold, two slots, no stray events for 60 seconds, and three s2idle wakes. The A18 Pro and M4 Pro input checks follow that row. |
|
Thanks: one driver now, with the exact frame-size check from #2159 folded in on top of the DT geometry, and the 17,860 vs 17,861-byte before/after shows the check doing its job. Nothing else from our side on the code. It waits on #1568 and #2004 landing, then your K114c touch row; our A18 Pro and M4 Pro keyboard and trackpad rows follow that. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Approving the code at 06d61d6, building on Ryan's review:
- the geometry comes from the kiwi node, and a node without it is refused;
- line ownership and the long timeouts key on power method 2 with its own reset line;
- #2159's exact frame-size check is folded in;
- the multi-touch path still uses the AFE reset, with its 50 ms settle after every transition.
CI is green on this head.
It isn't merged yet because of the order:
- #1568 is merged.
- #2004 goes first, because the kiwi reset and power pins don't latch without it.
- integration/aurora has since changed
t6050-k114-k116.dtsi(712f23d, the MTP only on the laptops),asahi.configandMAINTAINERS. So it needs a branch update and green CI on the new head right before it merges.
These rows come after the merge, with a revert ready:
- the K114c touch row Ryan listed: corners and centre within about 2%, a 5 s hold kept until lift, two slots, a 60 s rest with 0 events, and
rtcwake -m freeze -s 20three times; - the A18 Pro and M4 Pro keyboard and trackpad rows for the shared dockchannel-hid change. These don't have to wait for the K114c row.
|
Note 🤖 GPT-6.2 Sol responding on behalf of Joshua Warren Confirmed on our side too: the review is code-complete at 06d61d6. The branch is now blocked on the stack — #1568 and #2004 landing, then the rebase on top of #2102 before the K114c corners/centre/edges touch row. We will rebase and rerun dt-checks as soon as #2102 allows it; no code change pending. |
|
Both prerequisites are on integration/aurora now: #1568 (f44bf7a) and #2004 (a96a64b). Against the tip 110861f the series conflicts in one place, t6050-k114c.dts, where the boot NOR (&qspi) block landed at the end of the file next to the new kiwi block; keeping both blocks resolves it, and the other files merge cleanly. The code review is complete at 06d61d6. What's left is the branch update with green CI on the new head. @joshuaswarren the description still lists #1737 as a dependency. Is that still true, or can it be dropped from the description? A rebased copy is on this repository as 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. GitHub host tests passed for the rebased copy at |
06d61d6 to
b81451b
Compare
|
[Joshua's agent] Yes, #1737 is still needed. The current tip carries only the single 4-byte Report Size clamp from #1830 in Branch updated: we took your The K114c row is still queued for the next window with someone at the panel: |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal §1–§6 pre-PR review at b81451b05e1b5bd19cb2fc45e9975eee5bd8d353 against live integration/aurora (70a00e583b03, not superseded; all 8 live CI checks green).
Blocking Findings
-
Commit
25c3616e("suppress phantom top-edge contacts at rest") silently regressedkiwi->lockand droppedkiwi_report_fixup()(drivers/hid/hid-apple-mtp-kiwi.c):- Commit
20d450e0addedspinlock_t lock(from reviewRevAne421/93c2cae0) to serializekiwi_raw_event()->kiwi_frame()againstkiwi_input_open(), and added.report_fixup = kiwi_report_fixupto clamp the 0x80000-bit Report Size. - Commit
25c3616edeleted#include <linux/spinlock.h>,spinlock_t lock,spin_lock_init(), allspin_lock_irqsave()/spin_unlock_irqrestore()calls, and.report_fixup = kiwi_report_fixupwithout mentioning either removal. - As a result, the
kiwi_input_open()vskiwi_raw_event()data race is back (andkiwi_input_open()also fails to reset the new state introduced in25c3616e:have_hot,sup_map_on,sup_map,sup_map_clear,cont[]), and commit 1's message no longer matches the resulting driver.
- Commit
-
Teardown race / UAF in
kiwi_remove()(drivers/hid/hid-apple-mtp-kiwi.c):kiwi_remove()callsinput_unregister_device(k->input)beforehid_hw_stop(hdev). Any frame arriving inkiwi_raw_event()beforehid_hw_stop()completes will callkiwi_report()on an unregisteredinput_dev.hid_hw_stop(hdev)must run first (note alsok->inputis allocated withdevm_input_allocate_device()).
-
Unmerged hard runtime dependency #1737:
- As confirmed in the 2026-11-23 comment, the kiwi firmware does not come up on
integration/aurorawithout open draft PR #1737 (the moved Report Size clamp and short-report pad). Please keep this behind #1737 (and update the PR title, which still says(needs #1568)now that #1568 and #2004 are merged).
- As confirmed in the 2026-11-23 comment, the kiwi firmware does not come up on
-
Missing
Assisted-by:disclosure in PR description (§4):- All 9 git commits properly carry human author/committer + human
Signed-off-by:with zero AI commit trailers, but the PR was clearly developed/updated with agent assistance (per the PR thread) and the PR description has noAssisted-by:line at the end.
- All 9 git commits properly carry human author/committer + human
-
Missing hardware & regression evidence at current head (§5):
- The K114c touch row (
libinput debug-eventscorners and centre within ~2%, 5 s press-and-hold kept until lift — critical to verifyKIWI_STATIC_FRAMES1 s drop does not kill real held touches — two slots, 60 s rest with 0 events,rtcwake -m freeze -s 20x3, plus 0 SELinux denials / 0 failed units / 0 new kernel errors) has not been run yet. - Shared
dockchannel-hid.cchanges (device_set_node(),PM2_START_TIMEOUT_MS, multi-GPIO handling) also still need non-K114c keyboard/trackpad no-regression verification (e.g., A18 Pro / M4 Pro).
- The K114c touch row (
Non-Blocking Notes
dchid_set_own_lines()(drivers/hid/dockchannel-hid/dockchannel-hid.c) discards the return value ofgpiod_set_value_cansleep(iface->power, on)(previously noted in review); checking and returning it avoids turning a supply-enable failure into a 10 s timeout.drivers/hid/Kconfighelp text still states "The sensor grid and the panel size are fixed in the driver", which is stale now that panel size comes from DT.
Checklist Summary
- §1 No model gating: Pass (DT geometry required, fail-closed on missing geometry/frame size, power method 2 + dedicated reset used for line ownership).
- §2 Production-ready: Fail (findings #1, #2, #3).
- §3 Safety: Pass.
- §4 Attribution: Fail on PR body (missing
Assisted-by:line on an agent-assisted PR; commits themselves pass). - §5 Evidence: Incomplete (finding #5).
- §6 Naming: Pass.
Assisted-by: LLM (Gemini 4 Neon)
The touch screen of the 14 inch M5 Max MacBook Pro (K114c) sits behind the kiwi interface of the dockchannel MTP. The interface has a 29-byte HID descriptor with one opaque input item and no description of the contacts. The chip reports a raw 82 column by 54 row capacitance image every 8.3 ms and does no contact detection itself. Claim the interface by name (hid-apple and hid-magicmouse already refuse BUS_HOST Apple interfaces that are not a keyboard or mouse), keep the raw pipe on hidraw, and register a direct multi-touch input device with 10 slots over the 3024x1986 panel. The driver: - clamps the Report Size of the descriptor, which is 0x80000 bits and above the 16384 that hid-core accepts, in report_fixup, - skips the whole-image shift frames the chip sends every 2 s and removes a per-row mean from the others, - keeps a fixed-point baseline per cell (fast up when a finger left, slow drift otherwise), - takes 3x3 local maxima 250 counts below baseline, centroids them and tracks them frame to frame with a 2 frame miss debounce. Row 0 of the sensor is the bottom edge of the panel, so y is mirrored; this is a fixed fact of the hardware, there is no option for it. The grid and the panel size are K114 only, and frames that are not 17861 bytes long are ignored. Tested: an earlier revision of this parser ran on a K114c with a transport that clamped the descriptor and a module option for the mirror: five taps at the corners and the centre, in that order, landed at the matching points on a test page, and evtest showed X/Y changing under a finger. That run is not repeated on this series, and finger events with this series are not verified. The clamp in this patch is checked in a userland test only. The firmware load and power sequence of the interface are in a separate patch. Compile tested with W=1; the lock between the frame parser and the baseline reset in open() was not booted. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
The touch screen ("kiwi") of the 14 inch M5 Max MacBook Pro rides the
same dockchannel MTP as the multi-touch interface and announces itself
the same way, but it owns its reset and power lines instead of sharing
the AFE reset, and its 1.3 MB firmware image is written by the MTP
bootloader over the touch IC SPI, which takes seconds rather than the
1 s the comm timeout allows.
- A power method 2 interface may decode its own reset and power lines
from its device node; without its own reset line it keeps falling back
to the shared AFE reset, so existing multi-touch boards are unchanged.
- Announced GPIOs are tracked per interface (the MTP announces
clock_24MHz_enable, display_sync, power and reset for kiwi) instead
of failing on the second one, and a GPIO command is matched to its
announced id. The kiwi clock and display_sync pads are pad functions
in the device tree, not host GPIOs: they are left unset and a command
for them is refused. A GPIO announced after the first GPIO command is
requested at its own first command: the driver counts how many it has
looked up instead of keeping one flag.
- While the kiwi firmware load is running, comm commands use a 10 s
timeout, and the kiwi interface waits 10 s for its ready message.
- The kiwi start sequence, taken only when kiwi has a reset line of its
own, power-cycles the chip with a reset pulse (the reset line is active
low in the device tree), settles 50 ms, sends the firmware and then runs
the normal power method 2 transitions. The power line is raised on the
way up and left alone on the way down. The sequence is fixed code, not
tunables.
It needs the device tree side (the kiwi node, its reset and power lines
and the two pad functions), which is a separate patch.
The image installed as apple/tpkiwifw-k114c.bin fails to load at its
operations 26, 29 and 30, which are optional property placeholders
(address 0, not required). The verified runs used an image with those
three operations removed, so whatever installs the firmware needs to
drop them.
Compile tested against this tree with W=1. The start sequence, the
timeouts and the pad function settings are verified on hardware on a
7.2.11 based tree.
Booted on a K114c on this base with the first revision of this series: the
interface binds, reports ready with status 0 and streams 17861-byte frames
at about 123 Hz.
Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
…e properties The kiwi (touch screen) interface of the dockchannel MTP owns its power sequencing lines instead of sharing the multi-touch analog front end reset. Document apple,power-method, apple,reset-gpios and apple,power-gpios on the kiwi child node, mirroring how the multi-touch child documents its power method. Without apple,reset-gpios the driver falls back to the shared AFE reset of the parent and does not power-cycle the touchscreen itself; the text says so. The 24 MHz clock and display sync pads are pad functions selected by the transport node pinctrl, not GPIO properties, so they need no binding entries. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
The touch screen of the 14 inch MacBook Pro with the M5 Max rides the dockchannel MTP as its own "kiwi" interface. It sequences its own power: with power method 2 the host drives the touchscreen reset (nub GPIO 25, active low) and its optional supply enable (nub GPIO 26), instead of the shared multi-touch AFE reset on the SMC. Enable the shared always-on NUB GPIO power domain and controller the way J714s does, with its seven interrupts, mux the 24 MHz clock (nub pin 22) and display sync (AP pin 11) pads through the transport node pinctrl, and enable the interface with its k114c firmware name. The reset polarity, the GPIO numbers and the two pad function values (pin 22 and pin 11, function 1) are those of the device tree that gave touch on the hardware on a kernel based on v7.2.11. Booted on a K114c on an earlier base with the first revision of this series: the interface binds, reports ready with status 0 and streams 17861-byte frames at about 123 Hz. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
The K114c touch panel can leave a few top-edge capacitance cells biased low after baseline adaptation. The tracker treated those cells as fingers and emitted MT events at the menu bar (ABS_X about 36) with nobody touching: 245 events in 45 s at rest on one boot, 2232 events in 15 s on another (K114c, 2026-11-18). Add hold and stillness drops, a hold-map so a dropped phantom cannot re-seed with a fresh tracking id, and edge guarding. Debug output goes through dev_dbg on the input device. Tested on a K114c at rest: the previous driver produced bursts of contacts every few seconds; with this one loaded, zero contacts were reported over about 28 minutes across a reboot. Replayed tap, press-and-hold and drag captures still produce their contacts. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
Reuse the common touchscreen properties for input range and size. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
Pass the interface firmware node to its HID child. Refuse a touchscreen without a valid range and physical size. Use power method 2 and a dedicated reset for line ownership instead of the interface name. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
The 3024-by-1986 panel has 254 pixels per inch, which yields 302 by 199 mm rounded to whole millimeters. The DTB exposes all four values. Link: https://support.apple.com/en-us/148301 Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
Only the 17,861-byte frame matches the measured Kiwi layout. Reject other sizes before decoding, without matching on a machine ID. The extracted report callback rejects 17,860 and accepts 17,861 bytes. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
… and stop the transport before the input device The phantom-suppression commit dropped three things without saying so: the spinlock that serialises kiwi_raw_event() -> kiwi_frame() against kiwi_input_open(), the .report_fixup that clamps the 0x80000-bit Report Size to what hid-core accepts, and the state reset the new fields need. With the lock back, kiwi_input_open() also clears have_hot, the suppression map and the contact slots, so a reopened device starts from a clean frame. kiwi_remove() now stops the HID transport before it unregisters the input device: a frame arriving between the two used to reach kiwi_report() on an unregistered input_dev.
b81451b to
323ea20
Compare
|
Addressing every blocking finding from the formal pre-PR review, at the new head (rebased onto 1. The silent regression of
2. Teardown race / UAF in 3. Dependency — done as far as this branch can. 4. 5. Evidence. The K114c touch row (corners and centre within about 2 %, a 5 s press-and-hold kept until lift, two slots, a 60 s rest with 0 events, Build check on the new base: Non-blocking notes taken for a follow-up: |
HID: apple-mtp-kiwi: the K114c touch screen (needs #1737)
The K114c (M5 Pro / M5 Max 14-inch) touch screen is an MTP HID device behind the
DockChannel HID transport. This branch brings up the
hid-apple-mtp-kiwidriverfor it: the DT describes the panel geometry and the power method, the driver
reads the raw grid frames, and the phantom-suppression pass drops the stuck
top-edge contacts that the raw sensor reports at rest.
What is in this series
dt-bindings: describe the DockChannel touchscreen geometry, and documentthe kiwi interface.
HID: dockchannel-hid: bring up the kiwi interface; line ownership and thelong timeouts key on
apple,power-method = <2>with a dedicated reset line.arm64: dts: apple: t6050-k114c: enable the kiwi touch screen node anddescribe its panel size (
touchscreen-size-x/-y,touchscreen-x-mm/-y-mm).HID: apple-mtp-kiwi: the driver; frame size is the measured 17,861 bytes,geometry comes from the DT (a node without it is refused), and the phantom
pass suppresses the top-edge ring at rest.
HID: apple-mtp-kiwi: restore the open-path lock and the report fixup, and stop the transport before the input device(new head): the phantom-suppressioncommit had dropped the spinlock that serialises
kiwi_raw_event()againstkiwi_input_open(), the.report_fixupthat clamps the 0x80000-bit ReportSize to what hid-core accepts, and the reset of the new state. The lock is
back,
kiwi_input_open()also clearshave_hot, the suppression map and thecontact slots, and
kiwi_remove()stops the HID transport before itunregisters the input device, so a frame in flight cannot reach
kiwi_report()on an unregisteredinput_dev.Dependencies
#1737(the moved Report Size clamp and the short-report pad) is a hardruntime dependency: without it the kiwi firmware does not come up on
integration/aurora. This branch stays behind it.#1568and#2004are merged.Evidence
and the deep regression, 0 failed units, 0 new kernel errors).
apple_spmi 2 Edge macsmc-rtcIRQ count incrementing per cycle, 0 failures.press-and-hold kept until lift, two slots, a 60 s rest with 0 events, and
rtcwake -m freeze -s 20x3 with touch working after each resume) runs after#1737lands, together with the non-K114c keyboard and trackpad no-regressionrows on the A18 Pro and the M4 Pro.
Assisted-by: LLM (OpenAI:GPT-6.2-Sol, Anthropic:Claude-Opus-4.6), under Joshua's direction.