Repository navigation
dapf: hand off the MTP filter on the J604 too - #137
Conversation
|
A note on scope, found on an installer-made J604 install: the cold start in this PR works only if no earlier stage has |
RyanTheTide
left a comment
There was a problem hiding this comment.
Two existing host tests fail with this change (both pass on main):
- tests/python/test_j713_aop_dapf.py::test_j713_aop_dapf
- tests/python/test_j713_dapf_instance.py::test_j713_instance_and_power_flow
Both harnesses compile dapf_init_j713() from src/dapf.c without asc.h, so the new block fails with unknown type name 'asc_dev_t' and implicit declarations of asc_init(), asc_cpu_running() and asc_free(). They need the same asc_* stubs that tests/python/test_m4_dapf_power.py gets here (and a requests_halted-style case if they should cover the new path). python3 -m pytest tests/python/test_j713_aop_dapf.py tests/python/test_j713_dapf_instance.py tests/python/test_m4_dapf_power.py reproduces it.
dapf_init_fdt() runs the T8132 DAPF handoff only for apple,j713, so on the J604 (MacBook Pro 14-inch, base M4) the MTP's DART filter is never programmed and the internal keyboard and trackpad stay dead. Its tree states the same handoff contract as the J713 (t8132-laptop.dtsi), so accept it as well. The J604's iBoot leaves the MTP stopped, where the J713's runs it (its ASC CPU_CONTROL already reads 0 in the first-stage loader), and on T8132 the MTP has no PMGR power state, so the consumer is reported as inactive and skipped. A tree can now list such a consumer in linux-enablement-mac,dapf-halted-handoff: if its CPU is seen stopped (asc_cpu_running(), as kboot checks the AOP's), aura programs its filter with the halted-consumer writer the J713 AOP already uses, and Linux cold-starts it. Without the property the MTP is skipped as before. Tested on a J604 (macOS 26.6.2 firmware) with the same dapf.c change on an older aura base and the J604 tree change that sets the property: the loader programs 9 slices for dart-mtp, the MTP cold-starts, and the internal keyboard and trackpad work. test_m4_dapf_power.py covers the new property and the run check; the J713 DAPF harnesses get asc stubs, and test_j713_dapf_instance.py checks that a running or missing ASC keeps the MTP away from the halted writer. Assisted-by: LLM Signed-off-by: Friedrich <261542475+aeries0x@users.noreply.github.com>
cb52fac to
55bf5eb
Compare
|
Thanks, that was my mistake: after the last change I only re-ran test_m4_dapf_power.py. Both J713 harnesses get asc_* stubs now. In test_j713_aop_dapf.py they abort if called, since the J713 tree asks for no halted handoff. test_j713_dapf_instance.py gets a halted_requested mask and checks that the MTP stays away from the halted writer when its ASC is missing or its CPU is running, plus a control that drops the run check. The positive case (CPU seen stopped, halted writer runs) stays in test_m4_dapf_power.py. The three DAPF tests and the full suite pass locally (apart from the two test_loadobjs.py cases that fail on main too), and format-check and both builds are clean. The workflows on this PR still wait for approval. |
|
I have a 15" M4 Air with dead keyboard and other issues, if I'll provide the hardware can we fix it? @aeries0x |
Summary
On the J604 (base M4 MacBook Pro 14") the internal keyboard and trackpad stay dead:
dapf_init_fdt()runs the T8132DAPF handoff only for
apple,j713, and the J604's iBoot leaves the MTP stopped (its ASCCPU_CONTROLalready reads 0in the first-stage loader, an m1n1 stage 1 on a stub the installer didn't make), so nothing programs the MTP's DART filter before Linux cold-starts it.
apple,j604too. Its tree includes the samet8132-laptop.dtsihandoff contract as the J713.such a consumer in the new
/chosenpropertylinux-enablement-mac,dapf-halted-handoff. If its CPU is seen stopped(
asc_cpu_running(), as kboot checks the AOP's), aura programs its filter with the halted-consumer writer the J713AOP already uses, and Linux cold-starts it. Without the property the MTP is skipped as before.
t8132-jxxx.dtsirequests(dart-pmp has no DAPF instance, so its filter is untouched), the AOP stays with kboot's J713-only handoff, and the
ISP isn't requested.
The matching tree change is aurora-silicon/linux#1367 (the property, and the MTP on DART stream 0 as on the M4 Pro/Max).
Testing
tests/python/test_m4_dapf_power.pycovers the new property and the run check; the rest of the Python suite passestoo.
9 slices, the MTP cold-starts ("MTP Says Hello", firmware 5340.61.4), and the internal keyboard and trackpad work at
the login. One caveat: current aura main doesn't serve its USB proxy on my J604 when chainloaded (a separate issue
I'm looking into), so this boot ran the identical
dapf.cchange on aura b6b4592 plus local ports of Boot every T8132 board, not only the J713 #104 and kboot_gpu_m4: publish the G16 handoff on the 26.6.2 firmware on every M4 Mac #106.J715
Two J715 owners in #general report the internal keyboard and trackpad dead on an installer build. I left the J715
out: whether its iBoot runs the MTP like the J713's or leaves it stopped like the J604's decides what it needs, and I
can't test it. If it is the J604's case, the same tree property plus
apple,j715here should cover it.Assisted-by: LLM