Repository navigation
drm/apple: iomfb_m4: give startup A401 a 15 s deadline for ProMotion panels - #4006
espentrydal wants to merge 1 commit into
Conversation
…panels During fresh-session DCP startup (A401), ProMotion mini-LED panels such as the J604 load APT M3 firmware and service >300 callbacks, taking ~4.90-5.01 s on hardware. This sits directly on the default 5 s RPC deadline and intermittently times out with -ETIMEDOUT (-110), quarantining the internal DCP at boot. Give the one-shot startup A401 call a 15 s deadline and clear r->deadline immediately after it returns. Signed-off-by: Espen Trydal <espen@trydal.io>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Approve at 040113b42187.
- Scope:
dcp_m4_startup()runs once per DCP (startup_started). It also runs for each 26.6.2 external DCP, so those get 15 s too, not only the panel. - Resume: not affected. The restart after idle or a deep sleep (
iomfb_m4_ext_start()) and the display power-up (iomfb_m4_power_ungate()) don't send A401. - Other panels: no change in a normal boot, because the call returns when the firmware answers. J713 and J715 use this code. J773g, J623 and J624 have no 26.6.2 profile and never reach it.
- Locks and a hung DCP:
dcp->lockis held for the whole call, as before. A DCP that hangs without crashing now holds it, and its caller, for up to 15 s instead of 5 s. The callers are appledrm's component bind for the panel and thedcpextprobe for each external DCP. If all three hang one after another, that is up to 45 s instead of 15 s. With appledrm as a module, only display setup waits and the boot framebuffer stays. If it's built in, the boot waits too. A crash or a quiesce still ends the wait at once, sincedcp_m4_failed()completesr->received. - The deadline doesn't leak: nested calls inherit it, it goes back to 0 before the A457 call, and the idle worker takes the same lock before it sets its own.
Checked on the merge with main b902937859ec: iomfb_m4.o at W=1 has 0 warnings (CONFIG_DRM_APPLE_DCP_T8132 set by hand, as this was a build without Rust), and the full host tests pass on the series merged together (1028/1028). checkpatch --strict is clean.
Nit, no need to change: the code comment says 4.9 to 5.1 s, the commit message 4.90 to 5.01 s.
Please don't merge on the approval alone. Still owed at this head: 5 cold boots on the J604 with the A401 time from the log and no -110 or quarantined line, and one J713 or J715 boot with the panel up.
|
J713 row at exact head J713 (MacBook Air M4, T8132, firmware 27.2). A = saved
No startup timeout or A401 deadline message was logged on B. The one failed unit on B is |
|
Not merging this yet. The change reads right and the local checks are clean. One thing is missing: no boot so far has run this code on top of main's current DCP receive path. The
What lands it: the J604 boots from my review, at this head or on any branch with this commit on a main that has #3321. That is 5 cold boots with the A401 time from each log, the panel up, and no Hosted checks didn't run on this fork PR, so I ran them locally on the merge with main
Nothing to push. I'll merge this head once those boots are in. |
What: Set a 15 s RPC deadline (
r->deadline = jiffies + msecs_to_jiffies(15000)) around the one-shot fresh-session DCP startup call (A401) indcp_m4_startup(), and clearr->deadlineimmediately afterward.On ProMotion mini-LED panels (J604), fresh-session
A401loads APT M3 firmware and services >300 callbacks, taking ~4.90–5.01 s on hardware. This races directly against the default 5 s RPC deadline and intermittently fails with-ETIMEDOUT(-110), quarantining the internal DCP at boot.Tested:
040113b4218(base53732c475cb):scripts/checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks.make LLVM=1 ARCH=arm64 W=1 drivers/gpu/drm/apple/iomfb_m4.o: 0 warnings, 0 errors.apple,j604/apple,t8132, OS/system fw26.6.2,mBoot-18000.161.10,aura 1.0.0b18, Arch Linux ARM,7.3.0-j604-dev+carrying this commit): 6/6 consecutive cold boots and reboots completedA401with 0-110timeouts or DCP quarantines (previously intermittently timing out at 5.0 s), kernel taint8196, 0 failed units, 0 new kernel errors.Risk: two-way door · M4 (
t8132) DCP fresh-session startup iniomfb_m4.c. Only extends the one-shot startupA401RPC deadline from 5 s to 15 s; all subsequent calls keep the default deadline.Not yet: Standalone boot at this exact single-commit head
040113b4218and hardware verification onJ713/J715.