diff --git a/Kconfig b/Kconfig index 119554836..7fec1ac3a 100644 --- a/Kconfig +++ b/Kconfig @@ -310,7 +310,7 @@ menu "LVGL configuration" endmenu menu "GPU" - config LV_USE_DRAW_ARM2D + config LV_USE_DRAW_ARM2D_SYNC bool "Enable Arm's 2D image processing library (Arm-2D) for all Cortex-M processors." default n help diff --git a/README.md b/README.md index f55e03380..97afb41b7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ -**IMPORTANT NOTE** The next major version (v9.0.0) is developed in the master branch. -The last stable version is available in the [release/v8.3](https://github.com/lvgl/lvgl/tree/release/v8.3) branch. - ---- diff --git a/demos/benchmark/lv_demo_benchmark.c b/demos/benchmark/lv_demo_benchmark.c index 7072c7fbc..5d0fc4b10 100644 --- a/demos/benchmark/lv_demo_benchmark.c +++ b/demos/benchmark/lv_demo_benchmark.c @@ -558,6 +558,14 @@ static void summary_create(void) lv_table_set_cell_value(table, 0, 2, "Avg. FPS"); lv_table_set_cell_value(table, 0, 3, "Avg. time (render + flush)"); + /* csv log */ + LV_LOG("Benchmark Summary (%"LV_PRIu32".%"LV_PRIu32".%"LV_PRIu32" %s)\r\n", + LVGL_VERSION_MAJOR, + LVGL_VERSION_MINOR, + LVGL_VERSION_PATCH, + LVGL_VERSION_INFO); + LV_LOG("Name, Avg. CPU, Avg. FPS, Avg. time, render time, flush time\r\n"); + lv_obj_update_layout(table); int32_t col_w = lv_obj_get_content_width(table) / 4; @@ -591,6 +599,15 @@ static void summary_create(void) lv_table_set_cell_value_fmt(table, i + 2, 3, "%"LV_PRIu32" ms (%"LV_PRIu32" + %"LV_PRIu32")", render_time + flush_time, render_time, flush_time); + /* csv log */ + LV_LOG("%s, %"LV_PRIu32"%%, %"LV_PRIu32", %"LV_PRIu32", %"LV_PRIu32", %"LV_PRIu32"\r\n", + scenes[i].name, + scenes[i].cpu_avg_usage / cnt, + scenes[i].fps_avg / cnt, + render_time + flush_time, + render_time, + flush_time); + valid_scene_cnt++; total_avg_cpu += scenes[i].cpu_avg_usage / cnt; total_avg_fps += scenes[i].fps_avg / cnt; @@ -614,6 +631,13 @@ static void summary_create(void) uint32_t flush_time = total_avg_flush_time / valid_scene_cnt; lv_table_set_cell_value_fmt(table, 1, 3, "%"LV_PRIu32" ms (%"LV_PRIu32" + %"LV_PRIu32")", render_time + flush_time, render_time, flush_time); + /* csv log */ + LV_LOG("All scenes avg.,%"LV_PRIu32"%%, %"LV_PRIu32", %"LV_PRIu32", %"LV_PRIu32", %"LV_PRIu32"\r\n", + total_avg_cpu / valid_scene_cnt, + total_avg_fps / valid_scene_cnt, + render_time + flush_time, + render_time, + flush_time); } } diff --git a/docs/overview/renderers/arm2d.rst b/docs/overview/renderers/arm2d.rst index fd1647d0d..b39b3a668 100644 --- a/docs/overview/renderers/arm2d.rst +++ b/docs/overview/renderers/arm2d.rst @@ -6,20 +6,31 @@ Arm-2D is not a GPU but **an abstraction layer for 2D GPUs dedicated to Microcontrollers**. It supports all Cortex-M processors ranging from Cortex-M0 to the latest Cortex-M85. +Arm-2D accelerates LVGL9 with too modes: **Synchronous Mode** and +**Asynchronous Mode**. +- When **Helium** and **ACI (Arm Custom Instruction)** are available, it is recommend + to use **Synchronous Mode** to accelerate LVGL. +- When Arm-2D backed 2D-GPUs are available, for example, **DMAC-350 based 2D + GPUs**, it is recommend to use **Asynchronous Mode** to accelerate LVGL. + Arm-2D is an open-source project on Github. For more, please refer to: https://github.com/ARM-software/Arm-2D. How to Use ********** -In general, you can set the macro :c:macro:`LV_USE_GPU_ARM2D` to ``1`` in -``lv_conf.h`` to enable Arm-2D acceleration for LVGL. +In general: +- you can set the macro :c:macro:`LV_USE_DRAW_ARM2D_SYNC` to ``1`` in + ``lv_conf.h`` to enable Arm-2D synchronous acceleration for LVGL. +- You can set + the macro :c:macro:`LV_USE_DRAW_ARM2D_ASYNC` to ``1`` in ``lv_conf.h`` to enable + Arm-2D Asynchronous acceleration for LVGL. If you are using `CMSIS-Pack `__ to deploy the LVGL. You don't have to define the macro -:c:macro:`LV_USE_GPU_ARM2D` manually, instead, please select the component -``GPU Arm-2D`` in the **RTE** dialog. This step will define the macro for us. +:c:macro:`LV_USE_DRAW_ARM2D_SYNC` manually, instead the lv_conf_cmsis.h will +check the environment and set the :c:macro:`LV_USE_DRAW_ARM2D_SYNC` accordingly. Design Considerations ********************* @@ -31,13 +42,13 @@ LVGL (sometimes worse) for regular Cortex-M processors. **We highly recommend you enable Arm-2D acceleration for LVGL** when: -- The target processors are **Cortex-M55** and/or **Cortex-M85** +- The target processors are **Cortex-M55**, **Cortex-M52** and **Cortex-M85** - The target processors support `Helium `__. - The device vendor provides an arm-2d compliant driver for their - propriotory 2D accelerators and/or customized instruction set. + propriotory 2D accelerators and/or ACI(Arm Customized Instruction). - The target device contains - `DMA-350 `__ + `DMAC-350 `__ Examples ******** diff --git a/env_support/cmsis-pack/LVGL.lvgl.9.0.0-dev4.pack b/env_support/cmsis-pack/LVGL.lvgl.9.0.0-rc.pack similarity index 90% rename from env_support/cmsis-pack/LVGL.lvgl.9.0.0-dev4.pack rename to env_support/cmsis-pack/LVGL.lvgl.9.0.0-rc.pack index 3325d78a6..9ef4f95b0 100644 Binary files a/env_support/cmsis-pack/LVGL.lvgl.9.0.0-dev4.pack and b/env_support/cmsis-pack/LVGL.lvgl.9.0.0-rc.pack differ diff --git a/env_support/cmsis-pack/LVGL.lvgl.pdsc b/env_support/cmsis-pack/LVGL.lvgl.pdsc index 77899e141..a991d972a 100644 --- a/env_support/cmsis-pack/LVGL.lvgl.pdsc +++ b/env_support/cmsis-pack/LVGL.lvgl.pdsc @@ -36,11 +36,13 @@ https://github.com/lvgl/lvgl.git - - - LVGL 9.0.0-dev - - New Driver Architecture + + - LVGL 9.0.0-rc + - Implements a New Render Architecture that enables parallel processing - Accelerates SW-Render with NEON and Helium technology for Cortex architectures. - - Adds supports for GPUs: VG-Lite, PXP and Dave2D + - Adds supports for GPUs: VG-Lite, PXP, Dave2D and etc. + - Adds display drivers + - Adds Demos for benchmarks, render test etc, - Other fixes @@ -79,10 +81,6 @@ - Rework stm32 DMA2D support - Various fixes - - - LVGL 9.0.0-dev - - Monthly update for January - - LVGL 9.0.0-dev - The final update for 2022, Happy New Year @@ -269,7 +267,7 @@ Require LVGL Essential Service and Demo Assets - + @@ -279,67 +277,73 @@ - Enable LVGL Arm-2D GPU Support - + Condition for STM32-DMA2D + + - Enable LVGL Arm-2D GPU Support - + Condition for SWM341-DMA2D + + - Enable LVGL Arm-2D GPU Support - + Condition for NXP-PXP + + - Enable LVGL Arm-2D GPU Support - + Condition for NXP-VGLite + + - Enable LVGL Arm-2D GPU Support - + Condition for GD32-IPA + + - Enable LVGL Arm-2D GPU Support - + Condition for Renesas-Dave2D + + @@ -614,7 +618,7 @@ - + @@ -643,6 +647,20 @@ + + Add the display driver for Windows backend + + + + + + + +/* use display driver for Windows backend*/ */ +#define LV_USE_WINDOWS 1 + + + Add the display driver for Linux /dev/dri/card*/ @@ -961,6 +979,36 @@ + + An hardware acceleration from VG-Lite GPU + + + + + + + + + + + + + + + + + + + + + + +/*! \brief enable VG-Lite GPU */ +#define LV_USE_DRAW_VG_LITE 1 + + + + Using existing SDL2 APIs for acceleration diff --git a/env_support/cmsis-pack/LVGL.pidx b/env_support/cmsis-pack/LVGL.pidx index 918eda250..a9d1260c6 100644 --- a/env_support/cmsis-pack/LVGL.pidx +++ b/env_support/cmsis-pack/LVGL.pidx @@ -2,8 +2,8 @@ LVGL https://raw.githubusercontent.com/lvgl/lvgl/master/env_support/cmsis-pack/ - 2024-01-13 + 2024-01-15 - + diff --git a/env_support/cmsis-pack/README.md b/env_support/cmsis-pack/README.md index a5a0eb983..10b2b2c32 100644 --- a/env_support/cmsis-pack/README.md +++ b/env_support/cmsis-pack/README.md @@ -73,6 +73,8 @@ remove the misleading guide above this code segment. - LV_USE_DRAW_VGLITE + - LV_USE_DRAW_VG_LITE + - LV_USE_DRAW_PXP - LV_USE_DRAW_SDL @@ -115,7 +117,7 @@ remove the misleading guide above this code segment. #define LV_DRAW_BUF_STRIDE_ALIGN 4 #define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(4))) ``` -Make sure `LV_MEM_SIZE` is no less than `(256*1024U)`. +Make sure `LV_MEM_SIZE` is no less than `(96*1024U)`. 8. Remove following macro definitions in the `3rd party libraries` section: @@ -207,9 +209,15 @@ with: #endif ``` +13. Update macro `LV_PROFILER_INCLUDE`: + +```c +#define LV_PROFILER_INCLUDE "src/misc/lv_profiler_builtin.h" +``` -13. rename '**lv_conf_template.h**' to '**lv_conf_cmsis.h**'. + +14. rename '**lv_conf_template.h**' to '**lv_conf_cmsis.h**'. diff --git a/env_support/cmsis-pack/lv_conf_cmsis.h b/env_support/cmsis-pack/lv_conf_cmsis.h index f55fbe3d9..a4564225e 100644 --- a/env_support/cmsis-pack/lv_conf_cmsis.h +++ b/env_support/cmsis-pack/lv_conf_cmsis.h @@ -1,6 +1,6 @@ /** * @file lv_conf.h - * Configuration file for v9.0.0-dev + * Configuration file for v9.0.0 */ /* clang-format off */ @@ -36,7 +36,7 @@ #if LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN /*Size of the memory available for `lv_malloc()` in bytes (>= 2kB)*/ - #define LV_MEM_SIZE (256 * 1024U) /*[bytes]*/ + #define LV_MEM_SIZE (96 * 1024U) /*[bytes]*/ /*Size of the memory expand for `lv_malloc()` in bytes*/ #define LV_MEM_POOL_EXPAND_SIZE 0 @@ -125,7 +125,7 @@ /*turn-on helium acceleration when Arm-2D and the Helium-powered device are detected */ #if defined(__ARM_FEATURE_MVE) && __ARM_FEATURE_MVE #define LV_USE_DRAW_SW_ASM LV_DRAW_SW_ASM_HELIUM - #define LV_USE_DRAW_ARM2D 1 + #define LV_USE_DRAW_ARM2D_SYNC 1 #endif #endif @@ -156,6 +156,18 @@ #define LV_USE_PXP_ASSERT 0 #endif +/* Use VG-Lite GPU. */ +#define LV_USE_DRAW_VG_LITE 0 + +#if LV_USE_DRAW_VG_LITE +/* Enable VG-Lite custom external 'gpu_init()' function */ +#define LV_VG_LITE_USE_GPU_INIT 0 + +/* Enable VG-Lite assert. */ +#define LV_VG_LITE_USE_ASSERT 0 + +#endif + /*======================= * FEATURE CONFIGURATION *=======================*/ @@ -233,28 +245,6 @@ *For layers add the index number of the draw unit on black background.*/ #define LV_USE_PARALLEL_DRAW_DEBUG 0 -/*------------------ - * STATUS MONITORING - *------------------*/ - -/*1: Show CPU usage and FPS count - * Requires `LV_USE_SYSMON = 1`*/ -#define LV_USE_PERF_MONITOR 0 -#if LV_USE_PERF_MONITOR - #define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT - - /*0: Displays performance data on the screen, 1: Prints performance data using log.*/ - #define LV_USE_PERF_MONITOR_LOG_MODE 0 -#endif - -/*1: Show the used memory and the memory fragmentation - * Requires `LV_USE_BUILTIN_MALLOC = 1` - * Requires `LV_USE_SYSMON = 1`*/ -#define LV_USE_MEM_MONITOR 0 -#if LV_USE_MEM_MONITOR - #define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT -#endif - /*------------- * Others *-----------*/ @@ -671,9 +661,30 @@ * OTHERS *==================*/ - /*1: Enable system monitor component*/ -#define LV_USE_SYSMON (LV_USE_MEM_MONITOR | LV_USE_PERF_MONITOR) +#define LV_USE_SYSMON 0 + +#if LV_USE_SYSMON + + /*1: Show CPU usage and FPS count + * Requires `LV_USE_SYSMON = 1`*/ + #define LV_USE_PERF_MONITOR 0 + #if LV_USE_PERF_MONITOR + #define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT + + /*0: Displays performance data on the screen, 1: Prints performance data using log.*/ + #define LV_USE_PERF_MONITOR_LOG_MODE 0 + #endif + + /*1: Show the used memory and the memory fragmentation + * Requires `LV_USE_BUILTIN_MALLOC = 1` + * Requires `LV_USE_SYSMON = 1`*/ + #define LV_USE_MEM_MONITOR 0 + #if LV_USE_MEM_MONITOR + #define LV_USE_MEM_MONITOR_POS LV_ALIGN_BOTTOM_LEFT + #endif + +#endif /*LV_USE_SYSMON*/ /*1: Enable the runtime performance profiler*/ #define LV_USE_PROFILER 0 @@ -686,7 +697,7 @@ #endif /*Header to include for the profiler*/ - #define LV_PROFILER_INCLUDE "lvgl/src/misc/lv_profiler_builtin.h" + #define LV_PROFILER_INCLUDE "src/misc/lv_profiler_builtin.h" /*Profiler start point function*/ #define LV_PROFILER_BEGIN LV_PROFILER_BUILTIN_BEGIN diff --git a/library.json b/library.json index 5e120f542..9befc68c4 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "lvgl", - "version": "9.0.0-dev", + "version": "9.0.0-rc", "keywords": "graphics, gui, embedded, tft, lvgl", "description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.", "repository": { diff --git a/library.properties b/library.properties index eb9ef721a..0653594df 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=lvgl -version=9.0.0-dev +version=9.0.0-rc author=kisvegabor maintainer=kisvegabor,embeddedt,pete-pjb sentence=Full-featured Graphics Library for Embedded Systems diff --git a/lv_conf_template.h b/lv_conf_template.h index bf74d78f6..79116bdda 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -1,6 +1,6 @@ /** * @file lv_conf.h - * Configuration file for v9.0.0-dev + * Configuration file for v9.0.0-rc */ /* @@ -101,13 +101,16 @@ * > 1 means multiply threads will render the screen in parallel */ #define LV_DRAW_SW_DRAW_UNIT_CNT 1 + /* Use Arm-2D to accelerate the sw render */ + #define LV_USE_DRAW_ARM2D_SYNC 0 + /* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode * it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks. * "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers * and can't be drawn in chunks. */ /*The target buffer size for simple layer chunks.*/ - #define LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/ + #define LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/ /* 0: use a simple renderer capable of drawing only simple rectangles with gradient, images, texts, and straight lines only * 1: use a complex renderer capable of drawing rounded corners, shadow, skew lines, and arcs too */ @@ -133,9 +136,6 @@ #endif #endif -/* Use Arm-2D on Cortex-M based devices. Please only enable it for Helium Powered devices for now */ -#define LV_USE_DRAW_ARM2D 0 - /* Use NXP's VG-Lite GPU on iMX RTxxx platforms. */ #define LV_USE_DRAW_VGLITE 0 diff --git a/lvgl.h b/lvgl.h index e62e4b321..9e4900900 100644 --- a/lvgl.h +++ b/lvgl.h @@ -16,7 +16,7 @@ extern "C" { #define LVGL_VERSION_MAJOR 9 #define LVGL_VERSION_MINOR 0 #define LVGL_VERSION_PATCH 0 -#define LVGL_VERSION_INFO "dev" +#define LVGL_VERSION_INFO "rc" /********************* * INCLUDES diff --git a/src/draw/sw/helium/lv_draw_sw_helium.h b/src/draw/sw/arm2d/lv_draw_sw_arm2d.h similarity index 98% rename from src/draw/sw/helium/lv_draw_sw_helium.h rename to src/draw/sw/arm2d/lv_draw_sw_arm2d.h index aa6361ebf..62445ee22 100644 --- a/src/draw/sw/helium/lv_draw_sw_helium.h +++ b/src/draw/sw/arm2d/lv_draw_sw_arm2d.h @@ -1,10 +1,10 @@ /** - * @file lv_draw_sw_helium.h + * @file lv_draw_sw_arm2d.h * */ -#ifndef LV_DRAW_SW_HELIUM_H -#define LV_DRAW_SW_HELIUM_H +#ifndef LV_DRAW_SW_ARM2D_H +#define LV_DRAW_SW_ARM2D_H #ifdef __cplusplus extern "C" { @@ -18,11 +18,7 @@ extern "C" { #include "../../../lv_conf_internal.h" -#ifdef LV_DRAW_SW_HELIUM_CUSTOM_INCLUDE -#include LV_DRAW_SW_HELIUM_CUSTOM_INCLUDE -#endif - -#if LV_USE_DRAW_ARM2D +#if LV_USE_DRAW_ARM2D_SYNC #define __ARM_2D_IMPL__ #include "arm_2d.h" @@ -250,7 +246,7 @@ static inline lv_result_t _lv_draw_sw_image_helium( // layer, // blend_area.x1 - layer->buf_area.x1, // blend_area.y1 - layer->buf_area.y1); - uint8_t *des_buf = (uint8_t *)layer->buf; + uint8_t *des_buf = (uint8_t *)lv_draw_layer_go_to_xy(layer, 0, 0); uint8_t opa = draw_dsc->opa; /* ------------- prepare parameters for arm-2d APIs - END ----------- */ @@ -557,7 +553,7 @@ static inline lv_result_t _lv_draw_sw_image_recolor_rgb888( return LV_RESULT_OK; } -#endif /* LV_USE_DRAW_ARM2D */ +#endif /* LV_USE_DRAW_ARM2D_SYNC */ /* *INDENT-ON* */ @@ -565,4 +561,4 @@ static inline lv_result_t _lv_draw_sw_image_recolor_rgb888( } /*extern "C"*/ #endif -#endif /*LV_DRAW_SW_HELIUM_H*/ +#endif /*LV_DRAW_SW_ARM2D_H */ diff --git a/src/draw/sw/arm2d/lv_draw_sw_helium.h b/src/draw/sw/arm2d/lv_draw_sw_helium.h new file mode 100644 index 000000000..c35a06eb6 --- /dev/null +++ b/src/draw/sw/arm2d/lv_draw_sw_helium.h @@ -0,0 +1,60 @@ +/** + * @file lv_draw_sw_helium.h + * + */ + +#ifndef LV_DRAW_SW_HELIUM_H +#define LV_DRAW_SW_HELIUM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* *INDENT-OFF* */ + +/********************* + * INCLUDES + *********************/ + +#include "../../../lv_conf_internal.h" + +/* detect whether helium is available based on arm compilers' standard */ +#if defined(__ARM_FEATURE_MVE) && __ARM_FEATURE_MVE + +#ifdef LV_DRAW_SW_HELIUM_CUSTOM_INCLUDE +#include LV_DRAW_SW_HELIUM_CUSTOM_INCLUDE +#endif + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/********************* + * POST INCLUDES + *********************/ +/* use arm-2d as the default helium acceleration */ +#include "lv_draw_sw_arm2d.h" + +#endif /* defined(__ARM_FEATURE_MVE) && __ARM_FEATURE_MVE */ + +#ifdef __cplusplus +} /*extern "C"*/ +#endif + +#endif /*LV_DRAW_SW_HELIUM_H*/ diff --git a/src/draw/sw/blend/helium/lv_blend_helium.h b/src/draw/sw/blend/arm2d/lv_blend_arm2d.h similarity index 99% rename from src/draw/sw/blend/helium/lv_blend_helium.h rename to src/draw/sw/blend/arm2d/lv_blend_arm2d.h index 32fe8192d..669b3a2d4 100644 --- a/src/draw/sw/blend/helium/lv_blend_helium.h +++ b/src/draw/sw/blend/arm2d/lv_blend_arm2d.h @@ -1,10 +1,10 @@ /** - * @file lv_blend_to_helium.h + * @file lv_blend_arm2d.h * */ -#ifndef LV_BLEND_TO_HELIUM_H -#define LV_BLEND_TO_HELIUM_H +#ifndef LV_BLEND_ARM2D_H +#define LV_BLEND_ARM2D_H #ifdef __cplusplus extern "C" { @@ -16,11 +16,7 @@ extern "C" { #include "../../../../lv_conf_internal.h" -#ifdef LV_DRAW_SW_HELIUM_CUSTOM_INCLUDE -#include LV_DRAW_SW_HELIUM_CUSTOM_INCLUDE -#endif - -#if LV_USE_DRAW_ARM2D +#if LV_USE_DRAW_ARM2D_SYNC #define __ARM_2D_IMPL__ #include "arm_2d.h" @@ -1436,10 +1432,10 @@ static inline lv_result_t _lv_argb8888_blend_normal_to_argb8888_mix_mask_opa_hel * MACROS **********************/ -#endif /* LV_USE_DRAW_ARM2D */ +#endif /* LV_USE_DRAW_ARM2D_SYNC */ #ifdef __cplusplus } /*extern "C"*/ #endif -#endif /*LV_BLEND_TO_HELIUM_H*/ +#endif /*LV_BLEND_ARM2D_H*/ diff --git a/src/draw/sw/blend/arm2d/lv_blend_helium.h b/src/draw/sw/blend/arm2d/lv_blend_helium.h new file mode 100644 index 000000000..03caed11f --- /dev/null +++ b/src/draw/sw/blend/arm2d/lv_blend_helium.h @@ -0,0 +1,58 @@ +/** + * @file lv_blend_arm2d.h + * + */ + +#ifndef LV_BLEND_HELIUM_H +#define LV_BLEND_HELIUM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ + +#include "../../../../lv_conf_internal.h" + +/* detect whether helium is available based on arm compilers' standard */ +#if defined(__ARM_FEATURE_MVE) && __ARM_FEATURE_MVE + +#ifdef LV_DRAW_SW_HELIUM_CUSTOM_INCLUDE +#include LV_DRAW_SW_HELIUM_CUSTOM_INCLUDE +#endif + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/********************* + * POST INCLUDES + *********************/ +/* use arm-2d as the default helium acceleration */ +#include "lv_blend_arm2d.h" + +#endif /* defined(__ARM_FEATURE_MVE) && __ARM_FEATURE_MVE */ + +#ifdef __cplusplus +} /*extern "C"*/ +#endif + +#endif /*LV_BLEND_HELIUM_H*/ diff --git a/src/draw/sw/blend/lv_draw_sw_blend_to_argb8888.c b/src/draw/sw/blend/lv_draw_sw_blend_to_argb8888.c index 19a7848ef..79a7accd5 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_to_argb8888.c +++ b/src/draw/sw/blend/lv_draw_sw_blend_to_argb8888.c @@ -19,7 +19,7 @@ #if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_NEON #include "neon/lv_blend_neon.h" #elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_HELIUM - #include "helium/lv_blend_helium.h" + #include "arm2d/lv_blend_helium.h" #elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_CUSTOM #include LV_DRAW_SW_ASM_CUSTOM_INCLUDE #endif diff --git a/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c b/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c index 9922d5e19..634ed7b46 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c +++ b/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c @@ -19,7 +19,7 @@ #if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_NEON #include "neon/lv_blend_neon.h" #elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_HELIUM - #include "helium/lv_blend_helium.h" + #include "arm2d/lv_blend_helium.h" #elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_CUSTOM #include LV_DRAW_SW_ASM_CUSTOM_INCLUDE #endif diff --git a/src/draw/sw/blend/lv_draw_sw_blend_to_rgb888.c b/src/draw/sw/blend/lv_draw_sw_blend_to_rgb888.c index 7a9ad44d3..17860a257 100644 --- a/src/draw/sw/blend/lv_draw_sw_blend_to_rgb888.c +++ b/src/draw/sw/blend/lv_draw_sw_blend_to_rgb888.c @@ -19,7 +19,7 @@ #if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_NEON #include "neon/lv_blend_neon.h" #elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_HELIUM - #include "helium/lv_blend_helium.h" + #include "arm2d/lv_blend_helium.h" #elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_CUSTOM #include LV_DRAW_SW_ASM_CUSTOM_INCLUDE #endif diff --git a/src/draw/sw/lv_draw_sw.c b/src/draw/sw/lv_draw_sw.c index c9d79c36f..fb1fd8d5d 100644 --- a/src/draw/sw/lv_draw_sw.c +++ b/src/draw/sw/lv_draw_sw.c @@ -24,7 +24,7 @@ #endif #if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_HELIUM - #include "helium/lv_draw_sw_helium.h" + #include "arm2d/lv_draw_sw_helium.h" #elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_CUSTOM #include LV_DRAW_SW_ASM_CUSTOM_INCLUDE #endif diff --git a/src/draw/sw/lv_draw_sw_img.c b/src/draw/sw/lv_draw_sw_img.c index 0867d2623..c5518e88c 100644 --- a/src/draw/sw/lv_draw_sw_img.c +++ b/src/draw/sw/lv_draw_sw_img.c @@ -20,7 +20,7 @@ #include "../../core/lv_global.h" #if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_HELIUM - #include "helium/lv_draw_sw_helium.h" + #include "arm2d/lv_draw_sw_helium.h" #elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_CUSTOM #include LV_DRAW_SW_ASM_CUSTOM_INCLUDE #endif diff --git a/src/lv_conf_internal.h b/src/lv_conf_internal.h index 4570f8b8a..d47acc2d6 100644 --- a/src/lv_conf_internal.h +++ b/src/lv_conf_internal.h @@ -271,6 +271,15 @@ #endif #endif + /* Use Arm-2D to accelerate the sw render */ + #ifndef LV_USE_DRAW_ARM2D_SYNC + #ifdef CONFIG_LV_USE_DRAW_ARM2D_SYNC + #define LV_USE_DRAW_ARM2D_SYNC CONFIG_LV_USE_DRAW_ARM2D_SYNC + #else + #define LV_USE_DRAW_ARM2D_SYNC 0 + #endif + #endif + /* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode * it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks. * "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers @@ -281,7 +290,7 @@ #ifdef CONFIG_LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE #define LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE CONFIG_LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE #else - #define LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/ + #define LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/ #endif #endif @@ -343,15 +352,6 @@ #endif #endif -/* Use Arm-2D on Cortex-M based devices. Please only enable it for Helium Powered devices for now */ -#ifndef LV_USE_DRAW_ARM2D - #ifdef CONFIG_LV_USE_DRAW_ARM2D - #define LV_USE_DRAW_ARM2D CONFIG_LV_USE_DRAW_ARM2D - #else - #define LV_USE_DRAW_ARM2D 0 - #endif -#endif - /* Use NXP's VG-Lite GPU on iMX RTxxx platforms. */ #ifndef LV_USE_DRAW_VGLITE #ifdef CONFIG_LV_USE_DRAW_VGLITE