diff --git a/docs/details/integration/chip/stm32.rst b/docs/details/integration/chip/stm32.rst index d63e2b8e3..7c669e4de 100644 --- a/docs/details/integration/chip/stm32.rst +++ b/docs/details/integration/chip/stm32.rst @@ -292,4 +292,8 @@ If ``LV_USE_DRAW_DMA2D_INTERRUPT`` is enabled then you are required to call :cpp:expr:`lv_draw_dma2d_transfer_complete_interrupt_handler` whenever the DMA2D "transfer complete" global interrupt is received. +DMA2D also makes possible to mix layers that have color format on +:c:macro:`LV_COLOR_FORMAT_ARGB1555` on top of :c:macro:`LV_COLOR_FORMAT_RGB565` +layers. + If your STM device has a NeoChrom GPU, you can use the :ref:`Nema GFX renderer ` instead. diff --git a/docs/details/integration/driver/display/st_ltdc.rst b/docs/details/integration/driver/display/st_ltdc.rst index cd52e8f14..ee7774286 100644 --- a/docs/details/integration/driver/display/st_ltdc.rst +++ b/docs/details/integration/driver/display/st_ltdc.rst @@ -103,6 +103,10 @@ partial buffers in parallel with other LVGL tasks, whether or not OS is enabled. If the display is not partial, then there is no need to enable this option. +Additionally it is possible to mix layers that have color format on +:c:macro:`LV_COLOR_FORMAT_ARGB1555` on top of :c:macro:`LV_COLOR_FORMAT_RGB565` +layers using the DMA2D. + It must not be enabled at the same time as :c:macro:`LV_USE_DRAW_DMA2D`. See the :ref:`DMA2D support `. diff --git a/src/draw/dma2d/lv_draw_dma2d.c b/src/draw/dma2d/lv_draw_dma2d.c index c44f2e7dc..1fdbf8f7a 100644 --- a/src/draw/dma2d/lv_draw_dma2d.c +++ b/src/draw/dma2d/lv_draw_dma2d.c @@ -131,6 +131,8 @@ lv_draw_dma2d_output_cf_t lv_draw_dma2d_cf_to_dma2d_output_cf(lv_color_format_t return LV_DRAW_DMA2D_OUTPUT_CF_RGB888; case LV_COLOR_FORMAT_RGB565: return LV_DRAW_DMA2D_OUTPUT_CF_RGB565; + case LV_COLOR_FORMAT_ARGB1555: + return LV_DRAW_DMA2D_OUTPUT_CF_ARGB1555; default: LV_ASSERT_MSG(false, "unsupported output color format"); } @@ -310,7 +312,8 @@ static int32_t evaluate_cb(lv_draw_unit_t * draw_unit, lv_draw_task_t * task) && (dsc->header.cf == LV_COLOR_FORMAT_ARGB8888 || dsc->header.cf == LV_COLOR_FORMAT_XRGB8888 || dsc->header.cf == LV_COLOR_FORMAT_RGB888 - || dsc->header.cf == LV_COLOR_FORMAT_RGB565) + || dsc->header.cf == LV_COLOR_FORMAT_RGB565 + || dsc->header.cf == LV_COLOR_FORMAT_ARGB1555) && (dsc->base.layer->color_format == LV_COLOR_FORMAT_ARGB8888 || dsc->base.layer->color_format == LV_COLOR_FORMAT_XRGB8888 || dsc->base.layer->color_format == LV_COLOR_FORMAT_RGB888