Repository navigation
picogame: send display strips through busio's async write - #11684
Merged
Merged
Conversation
On a port with async busio SPI the display backend is shared code: each strip after the first goes out with common_hal_busio_spi_write_start(), which ends the previous one, and end_transaction() waits for the last. The raspberrypi, espressif and atmel-samd DMA backends are gone; their common-hal/picogame/Display.h includes the shared one.
Display sends its strips through the display bus (send_async where the bus has it, send otherwise) instead of reaching into FourWire for the SPI object, so it works on any displayio bus and raises nothing on one without an asynchronous send. Display.async_send tells whether the bus overlaps composing and sending. CIRCUITPY_PICOGAME_FAST_DISPLAY now defaults to CIRCUITPY_BUSIO_SPI_ASYNC on a picogame build, so boards no longer declare it and a port gets the fast display when its busio sends asynchronously. The per-port picogame/Display.h forwarders go.
tannewt
requested changes
Oct 28, 2026
tannewt
left a comment
Member
There was a problem hiding this comment.
Nice! Love to see it portable. One question on the API addition. Good otherwise.
Only the hardware tests read 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.
picogame's fast display had its own DMA strip sender in each port.
busio.SPInow haswrite_start()/end()(#11468, #11489), so the sharedshared-module/picogame/Display.csends each strip through the display bus (send_async, orsendon a bus without it) and the port-specific senders are removed.Display.async_sendsays whether the bus overlaps composing and sending.CIRCUITPY_PICOGAME_FAST_DISPLAYdefaults toCIRCUITPY_BUSIO_SPI_ASYNCon a picogame build, so boards no longer set it. A port gets the fast display when its busio sends asynchronously.Tested on PicoPad (RP2040), PyBadge (SAMD51) and Feather ESP32-S3 TFT: same frame rates as before,
async_sendis True on all three.Fruit Jam now builds the fast display too (+936 bytes, unused on DVI); a board can set
CIRCUITPY_PICOGAME_FAST_DISPLAY = 0to leave it out.