Repository navigation
drm/asahi: g17: say what a timed-out render waited for - #3568
RyanTheTide wants to merge 3 commits into
Conversation
A G17 render timeout reports the stamps, the ring cursors and the stage timestamps of the group at the head. That shows the firmware took both kicks and that the fragment never started (M5 Pro, 11-28), but not what the fragment was waiting for, so a dependency wait, a fragment queue the firmware never selected and a stale completion seed look the same. Add to the report, from host reads only: - each kick's dependency words as its kick ring entry now holds them, with the named queue's completion stamp and its sequence; - the M5 completion-link words of both commands (fragment busy, linked fragment completion, pass bytes, completion values); - the pair's context and identity update state, and the ioctl's work-state node with the firmware's completed count; - both event rings, the control ring, pending growth and release work, the work rings of every priority and the GPU power state; - for the first two reports of a boot, a second sample of all of it 100 ms later, which shows whether anything still moves. Report the timed-out group only once it heads its pair, and only once per failure. The drm_sched timeout worker takes the report and its 100 ms resample before anything acts on the failure, so the stamps and the recovery state the retirement then reads are fresh. A timeout the event worker applies later is reported without the resample. The publish, settle and observe paths are unchanged. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
render.rs: keep main's Active/ParkedReplay render_active accounting next to this branch's DependencyList, and main's choice of the reported group (the first one not owed stamps, else the front) with this branch's Option return. memory.rs: keep main's ensure_target() next to this branch's m5_link_words() and owners(). Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Main keeps a group that finished on the GPU but is still owed its stamps at the head of the pair, and its timeout report already describes the oldest group not owed its stamps. This branch's report path checked the literal front (front_is(), front_ordinal(), the resample's lookup), so a timed-out group behind an owed front was never reported. Select the group once, in timeout_front(), and use it for all four. Host model (g17-render-owed-stamp-tests): extract fail_render_packet_reported(), timeout_front() and front_is(); model report_render_timeout() as one report through the real Pair::report_timeout(), and the publication detail as a no-op (it only prints from kick rings and command memory the model lacks). The report-timeout-front-only mutant now targets timeout_front(). The settle-fails-retired mutant is dropped: with the per-call `reported` flag, dropping the retired_held() exit no longer causes a second report, the only effect the model observed. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Updated to 1aa4169, merged with main f02bd68 (K114S-GPU has been parked since 12-01, so I picked this up).
|
|
At 1aa4169, the hosted Host job passed 1248/1250. The failing sleep-legacy fixture still lacks gp_pcie_undescribed and the T6030 PMP mutation sees the no-storage-policy needle twice. The hosted Asahi KUnit job fails compiling the layout fixture because Validated::Render no longer has attachments or timestamps. The failing fixtures have identical blobs on the head and its first parent. Released main 43600d8 contains 6b06f35 for both Host fixtures and 3fdf0c4 for the Asahi layout fixture. A merge-tree preview of 1aa4169 into 43600d8 merged cleanly as tree c9476fe87475. In that snapshot the legacy sleep test passed, the PMP graph passed 27 cases plus mutation checks, and the G17 render owed-stamp test passed 48/48. Five diagnostic negative controls reached the running test fixture and were rejected, including the retired/owed-head and report-front-only cases. The preview is local and the owner still needs a forward merge and exact hosted checks. DRAFT-LINUX owns the current guarded K114S runtime row. |
|
Hardware row at exact head
How: one combined test kernel, not this PR alone. Kernel |
Problem. On the M5 Pro (K114s, T6050 G17S, fw 27.2) a render timed out during normal desktop use. The firmware had taken both kicks, the tiler ran, and the fragment never started. Recovery state was 0. The report could not say what the fragment was waiting for. A dependency wait, a fragment queue the firmware never selected and a stale completion seed all look the same. It happened once in about 60 boots, so the next occurrence has to carry the answer.
Change. Diagnostics only. When a render times out, the report now also prints, from host reads:
The drm_sched timeout worker takes the report and its resample before anything acts on the failure, so retirement reads fresh stamps and recovery state. Timeouts the event worker applies later are reported without the resample. The publish, settle and observe paths are unchanged. tools/asahi/g17-quarantine-drain-tests.py follows the new call in
timeout_render.Tested: J616s (T6040), bridge4 kernel + this report, one-shot boot and a 36-min offscreen GPU soak, 0 errors. K114s (T6050), bridge5 kernel + this report, one-shot boot past first render and a 7.5-min lit stress, 0 errors. Both on the same asahi source as 9280c8c. Buildbox: g17 host tests 251/251; full host suite 760/764 (4 g15 timeouts under load, g15 files only); asahi_core.o builds on main 18058ea with no new warnings.
Risk: Two-way. Only the render-timeout failure path changes, and only by extra logging and one bounded 100 ms delay for the first two timeouts of a boot. Macs: every G17 board.
Background
An earlier variant kept a copy of each render's dependency words in every published group. That grew the render settle and observe stack frames by about 700 bytes, and it hard-reset the K114s at the first render, twice. This version reads the words back from the kick ring entry at timeout instead. Logs: traces/gpu/20261128-k114s-vmbind-110 on the lab store. Lane K114S-GPU.