From 07291fb6aa1a31abc416ced952fb30ddaa2a7292 Mon Sep 17 00:00:00 2001 From: The Nguyen Date: Tue, 19 Nov 2024 16:37:16 +0700 Subject: [PATCH] tests: display: add support test GLCDC on ek_ra8d1 This commit to add support to build tests/drivers/display on ek_ra8d1 Signed-off-by: The Nguyen --- .../display/display_read_write/Kconfig | 26 +++++++++++++++++++ .../display_read_write/boards/ek_ra8d1.conf | 6 +++++ .../display/display_read_write/src/main.c | 6 ++++- .../display/display_read_write/testcase.yaml | 7 +++++ 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 tests/drivers/display/display_read_write/Kconfig create mode 100644 tests/drivers/display/display_read_write/boards/ek_ra8d1.conf diff --git a/tests/drivers/display/display_read_write/Kconfig b/tests/drivers/display/display_read_write/Kconfig new file mode 100644 index 00000000000..bb059bee9f8 --- /dev/null +++ b/tests/drivers/display/display_read_write/Kconfig @@ -0,0 +1,26 @@ +# Copyright (c) 2024 Renesas Electronics Corporation +# SPDX-License-Identifier: Apache-2.0 + +mainmenu "Display Read Write Test" + +source "Kconfig.zephyr" + +config DISPLAY_BUFFER_USE_GENERIC_SECTION + bool "Place the display buffer in a specific memory section" + help + Place the display buffer in a specific memory section. + +config DISPLAY_BUFFER_ALIGNMENT + int "Display buffer memory alignment" + default 32 + help + Specific display buffer alignment. + +if DISPLAY_BUFFER_USE_GENERIC_SECTION + +config DISPLAY_BUFFER_SECTION + string "Memory section to place Display Buffer" + help + Specific memory section to place the display buffer. + +endif # DISPLAY_BUFFER_USE_GENERIC_SECTION diff --git a/tests/drivers/display/display_read_write/boards/ek_ra8d1.conf b/tests/drivers/display/display_read_write/boards/ek_ra8d1.conf new file mode 100644 index 00000000000..d256d533069 --- /dev/null +++ b/tests/drivers/display/display_read_write/boards/ek_ra8d1.conf @@ -0,0 +1,6 @@ +# Copyright (c) 2024 Renesas Electronics Corporation +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_DISPLAY_BUFFER_USE_GENERIC_SECTION=y +CONFIG_DISPLAY_BUFFER_SECTION=".sdram" +CONFIG_DISPLAY_BUFFER_ALIGNMENT=64 diff --git a/tests/drivers/display/display_read_write/src/main.c b/tests/drivers/display/display_read_write/src/main.c index 2ae246e4fb9..e44b49a4beb 100644 --- a/tests/drivers/display/display_read_write/src/main.c +++ b/tests/drivers/display/display_read_write/src/main.c @@ -14,8 +14,12 @@ LOG_MODULE_DECLARE(display_api, CONFIG_DISPLAY_LOG_LEVEL); 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); +#ifdef CONFIG_DISPLAY_BUFFER_USE_GENERIC_SECTION +Z_GENERIC_SECTION(CONFIG_DISPLAY_BUFFER_SECTION) +#endif 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] + __aligned(CONFIG_DISPLAY_BUFFER_ALIGNMENT); static struct display_capabilities cfg; static uint8_t bpp; static bool is_tiled; diff --git a/tests/drivers/display/display_read_write/testcase.yaml b/tests/drivers/display/display_read_write/testcase.yaml index 499fc58a1f9..4383c7d44ef 100644 --- a/tests/drivers/display/display_read_write/testcase.yaml +++ b/tests/drivers/display/display_read_write/testcase.yaml @@ -69,3 +69,10 @@ tests: # presence of the arduino_spi DT nodelabel platform_allow: - mimxrt685_evk/mimxrt685s/cm33 + drivers.display.read_write.rtkmipilcdb00000be: + tags: + - shield + extra_args: + - SHIELD=rtkmipilcdb00000be + platform_allow: + - ek_ra8d1