Skip to content
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
8 changes: 8 additions & 0 deletions doc/releases/migration-guide-4.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ Counter
And :kconfig:option:`CONFIG_COUNTER_NATIVE_POSIX` and its related options with
:kconfig:option:`CONFIG_COUNTER_NATIVE_SIM` (:github:`86616`).

Display
=======

* On STM32 devices, the LTDC driver (:dtcompatible:`st,stm32-ltdc`) RGB565 format
``PIXEL_FORMAT_RGB565`` has been replaced by ``PIXEL_FORMAT_BGR565`` to match
the format expected by Zephyr. This change ensures proper behavior of both
display and video capture samples.

Entropy
=======

Expand Down
8 changes: 4 additions & 4 deletions drivers/display/display_stm32_ltdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ LOG_MODULE_REGISTER(display_stm32_ltdc, CONFIG_DISPLAY_LOG_LEVEL);
#elif CONFIG_STM32_LTDC_RGB565
#define STM32_LTDC_INIT_PIXEL_SIZE 2u
#define STM32_LTDC_INIT_PIXEL_FORMAT LTDC_PIXEL_FORMAT_RGB565
#define DISPLAY_INIT_PIXEL_FORMAT PIXEL_FORMAT_RGB_565
#define DISPLAY_INIT_PIXEL_FORMAT PIXEL_FORMAT_BGR_565
#else
#error "Invalid LTDC pixel format chosen"
#endif
Expand Down Expand Up @@ -110,9 +110,9 @@ static int stm32_ltdc_set_pixel_format(const struct device *dev,
struct display_stm32_ltdc_data *data = dev->data;

switch (format) {
case PIXEL_FORMAT_RGB_565:
case PIXEL_FORMAT_BGR_565:
err = HAL_LTDC_SetPixelFormat(&data->hltdc, LTDC_PIXEL_FORMAT_RGB565, 0);
data->current_pixel_format = PIXEL_FORMAT_RGB_565;
data->current_pixel_format = PIXEL_FORMAT_BGR_565;
data->current_pixel_size = 2u;
break;
case PIXEL_FORMAT_RGB_888:
Expand Down Expand Up @@ -158,7 +158,7 @@ static void stm32_ltdc_get_capabilities(const struct device *dev,
data->hltdc.LayerCfg[0].WindowY0;
capabilities->supported_pixel_formats = PIXEL_FORMAT_ARGB_8888 |
PIXEL_FORMAT_RGB_888 |
PIXEL_FORMAT_RGB_565;
PIXEL_FORMAT_BGR_565;
capabilities->screen_info = 0;

capabilities->current_pixel_format = data->current_pixel_format;
Expand Down