Upgrading Lvgl 8.3 to 9.x: Buggy and Laggy Display

Note: I’ve narrowed the issue posted here down - can someone close/delete that topic ?

Description

I have a Viewesmart display which worked fine with Lvgl 8.3 lib … until I redesigned most of the ui using fancy lvgl 9 additions, assuming that moving to lvgl 9 would be trival. What that was a dumb move! Turns out that migration can be quite tricky, and I haven’t been able to run 9+ properly so far. The display turns on but the colors are wrong the the animation super slow and glitchy. Since the hw implementation can be quite complicated, I could really use some help - thank you very much!

What MCU/Processor/Board and compiler are you using?

esp32s3
1.5" amoled with co5300 qspi driver
esp-idf chaintool

What do you want to achieve?

Getting LVGL 9 to work!

What have you tried so far?

Tried so many howtos I don’t even know how to list all of them. Basically the code has been ported from 8.3 to 9.x using the new syntax and new way to flush the buffers. Something is working since the display turns on and shows some sort of spinner!
What worked so far is protecting the lvgl thread with a mutex to keep the watchdog from crashing the system every 30s.

Code to reproduce

See attached file: the main.c code
knob_display.c (6.7 KB)

Screenshot and/or video

So after a lot of experimenting, I managed to swap the colors and fix the glitches using a rounder_cb.
Here is the fix to swap colors - to be pasted just before drawing the buffer in flush_cb:

lv_draw_sw_rgb565_swap(color_map, (area->x2 - area->x1 + 1) * (area->y2 - area->y1 + 1));

For the rounder_cb implementation, check the attached source code.

The only issue left is that it’s soooooooooooo slow, to a point it’s barely usable. Looks like something is hijaking the flush_cb before it can print stuff on the display. Any idea what it could be ? Here my updated code:

knob_display_v9.c (9.0 KB)