Add PPA hardware-accelerated rotation for 90/270 degrees on ESP32-P4#140
Draft
agillis wants to merge 3 commits intoclydebarrow:lvgl-9.4from
Draft
Add PPA hardware-accelerated rotation for 90/270 degrees on ESP32-P4#140agillis wants to merge 3 commits intoclydebarrow:lvgl-9.4from
agillis wants to merge 3 commits intoclydebarrow:lvgl-9.4from
Conversation
Add hardware-accelerated rotation using the ESP32-P4 PPA (Pixel Processing Accelerator) engine instead of software rotation. Falls back to software rotation on non-P4 platforms or if PPA registration fails. Key changes: - Use PPA SRM (Scale-Rotate-Mirror) operations for 90/180/270 degree rotation - Allocate DMA-compatible cache-line-aligned buffers for PPA compatibility - Register PPA client during setup with automatic fallback to software rotation
180-degree rotation can be handled natively by the display driver, so PPA hardware acceleration is only needed for 90 and 270 degrees.
|
To use the changes from this PR as an external component, add the following to your ESPHome configuration YAML file: external_components:
- source: github://clydebarrow/esphome@pull/140/head
components: [lvgl]
refresh: 1h(Added by the PR bot) |
15 tasks
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.
What does this implement/fix?
Adds ESP32-P4 PPA (Pixel Processing Accelerator) hardware-accelerated screen rotation for 90° and 270° display orientations in the LVGL component.
The ESP32-P4's PPA SRM (Scale-Rotate-Mirror) engine performs the pixel rotation in hardware, which is significantly faster than software rotation. When PPA is not available or for 0°/180° rotations (handled natively by the display driver), the existing software fallback is used.
Changes:
draw_buffer_()for 90°/270° cases with software fallback for all angles. Added aligned buffer allocation and PPA client registration insetup().ppa_client_androtate_buf_size_members under#ifdef USE_ESP32_VARIANT_ESP32P4.Dependencies:
This PR targets clydebarrow's
lvgl-9.4branch (PR esphome#12312 on esphome/esphome).Test Environment: