Repository navigation
Panel_M5HDMI: count the command sent right after a busy wait - #372
Merged
Merged
Conversation
_check_busy() reset _total_send to 0 after waiting, so the command it was called for went uncounted. After a long COPYRECT the next _set_window(force) skipped the busy check and streamed the pixel data while the FPGA was still copying. The FPGA keeps about 2 KB of received bytes and drops the rest, so the WRITE_RAW never got all its pixels and the display answered busy until it was power-cycled. Seen on ESP32-P4 with Module Display (bundled bitstream) at 1280x720 24bpp: copyRect 617x341 followed by a 76x71 RGB888 pushImage hung 3 of 3 times; with this change 0 of 3.
Merged
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.
Panel_M5HDMI::_check_busy()reset_total_sendto 0 after a busy wait, so the command it was called for went uncounted. After a long COPYRECT, the next_set_window(force)saw_total_send == 0, skipped the busy check and streamed the pixel data while the FPGA was still copying. The FPGA buffers about 2 KB of received bytes and drops the rest, so the WRITE_RAW never received all its pixels: Module Display then answers busy (0x00) until it is power-cycled; resetting the host does not recover it.The fix counts that command (
_total_send = length), so the next forced check waits for the copy to finish.Test (ESP32-P4 + Module Display, bundled bitstream, 1280x720 24bpp, SPI 80 MHz):
copyRect617x341 followed by a 76x71 RGB888pushImagehung 3 of 3 times before this change and 0 of 3 after. The bytes sent to the panel were recorded to confirm that the pixel stream followed the COPYRECT without a busy check.Local build check across the upstream CI versions passed; fork CI passed.