summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2023-05-09 04:43:54 +0200
committerKhem Raj <raj.khem@gmail.com>2023-05-09 10:12:44 -0700
commitfcbe242276adb5e6164dec1ce446a861fd3962d1 (patch)
tree94ee4ed11368cd843b9fbcdec962d92852e0e8fd
parent387200af7c05afa6a311d3554cf26e4523432f94 (diff)
downloadmeta-openembedded-fcbe242276adb5e6164dec1ce446a861fd3962d1.tar.gz
lvgl: Upgrade dialog-lvgl to next/main version
The dialog-lvgl has been unmaintained and stuck at LVGL v8.1.0 in its now archived repository branch main. There is subsequent effort in next/main branch which updates the code base to LVGL v8.2.0 that is almost compatible enough to still build against LVGL v8.3.7. Upgrade to this next/main branch which contains three additional commits on top of the main branch, which implement the update to newer LVGL. Add two more fixes to build against system timer provided tick and another fix for WL callback data type. Since there is no upstream, track the patches here for now. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-graphics/lvgl/dialog-lvgl/0001-wayland-Switch-to-custom-timer-tick.patch72
-rw-r--r--meta-oe/recipes-graphics/lvgl/dialog-lvgl/0002-wayland-Fix-callback-data-type.patch30
-rw-r--r--meta-oe/recipes-graphics/lvgl/dialog-lvgl_git.bb7
3 files changed, 107 insertions, 2 deletions
diff --git a/meta-oe/recipes-graphics/lvgl/dialog-lvgl/0001-wayland-Switch-to-custom-timer-tick.patch b/meta-oe/recipes-graphics/lvgl/dialog-lvgl/0001-wayland-Switch-to-custom-timer-tick.patch
new file mode 100644
index 0000000000..5149002ff5
--- /dev/null
+++ b/meta-oe/recipes-graphics/lvgl/dialog-lvgl/0001-wayland-Switch-to-custom-timer-tick.patch
@@ -0,0 +1,72 @@
1From 1d92e1854c19c06c553243d29170bb4d1a9e3863 Mon Sep 17 00:00:00 2001
2From: Marek Vasut <marex@denx.de>
3Date: Tue, 9 May 2023 02:57:30 +0200
4Subject: [PATCH 1/2] wayland: Switch to custom timer tick
5
6The OE LVGL is configured to obtain timer tick from system timer
7instead of using ad-hoc mechanisms to emulate timer tick using
8threads or such. Use system timer to provide the tick.
9
10The tick handling implementation comes from:
11https://github.com/lvgl/lv_port_linux_frame_buffer.git
12as of commit adf2c4490e17a1b9ec1902cc412a24b3b8235c8e
13
14Upstream-Status: Inappropriate [Upstream repo is archived]
15Signed-off-by: Marek Vasut <marex@denx.de>
16---
17 src/drivers/wayland.c | 24 ++++++++++++++++--------
18 1 file changed, 16 insertions(+), 8 deletions(-)
19
20diff --git a/src/drivers/wayland.c b/src/drivers/wayland.c
21index 633dc18..bcebf4d 100644
22--- a/src/drivers/wayland.c
23+++ b/src/drivers/wayland.c
24@@ -6,6 +6,7 @@
25 #if defined(USE_WAYLAND) && USE_WAYLAND
26
27 #include <pthread.h>
28+#include <sys/time.h>
29 #include <unistd.h>
30
31 #include <lv_drivers/wayland/wayland.h>
32@@ -18,13 +19,22 @@
33 #define WAYLAND_VER_RES 320
34 #endif
35
36-static void * tick_thread(void * data)
37+uint32_t custom_tick_get(void)
38 {
39- (void) data;
40- while(true) {
41- usleep(5 * 1000);
42- lv_tick_inc(5);
43- }
44+ static uint64_t start_ms = 0;
45+ if(start_ms == 0) {
46+ struct timeval tv_start;
47+ gettimeofday(&tv_start, NULL);
48+ start_ms = (tv_start.tv_sec * 1000000 + tv_start.tv_usec) / 1000;
49+ }
50+
51+ struct timeval tv_now;
52+ gettimeofday(&tv_now, NULL);
53+ uint64_t now_ms;
54+ now_ms = (tv_now.tv_sec * 1000000 + tv_now.tv_usec) / 1000;
55+
56+ uint32_t time_ms = now_ms - start_ms;
57+ return time_ms;
58 }
59
60
61@@ -47,8 +57,6 @@ void hal_init(void)
62
63 lv_group_t * g = lv_group_create();
64 lv_group_set_default(g);
65- static pthread_t hal_thread;
66- pthread_create(&hal_thread, NULL, tick_thread, NULL);
67 }
68
69 #endif
70--
712.39.2
72
diff --git a/meta-oe/recipes-graphics/lvgl/dialog-lvgl/0002-wayland-Fix-callback-data-type.patch b/meta-oe/recipes-graphics/lvgl/dialog-lvgl/0002-wayland-Fix-callback-data-type.patch
new file mode 100644
index 0000000000..8919a1a2ad
--- /dev/null
+++ b/meta-oe/recipes-graphics/lvgl/dialog-lvgl/0002-wayland-Fix-callback-data-type.patch
@@ -0,0 +1,30 @@
1From b7af695d79820adf53e7d612120bda12ed2886e2 Mon Sep 17 00:00:00 2001
2From: Marek Vasut <marex@denx.de>
3Date: Tue, 9 May 2023 02:57:38 +0200
4Subject: [PATCH 2/2] wayland: Fix callback data type
5
6The LVGL 8.3.y changed the callback data type, update it accordingly.
7
8Upstream-Status: Inappropriate [Upstream repo is archived]
9Signed-off-by: Marek Vasut <marex@denx.de>
10---
11 src/drivers/wayland.c | 3 +--
12 1 file changed, 1 insertion(+), 2 deletions(-)
13
14diff --git a/src/drivers/wayland.c b/src/drivers/wayland.c
15index bcebf4d..cfefa88 100644
16--- a/src/drivers/wayland.c
17+++ b/src/drivers/wayland.c
18@@ -37,8 +37,7 @@ uint32_t custom_tick_get(void)
19 return time_ms;
20 }
21
22-
23-static lv_wayland_display_close_f_t close_cb()
24+static bool close_cb(lv_disp_t * disp)
25 {
26 }
27
28--
292.39.2
30
diff --git a/meta-oe/recipes-graphics/lvgl/dialog-lvgl_git.bb b/meta-oe/recipes-graphics/lvgl/dialog-lvgl_git.bb
index 7e24c51f28..9e820d0dbf 100644
--- a/meta-oe/recipes-graphics/lvgl/dialog-lvgl_git.bb
+++ b/meta-oe/recipes-graphics/lvgl/dialog-lvgl_git.bb
@@ -1,8 +1,11 @@
1# SPDX-FileCopyrightText: Huawei Inc. 1# SPDX-FileCopyrightText: Huawei Inc.
2# SPDX-License-Identifier: MIT 2# SPDX-License-Identifier: MIT
3 3
4SRC_URI = "gitsm://git.ostc-eu.org/rzr/dialog-lvgl;destsuffix=${S};protocol=https;nobranch=1" 4SRC_URI = "git://git.ostc-eu.org/rzr/dialog-lvgl;destsuffix=${S};protocol=https;nobranch=1 \
5SRCREV = "5d2121457a6988c97cacb0790594440693fc3d29" 5 file://0001-wayland-Switch-to-custom-timer-tick.patch \
6 file://0002-wayland-Fix-callback-data-type.patch \
7 "
8SRCREV = "cdf8d38acca87e871c3a488fd07f1e4779590f8e"
6 9
7LICENSE = "MIT" 10LICENSE = "MIT"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=8ce0a84e5276f01364119c873b712c4f" 11LIC_FILES_CHKSUM = "file://LICENSE;md5=8ce0a84e5276f01364119c873b712c4f"