From c2755517a90c6ef623884a5ab266925ea9bcad27 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 6 Jun 2018 13:07:20 -0600 Subject: [PATCH] arch/arm/src/smt32: Kconfig: Select CONFIG_FB_OVERLAY if DMA2D is enabled. Fix some compile issues in stm32_ltdc.c when CONFIG_FB_OVERLAY_BLIT is not enabled. --- arch/arm/src/stm32/Kconfig | 2 ++ arch/arm/src/stm32/stm32_ltdc.c | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/arm/src/stm32/Kconfig b/arch/arm/src/stm32/Kconfig index f6455cb40d..fdca83f7ff 100644 --- a/arch/arm/src/stm32/Kconfig +++ b/arch/arm/src/stm32/Kconfig @@ -2446,6 +2446,8 @@ config STM32_LTDC config STM32_DMA2D bool "DMA2D" default n + select FB + select FB_OVERLAY depends on STM32_STM32F429 ---help--- The STM32 DMA2D is an Chrom-Art Accelerator for image manipulation diff --git a/arch/arm/src/stm32/stm32_ltdc.c b/arch/arm/src/stm32/stm32_ltdc.c index da9e347ae2..f23d7b2547 100644 --- a/arch/arm/src/stm32/stm32_ltdc.c +++ b/arch/arm/src/stm32/stm32_ltdc.c @@ -557,11 +557,10 @@ /* Acceleration support for DMA2D overlays */ #ifdef CONFIG_FB_CMAP -# define DMA2D_ACCL FB_ACCL_BLIT | FB_ACCL_AREA +# define DMA2D_ACCL LTDC_BLIT_ACCL #else -# define DMA2D_ACCL FB_ACCL_BLIT | FB_ACCL_AREA | \ - FB_ACCL_TRANSP | FB_ACCL_COLOR | \ - FB_ACCL_BLEND +# define DMA2D_ACCL LTDC_BLIT_ACCL | FB_ACCL_TRANSP | \ + FB_ACCL_COLOR | FB_ACCL_BLEND #endif /* Helper */ @@ -680,9 +679,11 @@ static void stm32_ltdc_linit(uint8_t lid); #ifdef CONFIG_STM32_DMA2D static void stm32_ltdc_dma2dlinit(void); +#ifdef CONFIG_FB_OVERLAY_BLIT static bool stm32_ltdc_lvalidate(FAR const struct stm32_ltdc_s *layer, FAR const struct fb_area_s *area); #endif +#endif #ifdef CONFIG_FB_CMAP static void stm32_ltdc_lputclut(FAR struct stm32_ltdc_s * layer, @@ -2014,7 +2015,7 @@ static void stm32_ltdc_lclear(uint8_t overlayno) * ****************************************************************************/ -#ifdef CONFIG_STM32_DMA2D +#if defined(CONFIG_STM32_DMA2D) && defined(CONFIG_FB_OVERLAY_BLIT) static bool stm32_ltdc_lvalidate(FAR const struct stm32_ltdc_s *layer, FAR const struct fb_area_s *area) {