Skip to content

displayio: further ensure just one start_terminal call #3551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 16, 2020

Conversation

jepler
Copy link

@jepler jepler commented Oct 13, 2020

@cwalther determined that for boards with 2 displays (monster m4sk), start_terminal would be called for each one, leaking supervisor heap entries.

Determine, by comparing addresses, whether the display being acted on is the first display (number zero) and do (or do not) call start_terminal.

stop_terminal can safely be called multiple times, so there's no need to guard against calling it more than once.

Slight behavioral change: The terminal size would follow the displays[0] size, not the displays[1] size

Testing performed: none

@tannewt
Copy link
Member

tannewt commented Oct 14, 2020

@jepler is this on your radar? it should probably be in the release candidate.

@tannewt tannewt added this to the 6.0.0 milestone Oct 14, 2020
@cwalther
Copy link

With the typo fixed, this works in my tests (with an imaginary sharp and a real four-wire display) and removes the last blocker for #3482 I can think of. But someone should probably give it a quick test on a real Monster M4sk.

(One thing I was wondering while testing but didn’t investigate: is the terminal supposed to show up on both displays? Because when I initialize the (inexistent) sharp display first, then the four-wire one, I don’t see any terminal activity on the latter.)

@tannewt
Copy link
Member

tannewt commented Oct 15, 2020

(One thing I was wondering while testing but didn’t investigate: is the terminal supposed to show up on both displays? Because when I initialize the (inexistent) sharp display first, then the four-wire one, I don’t see any terminal activity on the latter.)

Right now it's only on the first. We don't handle multiple displays well. I was wondering if we should allow a group to show on multiple displays. That doesn't work now because the transformations from the display are pushed down into the groups and tilegrids.

@jepler jepler force-pushed the displayio-multidisplay-leak branch from 25a761a to f047c64 Compare October 15, 2020 20:09
@jepler
Copy link
Author

jepler commented Oct 15, 2020

I've updated this PR after the changes to french translation on main

@jepler jepler requested a review from tannewt October 15, 2020 20:10
@cwalther
Copy link

And you re-added the “framebufferdisplay” typo.

@jepler
Copy link
Author

jepler commented Oct 15, 2020

aw gee!

@cwalther determined that for boards with 2 displays (monster m4sk),
start_terminal would be called for each one, leaking supervisor heap
entries.

Determine, by comparing addresses, whether the display being acted on
is the first display (number zero) and do (or do not) call start_terminal.

stop_terminal can safely be called multiple times, so there's no need
to guard against calling it more than once.

Slight behavioral change: The terminal size would follow the displays[0]
size, not the displays[1] size
@jepler jepler force-pushed the displayio-multidisplay-leak branch from f047c64 to 88d07ef Compare October 15, 2020 20:24
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit 2ab1552 into adafruit:main Oct 16, 2020
@jepler jepler deleted the displayio-multidisplay-leak branch November 3, 2021 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants