Skip to content

drivers: display: stm32_ltdc: Add SMH attribute for LTDC buffer. #89246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ CONFIG_STM32_LTDC_RGB565=y
CONFIG_DISPLAY_INIT_PRIORITY=87
CONFIG_STM32_LTDC_DISABLE_FMC_BANK1=y
CONFIG_INPUT_GT911_INTERRUPT=y
CONFIG_STM32_LTDC_FB_USE_SHARED_MULTI_HEAP=y
2 changes: 1 addition & 1 deletion boards/shields/arduino_giga_display_shield/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ for projects utilizing this shield. For example:

.. zephyr-app-commands::
:zephyr-app: samples/subsys/display/lvgl
:board: arduino_giga_r1_wifi
:board: arduino_giga_r1/stm32h747xx/m7
:shield: arduino_giga_display_shield
:goals: build

Expand Down
11 changes: 11 additions & 0 deletions drivers/display/Kconfig.stm32_ltdc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ config STM32_LTDC_FB_NUM
config STM32_LTDC_FB_USE_SHARED_MULTI_HEAP
bool "Use shared multi heap for the display buffer"

config STM32_LTDC_FB_SMH_ATTRIBUTE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not create a generic symbol in drivers/display/Kconfig instead?

Copy link
Contributor Author

@iabdalkader iabdalkader Apr 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because no other display drivers use SMH as far as I know.

int "Shared multi heap attribute for the display buffer"
depends on STM32_LTDC_FB_USE_SHARED_MULTI_HEAP
default 0
range 0 2
help
Shared multi heap attribute for the display buffer:
0: SMH_REG_ATTR_CACHEABLE
1: SMH_REG_ATTR_NON_CACHEABLE
2: SMH_REG_ATTR_EXTERNAL

config STM32_LTDC_DISABLE_FMC_BANK1
bool "Disable FMC bank1 for STM32F7/H7 series"
depends on SOC_SERIES_STM32H7X || SOC_SERIES_STM32F7X
Expand Down
2 changes: 1 addition & 1 deletion drivers/display/display_stm32_ltdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ static int stm32_ltdc_init(const struct device *dev)

#if defined(CONFIG_STM32_LTDC_FB_USE_SHARED_MULTI_HEAP)
data->frame_buffer = shared_multi_heap_aligned_alloc(
CONFIG_VIDEO_BUFFER_SMH_ATTRIBUTE,
CONFIG_STM32_LTDC_FB_SMH_ATTRIBUTE,
32,
CONFIG_STM32_LTDC_FB_NUM * data->frame_buffer_len);

Expand Down