Repository navigation
Simplify the menu-open frame and frame-probe code, and wire the underlay preload debounce - #372
Merged
Merged
Conversation
…d preload debounce, share the corner latch and the warm_open guard, tighten visibility ModalUnderlay::note_at_rest, PRELOAD_REST_FRAMES and its counters were only exercised by a test; production notes the envelope through want_corners. The corner latch in sync and preload is one latch_corners, and the Tracks and More warm_open bodies share PanelMotion::warm_open instead of repeating the is_warm guard. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The page's envelope reached ModalUnderlay through want_corners, so PRELOAD_REST_FRAMES gated nothing in production and the ~8 ms reconstruction could land on a playback-start frame. prepare_pass now notes through note_at_rest exactly once per pass, None on every path that does not reach the page (non-live host render, no top entry, a surface up, page not at rest), and a None note withdraws the standing one. A dispatcher-level regression test drives the real call path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… the dispatcher test and the doc note_at_rest's changed-envelope arm now clears wanted like the None arm, so an unconsumed note cannot latch the old envelope. The dispatcher test reads wanted before preload_underlay can mask it, covers both clearing arms, and sets its state up explicitly. The rest count is documented as prepare passes, ~0.5 s only while the video plane is bound. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Oct 1, 2026
… back-buffer-wait capture showed (#377) The first TV run read the non-consuming `trace` file, which re-walks the ring on every read on the 4.4.84 kernel: 3.3 s of data took about nine minutes, the ring had overrun, a third of the events were arch-timer noise and no syscall events were enabled for the analyser. The read-back now drains trace_pipe on the set (gzipped there), ends when the per-CPU stats show an empty buffer, and is bounded on the host by --read-timeout (default 90 s); a stopped read-back keeps what arrived as a valid gzip. Entries and overrun are printed per CPU. The arch timer is filtered out of the irq events (string filter, falling back to irq numbers). The ring is sized for the capture and capped at 32 MB. --tid N enables raw_syscalls for that thread. Restore clears all of it. tools/test_tv_sched_trace.py drives the script against a fake tracefs and a fake tv-ssh and is wired into check-python. docs/player-submenus.md replaces the "next TV session" plan with the results: the GPU is idle during the long waits; osd_irq paces commits at 8.33 ms; 29 of 31 steady-state waits of 18 ms or more followed an on-time commit and are the compositor's, 2 followed platform threads preempting the frame thread; the text prewarm drain was unbounded (fixed in #376); the #372 preload did not drop a frame; WAYLAND_DEBUG printed nothing on this firmware. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A simplify pass over the code added by #365 (menu-open frame) and #370 (HUD clock prewarm and frame probe), which landed after the earlier pass in #357. It also fixes one defect the pass uncovered.
Fix: the underlay preload debounce was never wired
#365 added
PRELOAD_REST_FRAMESandModalUnderlay::note_at_restso the ~8 ms underlay reconstruction waits out the playback-start frames, but the dispatcher calledwant_cornersdirectly, so the latch ran on the first quiescent frame. The unit test droveModalUnderlayalone and passed regardless.note_at_restexactly once per pass, withNoneon every path that does not reach the page's note.Nonepass restarts the count and withdraws any unconsumed note.the_dispatchers_prepare_notes_the_envelope_only_after_the_page_has_restedgoes throughDispatcher::frame. It failed against the old call site withframe 1 of 30: nothing latched yet.Consequence: a popover opened within about half a second of the player page first resting, or of the envelope changing (next episode), pays the latch on its open frame. After that the field is held as before.
Simplifications (behaviour-preserving)
ModalUnderlay::latch_cornersreplaces the two copies of the reset / latch /heldupdate insyncandpreload.PanelMotion::warm_openreplacesis_warmplus the duplicated guard in the Tracks and Morewarm_openbodies.ModalUnderlay::is_dormant,ClockWarm::queue,FrameRing::BEFOREandAFTERare private.The frame probe's FFI shape, the
FRAMEDROPfields and thearm_wayland_debugordering are untouched.Verification
make checkon the committed tree:test result: ok. 5428 passed; 0 failed; 7 ignored,test result: ok. 102 passed; 0 failed,test result: ok. 5508 passed; 0 failed; 7 ignored.cargo +nightly check --lib --no-default-features: rc=0.note_at_rest, test and doc changes) relies on CI for it.Not verified on the device: whether 30 passes clears the heavy playback-start frames, and whether the
menu=1dev trigger at t0+6 s now opens before the preload has run, which would change the open frame thetrack-menu-submenu-oscscene sees inside its warm-up. The open-frame figure indocs/player-submenus.mdwas measured before this change.🤖 Generated with Claude Code