Repository navigation
Review fixes for "Remove fixed display limit" - #28
Merged
tannewt merged 9 commits intoDec 4, 2026
Merged
Conversation
BusDisplay and EPaperDisplay did not check for a deinited bus, and FramebufferDisplay treated a deinited framebuffer as an unregistered one. Constructing a BusDisplay on a deinited FourWire crashed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FourWire's deinit() frees the D/C, CS and reset objects it owns but left pointers to them. Releasing EPaperDisplay sequences freed their storage but left the sequence pointers set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed LVGL buffer allocation in the EPaperDisplay constructor marked the display deinited, so the finaliser skipped releasing its busy pin and sequences. Allocate the buffers before creating the LVGL display, so the failure path has nothing LVGL-related to undo. Creating a zephyr Display deleted LVGL's default display, which can now be another CircuitPython display. Delete it only if it is the display Zephyr's LVGL glue made at boot: every CircuitPython display sets driver data, and EPaperDisplay now does too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without it, the board framebuffer is treated as deinited, so it never gets on_vm_start and its audio sample is not GC-rooted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed constructor leaked its pins, timer and framebuffer: the deinited check looked at Protomatter's rgbPins, which is not set yet, so deinit() returned early. Use a deinited flag, as FourWire and ParallelBus do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LVGL now drives several displays. Only one zephyr_display.Display can exist because there is only one zephyr,display device. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tannewt
reviewed
Dec 4, 2026
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.
Claude wrote this.
These are the suggestions from this review of adafruit#11963, applied as posted, one commit per lettered item. C, D, H and I are not included.
BusDisplayandEPaperDisplayraise when given a deinited bus, andFramebufferDisplayraises when given a deinited framebuffer.deinit()clears its pointers to the D/C, CS and reset objects it frees.release_sequences()clears the sequence pointers.EPaperDisplayconstructor allocates its buffers before creating the LVGL display, so a failed allocation no longer marks the display deinited and the finaliser releases the busy pin and sequences.EPaperDisplaynow sets LVGL driver data, as the other displays do.Displaydeletes the default LVGL display only if it has no driver data, which is true only for the one Zephyr's LVGL glue creates at boot.is_deinited.deinitedflag instead of Protomatter'srgbPins.Displaylimit inzephyr_display/Display.c.CIRCUITPY-CHANGEmarker to thepy/gc.cassert.supervisor.runtime.displaydocuments that only it shows the terminal.The zephyr-cp display tests pass on
native_sim, including the ASAN builds. Metro ESP32-P4 and Fruit Jam build.