Skip to content

Add USE_LCD_DOUBLE_BUFFERING option #26713

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

Conversation

dbuezas
Copy link
Contributor

@dbuezas dbuezas commented Jan 20, 2024

Description

Adds an option to enable double buffering (plus only sending changed screen areas) for SSD1309 LCDs.
Follow up to: MarlinFirmware/U8glib-HAL#31

Requirements

Requires SSD1309 LCD

Benefits

Faster LCD updates (particularly noticeable when using software i2c)

Configurations

Related Issues

@dbuezas dbuezas changed the title Add USE_LCD_DOUBLE_BUFFERING macro Add USE_LCD_DOUBLE_BUFFERING option Jan 23, 2024
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 2 times, most recently from 9c65146 to 4f65466 Compare January 26, 2024 00:13
@dbuezas
Copy link
Contributor Author

dbuezas commented Feb 25, 2024

After ~2 months of use, I haven't noted any issues with this, and the LCD is extremely snappy.
Please let me know if there is anything pending on my side :)

@dbuezas
Copy link
Contributor Author

dbuezas commented Mar 13, 2024

Anything else pending?

This allows using a new mode already merged in U8glib-HAL that improves refresh rate quite a bit. It is optional and disabled by default.
More details in the U8glib PR linked in the PR description above.

@thisiskeithb
Copy link
Member

Anything else pending?

95 other PRs and all kinds of work to fix up 2.1.2.2 as well as prep 2.1.3 for release.

Please have some patience.

@dbuezas
Copy link
Contributor Author

dbuezas commented Mar 13, 2024

Sorry for that, I wondered if I had missed something else.

Thanks a lot for your continuous work in this amazing project!

@dbuezas
Copy link
Contributor Author

dbuezas commented Jun 30, 2024

In case the utility of this got lost

The double buffered method this exposes drastically reduces cpu time spent talking to the LCD:

  • Send buffer at once instead of page by page: Row by row updates (default method) are actually visible and the full screen update takes a lot longer to complete, this option makes a big difference.
  • Send only changed pages (rows): Reduces communication a lot, particularly in the status screen.
  • Out of those pages, send only changed columns: Further reduces communication considerably.

The end result is up to 95% faster/less data transferred to the display.

Back then I made this quick demo where all pixels that don't need to be sent are white (inverted color to be precise):

285644705-6f61276f-8e69-4895-a4ba-63918e46da5b.mp4

@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 3 times, most recently from 37d77d6 to aa44542 Compare September 28, 2024 01:10
thinkyhead added a commit to MarlinFirmware/Configurations that referenced this pull request Mar 17, 2025
@thinkyhead thinkyhead merged commit 0d87dd9 into MarlinFirmware:bugfix-2.1.x Mar 17, 2025
64 checks passed
EvilGremlin pushed a commit to EvilGremlin/Marlin that referenced this pull request May 15, 2025
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