diff --git a/tests/drivers/display/display_read_write/Kconfig b/tests/drivers/display/display_read_write/Kconfig new file mode 100644 index 000000000000000..8a19da841e521be --- /dev/null +++ b/tests/drivers/display/display_read_write/Kconfig @@ -0,0 +1,10 @@ +# Copyright (c) 2023 Renesas Electronics Corporation +# SPDX-License-Identifier: Apache-2.0 + +mainmenu "Display Read/Write Test" + +source "Kconfig.zephyr" + +config DISPLAY_READ_WRITE_BUF_SRAM_EXT + bool "Buffer allocation is done from sram-ext alias" + default n diff --git a/tests/drivers/display/display_read_write/src/main.c b/tests/drivers/display/display_read_write/src/main.c index 2ae246e4fb9a696..27d2932540b0587 100644 --- a/tests/drivers/display/display_read_write/src/main.c +++ b/tests/drivers/display/display_read_write/src/main.c @@ -8,14 +8,22 @@ #include #include #include +#include LOG_MODULE_DECLARE(display_api, CONFIG_DISPLAY_LOG_LEVEL); +#if CONFIG_DISPLAY_READ_WRITE_BUF_SRAM_EXT +#define DISP_BUFFER_LINKER_SECTION \ + Z_GENERIC_SECTION(LINKER_DT_NODE_REGION_NAME(DT_ALIAS(sram_ext))) +#else +#define DISP_BUFFER_LINKER_SECTION +#endif + static const struct device *dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_display)); static const uint32_t display_width = DT_PROP(DT_CHOSEN(zephyr_display), width); static const uint32_t display_height = DT_PROP(DT_CHOSEN(zephyr_display), height); static uint8_t disp_buffer[DT_PROP(DT_CHOSEN(zephyr_display), width) * - DT_PROP(DT_CHOSEN(zephyr_display), height) * 4]; + DT_PROP(DT_CHOSEN(zephyr_display), height) * 4] DISP_BUFFER_LINKER_SECTION; static struct display_capabilities cfg; static uint8_t bpp; static bool is_tiled;