-
Notifications
You must be signed in to change notification settings - Fork 8.3k
display: ensure samples check display api func return value + ltdc read/write rectangle check #99166
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
nashif
merged 2 commits into
zephyrproject-rtos:main
from
avolmat-st:pr-check-display-func-ret
Nov 20, 2025
Merged
display: ensure samples check display api func return value + ltdc read/write rectangle check #99166
nashif
merged 2 commits into
zephyrproject-rtos:main
from
avolmat-st:pr-check-display-func-ret
Nov 20, 2025
Conversation
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
faxe1008
reviewed
Nov 10, 2025
uLipe
previously approved these changes
Nov 11, 2025
JarmouniA
reviewed
Nov 11, 2025
Ensure that display api function return values are checked. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Ensure that x,y/width-height rectangle mentioned in display_read and display_write are actually part of the framebuffer, otherwise return an error. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
58b4bbf to
61cc05a
Compare
|
josuah
reviewed
Nov 11, 2025
JarmouniA
approved these changes
Nov 11, 2025
fabiobaltieri
approved these changes
Nov 12, 2025
danieldegrasse
approved these changes
Nov 13, 2025
uLipe
approved these changes
Nov 13, 2025
Author
|
@faxe1008 could you have a look at this again ? |
vlad-kulikov
approved these changes
Nov 19, 2025
faxe1008
approved these changes
Nov 20, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: Display
area: Input
Input Subsystem and Drivers
area: LVGL
Light and Versatile Graphics Library Support
area: Samples
Samples
area: State Machine Framework
State Machine Framework
area: Video
Video subsystem
platform: STM32
ST Micro STM32
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.



Following PR #98719, add proper display API function return value checks in all samples in order to fail if an error happen.
Moreover, within the LTDC driver, ensure that the rectangle given (x,y / width-height) properly fit into the framebuffer in order xto avoid OOB access.
Such check is currently done within the LTDC only, however I think that some of those checks should be done within the API functions themself to ensure a first level of proper parameter validity. In order to have proper behavior of all display drivers, some level of framework level checks can be done, removing amount of duplicated code between drivers.
I will prepare a PR for that purpose and propose it.