Repository navigation
Fix the RGB display cache flush on ESP32-P4 and ESP32-S31 - #11632
Open
mikeysklar wants to merge 1 commit into
Open
mikeysklar wants to merge 1 commit into
mikeysklar wants to merge 1 commit into
Conversation
…4 and ESP32-S31 refresh() wrote the frame buffer back from the cache with a hand-declared Cache_WriteBack_Addr(addr, size). That is the ROM signature on ESP32-S3, but on ESP32-P4 and ESP32-S31 the ROM function takes three arguments, Cache_WriteBack_Addr(map, addr, size), so there the buffer address went in as the cache map, the length as the address, and the size was whatever was left in the register. Nothing was written back. Use esp_cache_msync() from esp_cache.h instead, as esp_lcd does. It picks the right cache operation on every chip. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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
refresh()now flushes the frame buffer with ESP-IDF's cache call.Why
On P4 and S31 the old ROM call got the wrong arguments.
Cache_WriteBack_Addr(addr, size)esp_cache_msync.(map, addr, size)refresh()after writing all 768 KBdisplay.framebufferNo visible bug today: the bounce buffers copy the frame through the same cache.
Scope: mipidsi has the same two-argument declaration but never calls it; left alone.
AI assistance: written with Claude Code. I ran the tests above on hardware.