[performance] Add opt-in SDL display backend - #60
Draft
sayhiben wants to merge 2 commits into
Draft
Conversation
sayhiben
force-pushed
the
codex/performance-sdl-kms-backend
branch
from
May 18, 2026 22:35
4252a0e to
1794b0f
Compare
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.
Summary
DISPLAY_OUTPUT_BACKEND=framebuffer|sdl|autoandDISPLAY_SDL_DRIVER.Independence
This PR now targets
maindirectly and contains only the SDL/KMS backend and runtime-requirement docs. Benchmark-script changes remain isolated in #54.What Changed After Bring-Up
The original KMSDRM failure was not an app rendering issue. The device had
/dev/dri/card0and SDL's KMSDRM driver, but did not have the Mesa EGL/GLES runtime installed. SDL failed with:Installing these packages fixed KMSDRM display creation on the test device:
The Waveshare provisioning script now installs those runtime packages, and the app fallback message now points at them when KMSDRM/EGL setup is incomplete.
Measurement / Experiment Result
Measured on the Pi using #54's benchmark script in a temporary checkout, with an opt-in run:
The app now opens SDL KMSDRM successfully:
Before SDL/KMS, after the optimized framebuffer PR:
With SDL/KMS:
Conclusion: this is a real win on the KMS-backed Waveshare device once the Mesa EGL runtime is installed. Keep framebuffer as the default for broad compatibility, but KMSDRM is now a working opt-in path and a good candidate for targeted KMS display profiles.
Validation
python3 -m py_compile config.py display/terminal.pybash -n scripts/setup-waveshare-4dpi-720.shDISPLAY_OUTPUT_BACKEND=sdl DISPLAY_SDL_DRIVER=dummysmoke test.tinyprogrammer.servicewas restarted successfully afterward.