From patchwork Tue May 9 01:59:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 23633 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 655BDC7EE25 for ; Tue, 9 May 2023 01:59:39 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by mx.groups.io with SMTP id smtpd.web10.3778.1683597571196654009 for ; Mon, 08 May 2023 18:59:32 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@denx.de header.s=phobos-20191101 header.b=Lt1C6vXY; spf=pass (domain: denx.de, ip: 85.214.62.61, mailfrom: marex@denx.de) Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 2534E85FD2; Tue, 9 May 2023 03:59:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683597568; bh=wpBzZOV3usWu4zTOKDgbYjBfyKormgmAxR8ESvnRhAE=; h=From:To:Cc:Subject:Date:From; b=Lt1C6vXYqezL1vM+kOpuKLqyi9UrX8kqQxcmrFkaqqT9a8pN4NL39Ep6kcJ2qb48D PPJLrShzNvX2uFxvoQ6sj98PZwsKRZEkhCIK2GvyiLWxTYeTjMmARA3IWc6YSsiZeZ B3HCmo5OwGPjGCl+JE665u0ehAo0xgFJyKz7IVfltriXrrhusI5bV1XzPMU2AqCTDa IvoVgiORVNKQg+jU+n7WVhP9KOsvNhMW+GlAJhifDXqaSITyT6LfK8LkDIHYxNDRjQ TVTtEPUhtPtouQnRNlOcWvs7Fqx5+6Ior9dPfKvHv2PBtOfiTnuI5y4s9LcI2q5Bg5 Q0dW/wy8Ak98A== From: Marek Vasut To: openembedded-devel@lists.openembedded.org Cc: Marek Vasut , Fabio Estevam , Khem Raj , Martin Jansa , Philippe Coval , Philippe Coval Subject: [meta-oe][PATCH 1/3] lvgl: Upgrade dialog-lvgl to next/main version Date: Tue, 9 May 2023 03:59:13 +0200 Message-Id: <20230509015915.77182-1-marex@denx.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 09 May 2023 01:59:39 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/102447 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 --- Cc: Fabio Estevam Cc: Khem Raj Cc: Martin Jansa Cc: Philippe Coval Cc: Philippe Coval --- ...-wayland-Switch-to-custom-timer-tick.patch | 72 +++++++++++++++++++ .../0002-wayland-Fix-callback-data-type.patch | 30 ++++++++ .../recipes-graphics/lvgl/dialog-lvgl_git.bb | 7 +- 3 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 meta-oe/recipes-graphics/lvgl/dialog-lvgl/0001-wayland-Switch-to-custom-timer-tick.patch create mode 100644 meta-oe/recipes-graphics/lvgl/dialog-lvgl/0002-wayland-Fix-callback-data-type.patch 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 000000000..5149002ff --- /dev/null +++ b/meta-oe/recipes-graphics/lvgl/dialog-lvgl/0001-wayland-Switch-to-custom-timer-tick.patch @@ -0,0 +1,72 @@ +From 1d92e1854c19c06c553243d29170bb4d1a9e3863 Mon Sep 17 00:00:00 2001 +From: Marek Vasut +Date: Tue, 9 May 2023 02:57:30 +0200 +Subject: [PATCH 1/2] wayland: Switch to custom timer tick + +The OE LVGL is configured to obtain timer tick from system timer +instead of using ad-hoc mechanisms to emulate timer tick using +threads or such. Use system timer to provide the tick. + +The tick handling implementation comes from: +https://github.com/lvgl/lv_port_linux_frame_buffer.git +as of commit adf2c4490e17a1b9ec1902cc412a24b3b8235c8e + +Upstream-Status: Inappropriate [Upstream repo is archived] +Signed-off-by: Marek Vasut +--- + src/drivers/wayland.c | 24 ++++++++++++++++-------- + 1 file changed, 16 insertions(+), 8 deletions(-) + +diff --git a/src/drivers/wayland.c b/src/drivers/wayland.c +index 633dc18..bcebf4d 100644 +--- a/src/drivers/wayland.c ++++ b/src/drivers/wayland.c +@@ -6,6 +6,7 @@ + #if defined(USE_WAYLAND) && USE_WAYLAND + + #include ++#include + #include + + #include +@@ -18,13 +19,22 @@ + #define WAYLAND_VER_RES 320 + #endif + +-static void * tick_thread(void * data) ++uint32_t custom_tick_get(void) + { +- (void) data; +- while(true) { +- usleep(5 * 1000); +- lv_tick_inc(5); +- } ++ static uint64_t start_ms = 0; ++ if(start_ms == 0) { ++ struct timeval tv_start; ++ gettimeofday(&tv_start, NULL); ++ start_ms = (tv_start.tv_sec * 1000000 + tv_start.tv_usec) / 1000; ++ } ++ ++ struct timeval tv_now; ++ gettimeofday(&tv_now, NULL); ++ uint64_t now_ms; ++ now_ms = (tv_now.tv_sec * 1000000 + tv_now.tv_usec) / 1000; ++ ++ uint32_t time_ms = now_ms - start_ms; ++ return time_ms; + } + + +@@ -47,8 +57,6 @@ void hal_init(void) + + lv_group_t * g = lv_group_create(); + lv_group_set_default(g); +- static pthread_t hal_thread; +- pthread_create(&hal_thread, NULL, tick_thread, NULL); + } + + #endif +-- +2.39.2 + 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 000000000..8919a1a2a --- /dev/null +++ b/meta-oe/recipes-graphics/lvgl/dialog-lvgl/0002-wayland-Fix-callback-data-type.patch @@ -0,0 +1,30 @@ +From b7af695d79820adf53e7d612120bda12ed2886e2 Mon Sep 17 00:00:00 2001 +From: Marek Vasut +Date: Tue, 9 May 2023 02:57:38 +0200 +Subject: [PATCH 2/2] wayland: Fix callback data type + +The LVGL 8.3.y changed the callback data type, update it accordingly. + +Upstream-Status: Inappropriate [Upstream repo is archived] +Signed-off-by: Marek Vasut +--- + src/drivers/wayland.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/drivers/wayland.c b/src/drivers/wayland.c +index bcebf4d..cfefa88 100644 +--- a/src/drivers/wayland.c ++++ b/src/drivers/wayland.c +@@ -37,8 +37,7 @@ uint32_t custom_tick_get(void) + return time_ms; + } + +- +-static lv_wayland_display_close_f_t close_cb() ++static bool close_cb(lv_disp_t * disp) + { + } + +-- +2.39.2 + diff --git a/meta-oe/recipes-graphics/lvgl/dialog-lvgl_git.bb b/meta-oe/recipes-graphics/lvgl/dialog-lvgl_git.bb index 7e24c51f2..3f42fb978 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 @@ # SPDX-FileCopyrightText: Huawei Inc. # SPDX-License-Identifier: MIT -SRC_URI = "gitsm://git.ostc-eu.org/rzr/dialog-lvgl;destsuffix=${S};protocol=https;nobranch=1" -SRCREV = "5d2121457a6988c97cacb0790594440693fc3d29" +SRC_URI = "git://git.ostc-eu.org/rzr/dialog-lvgl;destsuffix=${S};protocol=https;nobranch=1 \ + file://0001-wayland-Switch-to-custom-timer-tick.patch \ + file://0002-wayland-Fix-callback-data-type.patch \ + " +SRCREV = "cdf8d38acca87e871c3a488fd07f1e4779590f8e" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=8ce0a84e5276f01364119c873b712c4f" From patchwork Tue May 9 01:59:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 23632 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 663A4C77B7F for ; Tue, 9 May 2023 01:59:39 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by mx.groups.io with SMTP id smtpd.web10.3777.1683597571086217544 for ; Mon, 08 May 2023 18:59:32 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@denx.de header.s=phobos-20191101 header.b=D70sEw+k; spf=pass (domain: denx.de, ip: 85.214.62.61, mailfrom: marex@denx.de) Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 8D8DB85FE0; Tue, 9 May 2023 03:59:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683597568; bh=gye7hhhGOI59M9Vzn0PS3wCS+ZA9lKK6fzUpoVi8nxY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D70sEw+k9kDFWRZj7/vr7G6Qv7bJjkPx72ihp2VrTxv1+aT/2pM+XfE2/icU+9yaT 6e5OqxGSZcSypumj3i0wXsKFRWZF5JBt+qf4w3ekFEB2hjwpt/r8t9A71Frbk1F9o/ 2tS9ZpB00GtIr6BHfaXf+ElsC0s8ouxVSfkqBM9/DSQXta3oatNa8d50MW820dJM76 BHrX+BxU8I1w8Ej32Dwt0zttxBfq2Lu+e/T7NqUxHaAA8f+yTM3crxV97cGc1iBLuE 5U2lO3PrClbnZC0MIHNZU5RqjY7ocW8YeGQ5nJoOmcvd4zBPbeRwtsXeixJ8QnoeVn qayqMmV0sNIgA== From: Marek Vasut To: openembedded-devel@lists.openembedded.org Cc: Marek Vasut , Fabio Estevam , Khem Raj , Martin Jansa , Philippe Coval , Philippe Coval Subject: [meta-oe][PATCH 2/3] lvgl: Reinstate git submodules in lvgl-demo-fb Date: Tue, 9 May 2023 03:59:14 +0200 Message-Id: <20230509015915.77182-2-marex@denx.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230509015915.77182-1-marex@denx.de> References: <20230509015915.77182-1-marex@denx.de> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 09 May 2023 01:59:39 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/102446 The lvgl-demo-fb depends on specific configuration of LVGL which includes demo widgets, which as far as I can tell are not needed for regular LVGL application development. Reinstate the gitsm in this recipe temporarily, so it can again build its own version of LVGL and stops failing to build, at least until better fix exists. Signed-off-by: Marek Vasut --- NOTE: I am almost tempted to drop this recipe, it basically builds two files against LVGL configured in specific way. And it seems the LVGL has no modularity support, so we cannot deal with packaging the extra widgets easily. --- Cc: Fabio Estevam Cc: Khem Raj Cc: Martin Jansa Cc: Philippe Coval Cc: Philippe Coval --- meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb b/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb index 6d9ff89f5..d86d6ff9c 100644 --- a/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb +++ b/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb @@ -5,9 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=802d3d83ae80ef5f343050bf96cce3a4 \ file://lv_drivers/LICENSE;md5=d6fc0df890c5270ef045981b516bb8f2 \ file://lvgl/LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a" -DEPENDS = "lvgl lv-drivers" - -SRC_URI = "git://github.com/lvgl/lv_port_linux_frame_buffer.git;branch=master;protocol=https" +SRC_URI = "gitsm://github.com/lvgl/lv_port_linux_frame_buffer.git;branch=master;protocol=https" SRCREV = "adf2c4490e17a1b9ec1902cc412a24b3b8235c8e" S = "${WORKDIR}/git" From patchwork Tue May 9 01:59:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 23631 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64550C7EE22 for ; Tue, 9 May 2023 01:59:39 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by mx.groups.io with SMTP id smtpd.web11.3795.1683597571086701350 for ; Mon, 08 May 2023 18:59:32 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@denx.de header.s=phobos-20191101 header.b=KpHab99X; spf=pass (domain: denx.de, ip: 85.214.62.61, mailfrom: marex@denx.de) Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id E91FF85FE2; Tue, 9 May 2023 03:59:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683597569; bh=Hy6/a2YEe9FiUykpiGL7XcsaKXX9pyIWtXUOdQTkgbU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KpHab99XuGk+i+MjB1dH8MdYgjuXOAYDFmA7NIOCxOs2+xK/RRGezoWK2X1304m2t oM8HkZXoN/1GyF6V+CENU685BlgMT59SLjsz6wWTXRXrJZKx2HZnJ/aHPvJWJtk4Q/ NqaRO1FYWsAN8pIJSQ4lH7OWOe5wPnUc1Bez/8ufeOltIZMh+MEJmvSeKBX8UnXelP aUmrQ6J+Pw5v4cvkoo/6xt5N37oetlsw9j9HEiLZ84B98jftiBf3i68gVO4pZ8lnZE LCC2yPQ6ey9jW3GUBgcyWpFgdty+RXUlWnVFFYsjzTDx0ccZgbt4Sw1yOQz2xLlwPC Zhjzyn40m1E6w== From: Marek Vasut To: openembedded-devel@lists.openembedded.org Cc: Marek Vasut , Fabio Estevam , Khem Raj , Martin Jansa , Philippe Coval , Philippe Coval Subject: [meta-oe][PATCH 3/3] lvgl: Add dependency on fbdev into lvgl-demo-fb DISTRO_FEATURES Date: Tue, 9 May 2023 03:59:15 +0200 Message-Id: <20230509015915.77182-3-marex@denx.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230509015915.77182-1-marex@denx.de> References: <20230509015915.77182-1-marex@denx.de> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 09 May 2023 01:59:39 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/102448 This recipe hard depends on fbdev, since it specifically targets systems using it. Add the DISTRO_FEATURES dependency to indicate it. Signed-off-by: Marek Vasut --- Cc: Fabio Estevam Cc: Khem Raj Cc: Martin Jansa Cc: Philippe Coval Cc: Philippe Coval --- meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb b/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb index d86d6ff9c..8e0b91cac 100644 --- a/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb +++ b/meta-oe/recipes-graphics/lvgl/lvgl-demo-fb_8.3.0.bb @@ -10,6 +10,8 @@ SRCREV = "adf2c4490e17a1b9ec1902cc412a24b3b8235c8e" S = "${WORKDIR}/git" +REQUIRED_DISTRO_FEATURES = "fbdev" + EXTRA_OEMAKE = "DESTDIR=${D}" do_install() {