Skip to content

Commit 3a0bace

Browse files
iabdalkaderkartben
authored andcommitted
drivers: display: stm32_ltdc: Add SMH attribute for LTDC buffer.
The LTDC driver was using the video buffer SMH attribute. Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
1 parent 5603c09 commit 3a0bace

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

drivers/display/Kconfig.stm32_ltdc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,17 @@ config STM32_LTDC_FB_NUM
5656
config STM32_LTDC_FB_USE_SHARED_MULTI_HEAP
5757
bool "Use shared multi heap for the display buffer"
5858

59+
config STM32_LTDC_FB_SMH_ATTRIBUTE
60+
int "Shared multi heap attribute for the display buffer"
61+
depends on STM32_LTDC_FB_USE_SHARED_MULTI_HEAP
62+
default 0
63+
range 0 2
64+
help
65+
Shared multi heap attribute for the display buffer:
66+
0: SMH_REG_ATTR_CACHEABLE
67+
1: SMH_REG_ATTR_NON_CACHEABLE
68+
2: SMH_REG_ATTR_EXTERNAL
69+
5970
config STM32_LTDC_DISABLE_FMC_BANK1
6071
bool "Disable FMC bank1 for STM32F7/H7 series"
6172
depends on SOC_SERIES_STM32H7X || SOC_SERIES_STM32F7X

drivers/display/display_stm32_ltdc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ static int stm32_ltdc_init(const struct device *dev)
419419

420420
#if defined(CONFIG_STM32_LTDC_FB_USE_SHARED_MULTI_HEAP)
421421
data->frame_buffer = shared_multi_heap_aligned_alloc(
422-
CONFIG_VIDEO_BUFFER_SMH_ATTRIBUTE,
422+
CONFIG_STM32_LTDC_FB_SMH_ATTRIBUTE,
423423
32,
424424
CONFIG_STM32_LTDC_FB_NUM * data->frame_buffer_len);
425425

0 commit comments

Comments
 (0)