-
-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
DMA2D syscalls #4683
Open
cepetr
wants to merge
7
commits into
main
Choose a base branch
from
cepetr/dma2d-syscalls
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
DMA2D syscalls #4683
Conversation
This file contains 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
|
b1435fa
to
ed48679
Compare
7997f8f
to
1622b81
Compare
TychoVrahe
requested changes
Mar 3, 2025
TychoVrahe
approved these changes
Mar 3, 2025
[no changelog]
[no changelog]
[no changelog]
[no changelog]
[no changelog]
[no changelog]
6167057
to
25c8296
Compare
[no changelog]
25c8296
to
336ddab
Compare
# for free
to join this conversation on GitHub.
Already have an account?
# 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.
This PR moves DMA2D operations entirely into the kernel. Applications must now use new syscalls instead of directly accessing the DMA2D peripheral. This change enhances security at the cost of some extra CPU cycles due to syscall overhead (approximately 3 microseconds per syscall).
Additionally, the new DMA2D syscalls, along with the existing display syscalls, have improved verifiers so that unprivileged applications cannot pass invalid pointers or coordinates in the bitblt structure.
A few final optimizations were completed in 36b866f, but there is still room for further improvements (e.g., replacing
HAL_DMA2D_xxx
calls with our own implementation).On most screens, the impact on final framerate is negligible. However, on a few screens with intensive drawing - such as a homescreen with five concentric circles - the drawing time can increase significantly (from 15ms to 23ms in case of the homescreen). This change has no visible effect since we already missed the 60Hz framerate deadline before the change, maintaining a framerate of 30Hz both before and after.
resolves #4206 and #4273