Repository navigation
feat(stlxdm): showed missed frames on the desktop bar - #460
Merged
Merged
Conversation
The presenter interface gains missed_frames(). The flip presenter counts them from each latch and the time its frame began, the memcpy presenter cannot count them, and the bar shows the last 10 seconds' misses.
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.
Summary
stlxdm, the desktop's compositor, showed the input latency on its top bar but not missed frames, the screen refreshes (vertical blanks) at which an older frame stayed on screen because the next came late, though /dev/gfxfb reports for each present (a request that a buffer replace what the screen shows) the vertical blank at which the present latched, from which the screen shows that buffer.
Changes
missed_frames(). Whenflip_presenterreads that a present latched, it counts as missed each vertical blank before the latch from the one the present's frame was due at on, taking those between two latches as evenly spaced.acquire()handing out the buffer it is composed into and the last latch read. A frame begun just before a vertical blank is not charged with it.perf_monitortakes the count on every wakeup of stlxdm's loop and sums its increases over the latency readout's 10-second window.dm_panelsshows "missed frames N" beside the latency, or "missed frames --" where thememcpy_presenterdraws into the framebuffer, which reports no vertical blanks.flip_presenter::take_end()clears the latch it counts from when a present ends dark or failed, or when its end cannot be read, so the next latch counts no misses.server::reload_config()gives the rebuilt bar the last readoutserver::perf_ticktook, the latency's included, since an idle perf monitor refreshes nothing until the next input or missed frame.Note
Medium Risk
Touches present timing, gfxfb latch handling, and the main-loop perf path; display-backend edge cases (failed presents, dark output) reset counting but were not fully exercised in testing.
Overview
stlxdm now surfaces missed frames on the top bar next to input latency, using the same 10s rolling window and ~250ms refresh as the existing perf readouts.
The presenter gains
missed_frames(). flip_presenter stamps each compose atacquire(), compares latch events from gfxfb to infer refresh period, and increments a running total for vertical blanks skipped before a present latched (with latch state cleared on dark/failed presents or unreadable end events). memcpy_presenter returns-1so the bar showsmissed frames --.perf_monitor records deltas when the presenter total rises, sums them in
tick(), and only goes quiescent when both the latency window and missed-frame sum are empty. dm_panels renders the new label; server pulls the presenter count eachperf_tick(after present-end handling) and reapplies the cached snapshot on config reload so a rebuilt bar does not flash dashes while idle.Reviewed by Cursor Bugbot for commit 447896e. Bugbot is set up for automated code reviews on this repo. Configure here.