Skip to content

Commit

Permalink
fix(display): Tweaks to memory Kconfig settings.
Browse files Browse the repository at this point in the history
* Don't default heap mempool by default now that there's a dedicated
  LVGL mempool
* Set proper defaults for CiZ display hardware/custom screen.
* Double the dedicated display thread stack size for CiZ.
  • Loading branch information
petejohanson committed Feb 6, 2024
1 parent a0ca3dc commit 9a0c1c4
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
3 changes: 0 additions & 3 deletions app/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,6 @@ endmenu
#ZMK
endmenu

config HEAP_MEM_POOL_SIZE
default 8192 if ZMK_DISPLAY

config KERNEL_BIN_NAME
default "zmk"

Expand Down
7 changes: 7 additions & 0 deletions app/boards/arm/corneish_zen/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ config IL0323
config ZMK_DISPLAY_BLANK_ON_IDLE
default n

# Needed for the IL0323 driver which allocs memory to clear the display
config HEAP_MEM_POOL_SIZE
default 1024

config LV_Z_MEM_POOL_SIZE
default 4096

endif # ZMK_DISPLAY

menuconfig CUSTOM_WIDGET_BATTERY_STATUS
Expand Down
2 changes: 1 addition & 1 deletion app/boards/arm/corneish_zen/corneish_zen_v1_left_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ CONFIG_ZMK_BLE=y

# enable display drivers
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=4096
CONFIG_LV_Z_BITS_PER_PIXEL=1
CONFIG_LV_COLOR_DEPTH_1=y
CONFIG_LV_DPI_DEF=145
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ CONFIG_ZMK_BLE=y

# enable display drivers
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=4096
CONFIG_LV_Z_BITS_PER_PIXEL=1
CONFIG_LV_COLOR_DEPTH_1=y
CONFIG_LV_DPI_DEF=145
Expand Down
2 changes: 1 addition & 1 deletion app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CONFIG_ZMK_BLE=y

# enable display drivers
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=4096
CONFIG_LV_Z_BITS_PER_PIXEL=1
CONFIG_LV_COLOR_DEPTH_1=y
CONFIG_LV_DPI_DEF=145
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CONFIG_ZMK_BLE=y

# enable display drivers
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=4096
CONFIG_LV_Z_BITS_PER_PIXEL=1
CONFIG_LV_COLOR_DEPTH_1=y
CONFIG_LV_DPI_DEF=145
Expand Down
1 change: 1 addition & 0 deletions app/module/drivers/display/il0323.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ static int il0323_clear_and_write_buffer(const struct device *dev, uint8_t patte

line = k_malloc(IL0323_NUMOF_PAGES);
if (line == NULL) {
LOG_ERR("Failed to allocate memory for the clear");
return -ENOMEM;
}

Expand Down

0 comments on commit 9a0c1c4

Please sign in to comment.