diff mbox series

[meta-oe,3/5] lvgl: Add configurable color depth, default to 32bpp

Message ID 20230507132349.10674-3-marex@denx.de
State Under Review
Headers show
Series [meta-oe,1/5] lvgl: Upgrade lvgl to 8.3.7 and lv-driver to 8.3.0 | expand

Commit Message

Marek Vasut May 7, 2023, 1:23 p.m. UTC
Make color depth configurable and default to 32bpp .

Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Fabio Estevam <festevam@denx.de>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Martin Jansa <martin.jansa@gmail.com>
Cc: Philippe Coval <philippe.coval.ext@huawei.com>
Cc: Philippe Coval <philippe.coval@huawei.com>
---
 meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb b/meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb
index 5f3fc44cf..a3fd7e04c 100644
--- a/meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb
+++ b/meta-oe/recipes-graphics/lvgl/lvgl_8.3.7.bb
@@ -20,6 +20,7 @@  EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib}"
 S = "${WORKDIR}/git"
 
 LVGL_CONFIG_LV_MEM_CUSTOM ?= "0"
+LVGL_CONFIG_LV_COLOR_DEPTH ?= "32"
 
 # Upstream does not support a default configuration
 # but propose a default "disabled" template, which is used as reference
@@ -27,6 +28,8 @@  LVGL_CONFIG_LV_MEM_CUSTOM ?= "0"
 do_configure:prepend() {
     [ -r "${S}/lv_conf.h" ] \
         || sed -e 's|#if 0 .*Set it to "1" to enable .*|#if 1 // Enabled|g' \
+	    -e "s|\(#define LV_COLOR_DEPTH \).*|\1 ${LVGL_CONFIG_LV_COLOR_DEPTH}|g" \
+	    \
 	    -e "s|\(#define LV_MEM_CUSTOM .*\)0|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \
 	    \
 	    -e "s|\(#define LV_TICK_CUSTOM \).*|\1 1|g" \