1# Copyright (c) 2018-2019 Jan Van Winkel <jan.van_winkel@dxplore.eu> 2# Copyright (c) 2020 Teslabs Engineering S.L. 3# SPDX-License-Identifier: Apache-2.0 4 5menu "Memory manager settings" 6 7config LV_Z_BITS_PER_PIXEL 8 int "Bits per pixel" 9 default 32 10 default 32 if LV_COLOR_DEPTH_32 11 default 24 if LV_COLOR_DEPTH_24 12 default 16 if LV_COLOR_DEPTH_16 13 default 8 if LV_COLOR_DEPTH_8 14 default 1 if LV_COLOR_DEPTH_1 15 range 1 32 16 help 17 Number of bits per pixel. 18 19choice LV_Z_MEMORY_POOL 20 prompt "Memory pool" 21 default LV_Z_MEM_POOL_SYS_HEAP 22 help 23 Memory pool to use for lvgl allocated objects 24 25 config LV_Z_MEM_POOL_HEAP_LIB_C 26 bool "C library Heap" 27 depends on !MINIMAL_LIBC || (COMMON_LIBC_MALLOC_ARENA_SIZE != 0) 28 help 29 Use C library malloc and free to allocate objects on the C library heap 30 31 config LV_Z_MEM_POOL_SYS_HEAP 32 bool "User space lvgl pool" 33 select SYS_HEAP_INFO 34 help 35 Use a dedicated memory pool from a private sys heap. 36 37endchoice 38 39config LV_Z_MEM_POOL_SIZE 40 int "Memory pool size" 41 default 2048 42 depends on LV_Z_MEM_POOL_SYS_HEAP 43 help 44 Size of the memory pool in bytes 45 46config LV_Z_MEMORY_POOL_CUSTOM_SECTION 47 bool "Link memory pool to custom section" 48 depends on LV_Z_MEM_POOL_SYS_HEAP 49 help 50 Place LVGL memory pool in custom section, with tag ".lvgl_heap". 51 This can be used by custom linker scripts to relocate the LVGL 52 memory pool to a custom location, such as tightly coupled or 53 external memory. 54 55config LV_Z_MEMORY_POOL_ZEPHYR_REGION 56 bool "Place LVGL memory pool in a Zephyr memory-region" 57 depends on LV_Z_MEM_POOL_SYS_HEAP 58 depends on !LV_Z_MEMORY_POOL_CUSTOM_SECTION 59 help 60 Place LVGL memory pool in a section, automatically 61 created from a 'zephyr,memory-region' compatible node, 62 whose name is specified in LV_Z_MEMORY_POOL_ZEPHYR_REGION_NAME. 63 64config LV_Z_MEMORY_POOL_ZEPHYR_REGION_NAME 65 string "Name of the zephyr memory-region for memory pool" 66 depends on LV_Z_MEMORY_POOL_ZEPHYR_REGION 67 help 68 Name of the Zephyr memory-region where LVGL memory pool is placed. 69 70config LV_Z_VDB_SIZE 71 int "Rendering buffer size" 72 default 100 if LV_Z_FULL_REFRESH 73 default 10 74 range 1 100 75 help 76 Size of the buffer used for rendering screen content as a percentage 77 of total display size. 78 79config LV_Z_DOUBLE_VDB 80 bool "Use two rendering buffers" 81 help 82 Use two buffers to render and flush data in parallel 83 84config LV_Z_FULL_REFRESH 85 bool "Force full refresh mode" 86 help 87 Force full refresh of display on update. When combined with 88 LV_Z_VDB_SIZE, this setting can improve performance for display 89 controllers that require a framebuffer to be present in system memory, 90 since the controller can render the LVGL framebuffer directly 91 92config LV_Z_VDB_ALIGN 93 int "Rending buffer alignment" 94 default 4 95 depends on LV_Z_BUFFER_ALLOC_STATIC 96 help 97 Rendering buffer alignment. Depending on chosen color depth, 98 buffer may be accessed as a uint8_t *, uint16_t *, or uint32_t *, 99 so buffer must be aligned to prevent unaligned memory access 100 101config LV_Z_VDB_CUSTOM_SECTION 102 bool "Link rendering buffers to custom section" 103 depends on LV_Z_BUFFER_ALLOC_STATIC 104 help 105 Place LVGL rendering buffers in custom section, with tag ".lvgl_buf". 106 This can be used by custom linker scripts to relocate the LVGL 107 rendering buffers to a custom location, such as tightly coupled or 108 external memory. 109 110config LV_Z_VDB_ZEPHYR_REGION 111 bool "Place LVGL rendering buffers in a Zephyr memory-region" 112 depends on LV_Z_BUFFER_ALLOC_STATIC 113 depends on !LV_Z_VDB_CUSTOM_SECTION 114 help 115 Place LVGL rendering buffers in a section, automatically 116 created from a 'zephyr,memory-region' compatible node, 117 whose name is specified in LV_Z_VDB_ZEPHYR_REGION_NAME. 118 119config LV_Z_VDB_ZEPHYR_REGION_NAME 120 string "Name of the Zephyr memory-region for rendering buffers" 121 depends on LV_Z_VDB_ZEPHYR_REGION 122 help 123 Name of the Zephyr memory-region where LVGL rendering buffers are placed. 124 125config LV_Z_MONOCHROME_CONVERSION_BUFFER 126 bool "Use intermediate conversion buffer for monochrome displays" 127 default y 128 help 129 When using a monochrome display an intermediate buffer with LV_Z_VDB_SIZE 130 is needed to perform the conversion. 131 132choice LV_Z_RENDERING_BUFFER_ALLOCATION 133 prompt "Rendering Buffer Allocation" 134 default LV_Z_BUFFER_ALLOC_STATIC 135 help 136 Type of allocation that should be used for allocating rendering buffers 137 138config LV_Z_BUFFER_ALLOC_STATIC 139 bool "Static" 140 help 141 Rendering buffers are statically allocated based on the following 142 configuration parameters: 143 * Horizontal screen resolution 144 * Vertical screen resolution 145 * Rendering buffer size 146 * Bytes per pixel 147 148config LV_Z_BUFFER_ALLOC_DYNAMIC 149 bool "Dynamic" 150 help 151 Rendering buffers are dynamically allocated based on the actual 152 display parameters 153 154endchoice 155 156endmenu 157