Skip to content

Commit 774f2e1

Browse files
committed
displayio, framebufferio: Remove spurious call to supervisor_start_terminal
A call to supervisor_start_terminal remained in common_hal_displayio_display_construct and was copied to other display _construct functions, even though it was also being done in displayio_display_core_construct when that was factored out. Originally, this was harmless, except it created an extra allocation. When investigating adafruit#3482, I found that this bug became harmful, especially for displays that were created in Python code, because it caused a supervisor allocation to leak. I believe that it is safe to merge adafruit#3482 after this PR is merged.
1 parent 40a3d11 commit 774f2e1

File tree

3 files changed

+0
-6
lines changed

3 files changed

+0
-6
lines changed

shared-module/displayio/Display.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self,
107107
i += 2 + data_size;
108108
}
109109

110-
supervisor_start_terminal(width, height);
111-
112110
// Always set the backlight type in case we're reusing memory.
113111
self->backlight_inout.base.type = &mp_type_NoneType;
114112
if (backlight_pin != NULL && common_hal_mcu_pin_is_free(backlight_pin)) {

shared-module/displayio/EPaperDisplay.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t*
9090
// TODO: Clear
9191
}
9292

93-
supervisor_start_terminal(width, height);
94-
9593
// Set the group after initialization otherwise we may send pixels while we delay in
9694
// initialization.
9795
common_hal_displayio_epaperdisplay_show(self, &circuitpython_splash);

shared-module/framebufferio/FramebufferDisplay.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu
9696
common_hal_framebufferio_framebufferdisplay_set_rotation(self, rotation);
9797
}
9898

99-
supervisor_start_terminal(self->core.width, self->core.height);
100-
10199
// Set the group after initialization otherwise we may send pixels while we delay in
102100
// initialization.
103101
common_hal_framebufferio_framebufferdisplay_show(self, &circuitpython_splash);

0 commit comments

Comments
 (0)