Skip to content

ESP32-P4 PPA (Pixel Processing Accelerator) engine instead of software rotation#139

Open
agillis wants to merge 2 commits intoclydebarrow:lvgl-9.4from
agillis:ppa_rotate
Open

ESP32-P4 PPA (Pixel Processing Accelerator) engine instead of software rotation#139
agillis wants to merge 2 commits intoclydebarrow:lvgl-9.4from
agillis:ppa_rotate

Conversation

@agillis
Copy link

@agillis agillis commented Feb 24, 2026

What does this implement/fix?

Add hardware-accelerated rotation using the ESP32-P4 PPA (Pixel Processing
Accelerator) engine instead of software rotation.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Developer breaking change (an API change that could break external components)
  • Code quality improvements to existing code or addition of tests
  • Other

Related issue or feature (if applicable):

  • fixes

Pull request in esphome-docs with documentation (if applicable):

  • esphome/esphome-docs#

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx
  • LN882x
  • nRF52840

Example entry for config.yaml:

# Example config.yaml

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

andrew and others added 2 commits February 20, 2026 15:17
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
@agillis agillis requested a review from clydebarrow as a code owner February 24, 2026 16:33
@github-actions
Copy link

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/139/head
    components: [lvgl]
    refresh: 1h

(Added by the PR bot)

@clydebarrow
Copy link
Owner

Is PPA handled already in LVGL 9.5? Might make sense to just target that, unless there are any showstoppers.

@agillis
Copy link
Author

agillis commented Feb 26, 2026

LVGL 9.5 adds some new PPA features such as the ability to fill polygons using PPA. But my code to do screen rotation (or a version of it) would still be required. My goal it to get ESPHome switched over to LVGL 9.x as quickly as possible with as little disrution as possible so we can start using all the new features including PPA. I would be interested in moving to 9.5 but only if we can get there as fast as 9.4. If we can get LVGL 9.x in the next release this would be a huge step forward for ESPHome.

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.

2 participants