Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update LVGL module to 9.2.0 #68168

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

faxe1008
Copy link
Collaborator

@faxe1008 faxe1008 commented Jan 26, 2024

Update the lvgl module to version 9.0.0. Commits still need to be cleaned, opening this for others to also test.

Things left to do:

  • Investigate the failing tests
  • Fix LV_Z_FLUSH_THREAD
  • Check samples on displays of every color format
  • Color on RGB888 display
  • Solution for monochrome pixel format
  • Add the OSAL layer`
  • Figure out what to do about DMA2D
  • Add the new demos

@zephyrbot
Copy link
Collaborator

zephyrbot commented Jan 26, 2024

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
lvgl zephyrproject-rtos/lvgl@2b498e6 zephyrproject-rtos/lvgl#54 zephyrproject-rtos/lvgl#54/files

DNM label due to: 1 project with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-lvgl DNM This PR should not be merged (Do Not Merge) labels Jan 26, 2024
@faxe1008 faxe1008 force-pushed the update_lvgl_90 branch 2 times, most recently from cb75cec to d9104c2 Compare January 27, 2024 12:14
@faxe1008 faxe1008 changed the title DNM Update LVGL module to 9.0.0 DNM Update LVGL module to 9.1.0 Apr 1, 2024
@faxe1008
Copy link
Collaborator Author

faxe1008 commented Apr 1, 2024

I updated the module branch and this PR for the release v9.1.0, which was ~1 week ago. However I am still facing an issue with the build system, lvgl samples show this error in CI (and also locally):

CMake Error at /__w/zephyr/zephyr/cmake/modules/arch_v2.cmake:36 (message):
  ARCH not defined.  Check that BOARD=wio_terminal, is selecting an
  appropriate SoC in Kconfig, SoC=samd51p19a, and that the SoC is selecting
  the correct architecture.

Any help as to why this update messes with the ARCH Kconfig symbol would be very much appreciated :^).

@faxe1008
Copy link
Collaborator Author

faxe1008 commented Apr 3, 2024

Located the issue this was happening because of this Kconfig in upstream lvgl:

		config LV_TXT_BREAK_CHARS
			string "Can break (wrap) texts on these chars"
			default " ,.;:-_)]}"

@faxe1008 faxe1008 force-pushed the update_lvgl_90 branch 17 times, most recently from 2fff0ec to 6edd179 Compare April 4, 2024 15:05
@Finomnis
Copy link
Contributor

#81184 got merged, I think that one collides with this PR

@Finomnis
Copy link
Contributor

Finomnis commented Nov 19, 2024

@faxe1008 Updated samples/modules/lvgl/screen_transparency/src/main.c:

diff --git a/samples/modules/lvgl/screen_transparency/src/main.c b/samples/modules/lvgl/screen_transparency/src/main.c
index 64494ffdaed..b0e6164fc8b 100644
--- a/samples/modules/lvgl/screen_transparency/src/main.c
+++ b/samples/modules/lvgl/screen_transparency/src/main.c
@@ -21,14 +21,13 @@ static void initialize_gui(void)
        lv_obj_t *label;
 
        /* Configure screen and background for transparency */
-       lv_obj_set_style_bg_opa(lv_scr_act(), LV_OPA_TRANSP, LV_PART_MAIN);
-       lv_disp_set_bg_opa(NULL, LV_OPA_TRANSP);
-       lv_obj_set_style_bg_color(lv_scr_act(), lv_color_hex(0x000000), LV_PART_MAIN);
+       lv_obj_set_style_bg_opa(lv_screen_active(), LV_OPA_TRANSP, LV_PART_MAIN);
+       lv_obj_set_style_bg_opa(lv_layer_bottom(), LV_OPA_TRANSP, LV_PART_MAIN);
 
        /* Create a label, set its text and align it to the center */
-       label = lv_label_create(lv_scr_act());
+       label = lv_label_create(lv_screen_active());
        lv_label_set_text(label, "Hello, world!");
-       lv_obj_set_style_text_color(lv_scr_act(), lv_color_hex(0xff00ff), LV_PART_MAIN);
+       lv_obj_set_style_text_color(lv_screen_active(), lv_color_hex(0xff00ff), LV_PART_MAIN);
        lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);
 }
 
@@ -60,11 +59,11 @@ int main(void)
 
        initialize_gui();
 
-       lv_task_handler();
+       lv_timer_handler();
        display_blanking_off(display_dev);
 
        while (1) {
-               uint32_t sleep_ms = lv_task_handler();
+               uint32_t sleep_ms = lv_timer_handler();
 
                k_msleep(MIN(sleep_ms, INT32_MAX));
        }

Together with removing CONFIG_LV_COLOR_SCREEN_TRANSP=y (which you already did, I saw), this should update the screen_transparency sample.

Reference: https://docs.lvgl.io/master/details/base-widget/obj.html#transparent-screens

@faxe1008
Copy link
Collaborator Author

@Finomnis updated the PR, thanks for catching it :^)

kartben
kartben previously approved these changes Nov 21, 2024
@Finomnis
Copy link
Contributor

Except of #81263, is this change feature complete? No other open known issues?

@faxe1008
Copy link
Collaborator Author

@Finomnis yes, everything else should be done. Some more tests for monochrome displays with real hardware would be good though.

Update the west yaml to point to the new LVGL version.

Signed-off-by: Fabian Blatz <[email protected]>
Update the CMakeLists for LVGL to reflect the changes done in v9.2.0.

Signed-off-by: Fabian Blatz <[email protected]>
With v9.1.0 the benchmark sample now has a Kconfig depedency on
LV_USE_DEMO_WIDGETS.

Signed-off-by: Fabian Blatz <[email protected]>
With the update to v9.2.0 several Kconfig symbols were renamed or removed.
Adjust the test accordingly. Also several constants were renamed, rename
those also.

Signed-off-by: Fabian Blatz <[email protected]>
Rename the defaulted DMA2D Kconfig symbols to match the new upstream
nomenclature.

Signed-off-by: Fabian Blatz <[email protected]>
This patch fixes the style size setter usage in the accelerometer_chart
demo since it now expects two dimensions. Also the newly named functions
which are typedefed by the api_map in LVGL are updated to anticipate their
deprecation.

Signed-off-by: Fabian Blatz <[email protected]>
This patch changes the usage of LVGL functions which are typedefed in the
api map to their new version to anticipate their deprecation.

Signed-off-by: Fabian Blatz <[email protected]>
This patch changes the functions unsed in the subsys demo that are part of
the api map to anticipate their deprecation.

Signed-off-by: Fabian Blatz <[email protected]>
This patch updates the module gluecode to be compatible with LVGL version
9.2. This includes changes done to display and input driver initialization
  and draw buffer handling.

Signed-off-by: Fabian Blatz <[email protected]>
This patch adds the OSAL implementation of dynamic thread creation, mutex
and thread syncronization primitive (semaphore) enabling the use of the
parallel rendering architecture provided with LVGL 9.0. To use it, set
`CONFIG_LV_Z_USE_OSAL` and your preferred dynamic thread stack allocation
method (pool or heap).

Signed-off-by: Fabian Blatz <[email protected]>
This patch adds a testcase adding the OSAL to ensure the implementation is
built during CI.

Signed-off-by: Fabian Blatz <[email protected]>
Add the new demos of LVGL 9.2:
- flex_layout
- keypad_and_encoder
- render
- scroll
- multilang

Signed-off-by: Fabian Blatz <[email protected]>
Adds support for the NXP PXP engine. LVGL changed
the Kconfig symbol from LV_USE_GPU_NXP_PXP to
LV_USE_PXP, but hal_nxp still relies on
LV_USE_GPU_NXP_PXP, so add a temporary symbol for it.
Additionally the drawing engines need to invalidate
ranges in the dcache, the method needs to be provided
via a lvgl_support.h file.

Signed-off-by: Fabian Blatz <[email protected]>
Adjust the Kconfig symbols of the capture to lvgl sample. LV_MEM_CUSTOM has
been removed in v9.0 and LV_USE_IMG has been changed to LV_USE_IMAGE.
Fix the changed fields for the image descriptor struct.

Signed-off-by: Fabian Blatz <[email protected]>
Removes the LV_COLOR_SCREEN_TRANSP Kconfig option as its not part of the
modules Kconfig anymore and renames the functions according to the new v9.2
API.

Signed-off-by: Fabian Blatz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Display area: LVGL Light and Versatile Graphics Library Support area: Samples Samples area: Video Video subsystem DNM This PR should not be merged (Do Not Merge) manifest manifest-lvgl platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.