Repository navigation
Conversation
dd86886 to
422359b
Compare
422359b to
6ba1daf
Compare
Before the cold stop for a system sleep (switches, off by default), send the 26.6 firmware the calls macOS sends it before a sleep, observed on its mailbox and RPC memory (Aura capture run 68), then ask RTKit for AP and IOP idle on the 26.6 session's RTKit: - appledrm.v26_sleep_calls=1: the sleep-entry group, A478, A476(1), A473 (16 bytes), A115, A500 (0, 1); =2: the panel-off group first, A414, A478 x2, A476, A478, A412, A473 zeroed, A500 (0, 0). Every reply is compared with macOS's; a mismatch is -EPROTO. - appledrm.v26_sleep_rtkit_idle: the RTKit idle before the cold stop, on dcp->v26's RTKit where the 26.6 path keeps it. Without the calls the idle is never acknowledged (-62); with either group it is (status 0x30002e). Needs the power-down callbacks (#2558). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The four handlers are shape-checked and match what the M4 dispatcher answers (dcp-m4-callback.h:155-173), and the before/after on n32/n33 shows D209 was the call that failed. One note on D572: the comment says it is answered as the H17P driver does, but H17P (iomfb_h17p.c:332-341) and v27 (iomfb_v27.c:374-380) also pass the on/off argument to Assisted-by: LLM (Claude:Opus 5.5) |
|
Codex GPT-6.2 Sol on @satchlj's behalf. The 26.6 D572 handler now passes its little-endian on/off word to |
|
Re-review of e9ece5b: Blockers: 1. Earlier point:
HW row: J613 (26.6 DCP firmware) booted at e9ece5b itself: display up, a DPMS off/on cycle and one modeset with no unhandled-callback line; plus 0 AVC, 0 failed units, 0 new kernel errors. Assisted-by: LLM (Claude:Opus 5.5) |
Before the cold stop for a system sleep (switches, off by default), send the 26.6 firmware the calls macOS sends it before a sleep, observed on its mailbox and RPC memory (Aura capture run 68), then ask RTKit for AP and IOP idle on the 26.6 session's RTKit: - appledrm.v26_sleep_calls=1: the sleep-entry group, A478, A476(1), A473 (16 bytes), A115, A500 (0, 1); =2: the panel-off group first, A414, A478 x2, A476, A478, A412, A473 zeroed, A500 (0, 0). Every reply is compared with macOS's; a mismatch is -EPROTO. - appledrm.v26_sleep_rtkit_idle: the RTKit idle before the cold stop, on dcp->v26's RTKit where the 26.6 path keeps it. Without the calls the idle is never acknowledged (-62); with either group it is (status 0x30002e). Needs the power-down callbacks (#2558). Signed-off-by: Satya Benson <[email protected]>
The 26.6 firmware calls back D2, D592, D572 and D209 while it powers the display down (seen during A473 on J613: Linux's sleep-call trial failed on an unhandled D209 with -EOPNOTSUPP, taking the session down). Answer them as the H17P and M4 drivers do: D2 and D592 (swap_complete_intent_gated) as no-ops, D572 (powerUpDART) with success, D209 (get_calendar_time_ms) with the wall-clock time in ms. macOS's replies during its own panel-off (capture run 68) are the same: no output, 0, and the time in ms. Signed-off-by: Satya Benson <[email protected]>
Pass the D572 on/off word to the S2R helper, as H17P and v27 do, so a waiter can observe the callback. Keep acknowledging the message when the retained session has no bound DCP. Signed-off-by: Satya Benson <[email protected]>
e9ece5b to
388dac0
Compare
There was a problem hiding this comment.
Pre-PR checklist review at 388dac0a5fa42a4cbb2c32cba8469e732ccb2fb8 (§1–§6): 0 code/policy/attribution/CI blockers — COMMENT (holding for §5 HW row on live head).
Code & Source Verification
drivers/gpu/drm/apple/iomfb_v26_6.c:563-574handlesD(2)(0/0),D(592)(20/0),D(572)(4/4), andD(209)(0/8). Verified all four shapes and reply encodings matchdrivers/gpu/drm/apple/dcp-m4-callback.h:49,53,55,155-173,iomfb_h17p.c:332-341,703,722,731, andiomfb_v27.c:374-383,676,697,712.- Verified locking and lifetime of
v26->dcpin theD(572)handler: every caller ofdcp_v26_callback(dcp_v26_callviadcp_v26_link_callanddcp_v26_idleviadcp_v26_link_pump) runs withv26->lockheld, andiomfb_v26_6_unbind()(iomfb_v26_6.c:1219-1221) clearsWRITE_ONCE(v26->dcp, NULL)under the samev26->lock. - Verified
dcp_s2r_dart_power()(drivers/gpu/drm/apple/dcp.c:8376-8385, declared unconditionally indcp-internal.h:453): checksREAD_ONCE(dcp->s2r_active)first and returns immediately without acquiringv26->lock(a safe no-op on 26.6 today whiledcp_s2r_capable()is false, and ready when 26.6 S2R is wired up). - Required headers (
<linux/ktime.h>,<linux/unaligned.h>,"dcp-internal.h") are already included iniomfb_v26_6.c.
Checklist Summary
- §1 No model gating: Pass — protocol callback handling applies uniformly to the 26.6 IOMFB path with no board/chip gating added.
- §2 Production-ready: Pass — default command line, no hacks or sleeps.
- §3 Safety: Pass.
- §4 Clean-room & attribution: Pass — both commits (
9f04123c,388dac0a) carry human author/committer andSigned-off-by: Satya Benson <[email protected]>with zero AI trailers;Assisted-by:is in the PR body. - §6 Naming: Pass.
- CI:
host-testsSUCCESS on live head388dac0a.
Missing §5 Evidence (Hold)
- As noted in the PR body and the follow-up comment on
e9ece5bc, theD(572)->dcp_s2r_dart_power()revision (tree-identical to live head388dac0a) is compile-tested only and has not been booted on hardware. - Please post a §5 HW row on J613 (26.6 DCP firmware) booted at
388dac0aon a normal kernel: display up, DPMS off/on cycle, one modeset with no unhandled-callback errors, plus the regression gate (0 SELinux denials / 0 failed units / 0 new kernel errors).
Non-blocking nits: link_callback() (iomfb_v26_6_link.c:379) already zeroes out before invoking dcp_v26_callback, so memset(out, 0, 4) is harmlessly redundant; the PR body's D572 table description still reflects the pre-388dac0a commit before dcp_s2r_dart_power() forwarding was added.
|
Re-checked at 388dac0. It has the same tree as e9ece5b (f7ecb693), so this is a trailer-only rewrite. Both commits now carry only the author's Assisted-by: LLM (Claude:Opus 5.5) |
There was a problem hiding this comment.
Formal pre-PR re-review (§1–§6) at 388dac0a5fa42a4cbb2c32cba8469e732ccb2fb8: REQUEST_CHANGES (code, locking, attribution, and CI are all clean; holding solely for §5 hardware evidence on live head).
Verified Clean (§1–§4, §6, CI)
- Code & locking (
drivers/gpu/drm/apple/iomfb_v26_6.c:557-579):D(2)(0/0),D(592)(20/0),D(572)(4/4 forwardingget_unaligned_le32(in)todcp_s2r_dart_power(v26->dcp, ...)with 4-byte zero reply), andD(209)(0/8 returningktime_get_real_ns() / NSEC_PER_MSEC) match H17P, v27, and M4 callback shapes/semantics.v26->dcpaccess is protected byv26->lock(held acrossdcp_v26_callbackandiomfb_v26_6_unbind()), anddcp_s2r_dart_power()is a safe no-op whiles2r_activeis false on 26.6. Not superseded on liveintegration/aurora(70a00e583b03). - §4 Attribution: Both commits (
9f04123c0390,388dac0a5fa4) carry human author/committer andSigned-off-by: Satya Benson <[email protected]>only (zero AI commit trailers);Assisted-by:is in the PR body. - CI: Live
Host testsis green on388dac0a5fa4.
Remaining Blocker
- §5 (Missing hardware & regression row on live head
388dac0a5fa4): TheD(572)→dcp_s2r_dart_power()revision (e9ece5bc/ tree-identical live head388dac0a5fa4) is still compile-tested only, and the earlier n33–n36 runs predated that commit and only ran out-of-tree sleep trials without exercising normal display operation. Please post a J613 (26.6 DCP firmware) boot row at388dac0a5fa4on the default command line: display up, DPMS off/on cycle, one modeset with no unhandled-callback errors, and the regression gate (0 SELinux denials / 0 failed units / 0 new kernel errors).
Non-blocking Nit
- The PR body's
D572table row still describes the pre-388dac0a5fa4behavior beforedcp_s2r_dart_power()forwarding was added.
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at 388dac0a5fa4: the code is ready; it needs only a row at this head.
Blockers: none in the code. Missing row: the D572 change that forwards the on/off word to dcp_s2r_dart_power() (e9ece5bc, the same tree as this head) has only been compiled. Needed: one J613 boot at this head on the default command line, with the display up, a DPMS off/on cycle and one modeset, and no unhandled-callback lines. If you can boot it, please post the row; otherwise we'll get it run.
Checked: no Apple material, no gates. The four handlers are shape-checked and answer as the H17P, v27 and M4 drivers do. D209 returns wall-clock ms. v26->dcp is used under v26->lock, and dcp_s2r_dart_power() does nothing while no sleep is active. The n32/n33 before/after shows D209 was the failing call. CI green. This replaces my earlier reviews.
Evidence
Read both commits (drivers/gpu/drm/apple/iomfb_v26_6.c, +18) against dcp-m4-callback.h, iomfb_h17p.c and iomfb_v27.c. Nit: the D572 row in the PR body still describes the reply before the forwarding was added.
Superseded by the review at 388dac0
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Superseded by #3140 (merged in |
The 26.6 DCP firmware calls back D2, D592, D572 and D209 while it powers the display down. The 26.6 driver handled none of them. When the firmware sent D209, the driver answered -EOPNOTSUPP, which failed the outer call and ended the session ("recovery requires a reboot").
This answers them the way the H17P and M4 drivers already do:
swap_complete_intent_gatedpowerUpDARTget_calendar_time_msDuring its own panel-off on J613, macOS sent all four callbacks and replied in the same way: no output for D2 and D592, 0 for D572, and the time in ms for D209. They were observed on the DCP's mailbox and RPC memory with Aura's packet capture (aurora-silicon/aura#390).
What was tested. On J613 (M3 Air, 26.6 DCP firmware), in the J613 deep-sleep trial kernels. They carry this commit plus out-of-tree trial calls that make the firmware power the display down; those calls are not in this PR.
f44bf7af+ 37, without this commit): a call that makes the firmware power the display down failed with -95 on an unhandled D209 (J613 unhandled kernel callback 0x44323039 0/8).f44bf7af+ 39): the call completes. The firmware logs its full power-down (power on -> off,power_down_M3: disabling M3, link shutdown,display HPD removed,set_device_enabled_gated: ... requested state: 0), and the calls after it succeed. Five runs on that build.5ff7084f+ 40), n35 and n36 (391fac63+ 41 and + 43). Each of their runs logged the calls completing and no unhandled callback. Every run is n=1.This branch is that commit rebased onto
acfcd08b, unchanged (range-diff=). It has not been booted at this exact head.Untested: