Skip to content

LVGL v8 upgrade#1341

Merged
acassis merged 1 commit intoapache:masterfrom
FASTSHIFT:lvgl_v8_upgrade
Jan 1, 2023
Merged

LVGL v8 upgrade#1341
acassis merged 1 commit intoapache:masterfrom
FASTSHIFT:lvgl_v8_upgrade

Conversation

@FASTSHIFT
Copy link
Copy Markdown

@FASTSHIFT FASTSHIFT commented Oct 8, 2022

Summary

Related discussion: #1322

defconfig update: apache/nuttx#7268

Impact

Apps based on LVGL v7 will not work.

Testing

Daily test.

Comment thread graphics/lvgl/lv_porting/lv_touchpad_interface.h Outdated
@xiaoxiang781216 xiaoxiang781216 linked an issue Oct 8, 2022 that may be closed by this pull request
Comment thread graphics/lvgl/Make.defs Outdated
Comment thread examples/lvgldemo/lvgldemo.c Outdated
Comment thread examples/lvgldemo/Kconfig
Comment thread examples/lvgldemo/lvgldemo.c Outdated
Comment thread graphics/lvgl/lv_porting/lv_button_interface.h Outdated
Comment thread graphics/lvgl/lv_porting/lv_button_interface.h Outdated
Comment thread graphics/lvgl/lv_porting/lv_encoder_interface.h Outdated
Comment thread graphics/lvgl/lv_porting/lv_encoder_interface.h Outdated
Comment thread graphics/lvgl/lv_porting/lv_mem_interface.h Outdated
Comment thread graphics/lvgl/lv_porting/lv_porting.h Outdated
Comment thread graphics/lvgl/lv_porting/lv_porting.h Outdated
Comment thread graphics/lvgl/lv_porting/lv_syslog_interface.h Outdated
Comment thread graphics/lvgl/lv_porting/lv_syslog_interface.h Outdated
@FASTSHIFT FASTSHIFT force-pushed the lvgl_v8_upgrade branch 7 times, most recently from 25f38b6 to ede65f0 Compare October 9, 2022 11:28
Comment thread graphics/lvgl/Kconfig Outdated
Comment thread graphics/lvgl/lv_conf/Kconfig Outdated
Comment thread graphics/lvgl/lv_conf/Kconfig
Comment thread graphics/lvgl/Makefile Outdated
Comment thread graphics/lvgl/Makefile Outdated
Comment thread graphics/lvgl/port/lv_port_button.c Outdated
Comment thread graphics/lvgl/port/lv_port_button.c Outdated
Comment thread graphics/lvgl/port/lv_port_button.c Outdated
Comment thread graphics/lvgl/port/lv_port_keypad.c
Comment thread graphics/lvgl/port/lv_port_lcddev.c Outdated
Comment thread graphics/lvgl/port/lv_port_lcddev.c Outdated
Comment thread graphics/lvgl/port/lv_port_lcddev.c Outdated
Comment thread graphics/lvgl/port/lv_port_mem.h Outdated
@FASTSHIFT FASTSHIFT force-pushed the lvgl_v8_upgrade branch 2 times, most recently from f7bd469 to 3cde003 Compare October 12, 2022 06:11
@FASTSHIFT FASTSHIFT force-pushed the lvgl_v8_upgrade branch 2 times, most recently from a967ba7 to 940107f Compare November 1, 2022 15:58
@FASTSHIFT FASTSHIFT force-pushed the lvgl_v8_upgrade branch 2 times, most recently from 1c7c5e2 to 6e16bf9 Compare November 28, 2022 08:29
Copy link
Copy Markdown
Contributor

@tmedicci tmedicci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Comment thread graphics/lvgl/port/lv_port_fbdev.c Outdated
Comment thread graphics/lvgl/port/lv_port_fbdev.c Outdated
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
@acassis
Copy link
Copy Markdown
Contributor

acassis commented Jan 1, 2023

Let's merge and fix possible regressions!

@acassis acassis merged commit a610b63 into apache:master Jan 1, 2023
@FASTSHIFT FASTSHIFT deleted the lvgl_v8_upgrade branch January 1, 2023 15:05
@lupyuen
Copy link
Copy Markdown
Member

lupyuen commented Jan 9, 2023

Hi @FASTSHIFT thanks for adding LVGL 8 support! I have a question: Should we insert lv_tick_inc() into the LVGL Task Loop, like this?

From lvgldemo.c:

  /* Handle LVGL tasks */
  while (1)
    {
      uint32_t idle;
      idle = lv_timer_handler();

      /* Minimum sleep of 1ms */
      idle = idle ? idle : 1;
      usleep(idle * 1000);

      // Inserted this: Increment LVGL Tick Count by 1 millisecond
      lv_tick_inc(1);
    }

Before Adding lv_tick_inc(): When we run lvgldemo on PINE64 PinePhone, the app doesn't read touch input from /dev/input0.

Also the LVGL Log shows: It seems lv_tick_inc() is not called

After Adding lv_tick_inc(): lvgldemo on PinePhone correctly handles the touch input. (See this)

I'm not sure if my parameter to lv_tick_inc() is correct. Maybe we need to compute the actual elapsed milliseconds using the System Timer? This might help to reduce the lag that we see in the demo video.

Thanks for looking into this :-)

@FASTSHIFT
Copy link
Copy Markdown
Author

@lupyuen
The tick of LVGL should not be placed in the same thread as the rendering, because the execution time of lv_timer_handler is not deterministic, which will cause a large error in LVGL tick.
We should let LVGL use the system timestamp provided by lv_port_tick, just need to set two options:

CONFIG_LV_TICK_CUSTOM=y
CONFIG_LV_TICK_CUSTOM_INCLUDE="port/lv_port_tick.h"

@lupyuen
Copy link
Copy Markdown
Member

lupyuen commented Jan 10, 2023

@FASTSHIFT thank you so much! LVGL on PinePhone works great now, it feels very responsive: Demo on YouTube

(Compare with the previous laggy demo)

I have documented the settings here: "LVGL Calls Our Driver"

Thanks again! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LVGL v8 version upgrade

7 participants