lvgl / lvgl

Embedded graphics library to create beautiful UIs for any MCU, MPU and display type.
https://lvgl.io
MIT License
16.33k stars 3.2k forks source link

Is there a low-level API for rotation that facilitates using an external accelerator? #6591

Closed Zmmfly closed 1 week ago

Zmmfly commented 2 months ago

Introduce the problem

After purchasing the ESP32-P4 development board, I wanted to use its PPA peripheral to improve the LVGL frame rate.

In RGB888 color mode, the frame rate improvement brought by using PPA is huge for fill operations, but not so obvious for blend operations;

On RGB565, I found that there is basically no difference between using PPA and not using PPA. I don’t know what went wrong. I found that the frame rate of image rotation in benchmarks is very low. If it can be accelerated with PPA, I think the benefits will be huge;

However, I didn’t find a convenient way to override the default operation like LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888.

Proposal

No response

faxe1008 commented 2 months ago

From my understanding of LVGL you would write your custom draw unit implementation for this. In there you can expose which draw operations it should handle and also a preference score. You can take a peek at the existing accelerators for inspiration. The API they use is afaik all public.

lvgl-bot commented 1 month ago

We need some feedback on this issue.

Now we mark this as "stale" because there was no activity here for 14 days.

Remove the "stale" label or comment else this will be closed in 7 days.

kisvegabor commented 1 month ago

I can confirm what @faxe1008 said.

I can also add that usually simple 2D GPUs are not faster than SW rendering, partly because some of the operations are limited by the memory bandwidth. However GPUs are working in the background and at least the CPU can do something else in the meantime.

lvgl-bot commented 1 month ago

We need some feedback on this issue.

Now we mark this as "stale" because there was no activity here for 14 days.

Remove the "stale" label or comment else this will be closed in 7 days.

lvgl-bot commented 2 weeks ago

We need some feedback on this issue.

Now we mark this as "stale" because there was no activity here for 14 days.

Remove the "stale" label or comment else this will be closed in 7 days.

lvgl-bot commented 1 week ago

As there was no activity here for a while we close this issue. But don't worry, the conversation is still here and you can get back to it at any time.

Feel free to comment if you have remarks or ideas on this topic.