Poll for the display driver at 100ms instead of 500ms - #1948
Open
robcodedev wants to merge 1 commit into
Open
robcodedev wants to merge 1 commit into
robcodedev wants to merge 1 commit into
Conversation
get_screen_resolution polls /proc/mi_modules/fb/mi_fb0 every 500ms until the driver publishes its timing. Once it is up, the coarse interval can add almost another half second before runtime notices. Poll every 100ms with the same 5 second ceiling, so detection lands within 100ms of the driver coming up. Log the poll count on success rather than each failed attempt. At this interval a per-attempt line would spawn date and tee up to 50 times per boot. Silence the grep too, since the file does not exist until the driver creates it.
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.
Problem
get_screen_resolutionpolls/proc/mi_modules/fb/mi_fb0every 500ms until the display driver publishes its timing. Once the driver is up, the coarse interval can add almost another half second before runtime notices.Change
Poll every 100ms with the same 5 second ceiling - 10 × 500ms and 50 × 100ms are identical, so the timeout path and
/tmp/get_screen_resolution_failedbehave exactly as before. Detection now lands within 100ms of the driver coming up.The per-attempt log line becomes a poll count on success. At this interval it would otherwise fire up to 50 times per boot, and
log()spawnsdateandteeeach time. The grep gains2> /dev/nullfor the same reason - the file does not exist until the driver creates it, so every failed attempt wrote an error.Independent of the framebuffer work in #1940, it touches only the polling loop.
Testing