Inverse colors on cheap yellow display and LVGL 9

There are several posts on this problem. Sadly none of the proposals helped me, I used Pimoroni Display Pack 2.0 with st7789.
After trial and error, and of course debug I found a proper fix:

  1. this was tested for LVGL v9.4.0 (latest release at this time)
  2. st7789 driver was implemented using advised pattern (applies to all display drivers)
    ST7789 LCD Controller driver - LVGL 9.5 documentation
    Generic MIPI DCS compatible LCD Controller driver - LVGL 9.5 documentation
  3. after creating lv_display_t you need to use lv_lcd_generic_mipi_set_invert(disp, true);