drivers/Kconfig: Global configuration variable CONFIG_FB_TRANSPARENCY is only defined in architecture-specific Kconfig files and then multiple times. Add the single global definition in drivers/Kconfig. arch/arm/src/stm32, stm32f7, and same5: Rename the architecture-specific variables appropriately. Selecting the architecture-specific version will also select the global version.
This commit is contained in:
parent
ba53219821
commit
7dec38b18f
@ -946,6 +946,21 @@ config SAMA5_LCDC_BACKCOLOR
|
||||
hex "Background color"
|
||||
default 0x0
|
||||
|
||||
config SAMA5_LCDC_CMAP
|
||||
bool "Color map support"
|
||||
default n
|
||||
select FB_CMAP
|
||||
---help---
|
||||
Enables color map support
|
||||
|
||||
config SAMA5_LCDC_TRANSPARENCY
|
||||
bool "Transparency color map support"
|
||||
default n
|
||||
depends on SAMA5_LCDC_CMAP
|
||||
select FB_TRANSPARENCY
|
||||
---help---
|
||||
Enables transparency color map support
|
||||
|
||||
config SAMA5_LCDC_FB_VBASE
|
||||
hex "Framebuffer memory start address (virtual)"
|
||||
---help---
|
||||
|
@ -1429,7 +1429,7 @@ static int sam_setclut(struct sam_layer_s *layer,
|
||||
(uint32_t)cmap->green[i] << LCDC_BASECLUT_GCLUT_SHIFT |
|
||||
(uint32_t)cmap->blue[i] << LCDC_BASECLUT_BCLUT_SHIFT;
|
||||
|
||||
#ifdef CONFIG_FB_TRANSPARENCY
|
||||
#ifdef CONFIG_SAMA5_LCDC_TRANSPARENCY
|
||||
if (camp->transp)
|
||||
{
|
||||
rgb |= (uint32_t)cmap->transp[i] << LCDC_OVR1CLUT_ACLUT_SHIFT;
|
||||
@ -1494,7 +1494,7 @@ static int sam_getclut(struct sam_layer_s *layer,
|
||||
cmap->blue[i] = (uint8_t)
|
||||
(regval & LCDC_BASECLUT_GCLUT_MASK) << LCDC_BASECLUT_BCLUT_SHIFT;
|
||||
|
||||
#ifdef CONFIG_FB_TRANSPARENCY
|
||||
#ifdef CONFIG_SAMA5_LCDC_TRANSPARENCY
|
||||
cmap->transp[i] = (uint8_t)
|
||||
(regval & LCDC_OVR1CLUT_ACLUT_MASK) << LCDC_OVR1CLUT_ACLUT_SHIFT;
|
||||
#endif
|
||||
|
@ -8288,16 +8288,17 @@ endchoice # Layer 2 color format
|
||||
endif # STM32_LTDC_L2
|
||||
|
||||
config STM32_FB_CMAP
|
||||
bool "Enable color map support"
|
||||
bool "Color map support"
|
||||
default y
|
||||
select FB_CMAP
|
||||
---help---
|
||||
Enabling color map support is necessary for LTDC L8 format.
|
||||
|
||||
config FB_TRANSPARENCY
|
||||
bool "Enable transparency color map support"
|
||||
depends on STM32_FB_CMAP
|
||||
config STM32_FB_TRANSPARENCY
|
||||
bool "Transparency color map support"
|
||||
default y
|
||||
depends on STM32_FB_CMAP
|
||||
select FB_TRANSPARENCY
|
||||
---help---
|
||||
Enabling transparency color map support is necessary for LTDC L8 format.
|
||||
|
||||
|
@ -251,7 +251,7 @@ static bool g_initialized;
|
||||
|
||||
#ifdef CONFIG_STM32_FB_CMAP
|
||||
static uint32_t g_clut[STM32_DMA2D_NCLUT *
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32_FB_TRANSPARENCY
|
||||
4
|
||||
# else
|
||||
3
|
||||
@ -697,7 +697,7 @@ static void stm32_dma2d_lpfc(int lid, uint32_t blendmode, uint8_t alpha,
|
||||
|
||||
/* Set the CLUT color mode */
|
||||
|
||||
# ifndef CONFIG_FB_TRANSPARENCY
|
||||
# ifndef CONFIG_STM32_FB_TRANSPARENCY
|
||||
pfccrreg |= DMA2D_xGPFCCR_CCM;
|
||||
# endif
|
||||
|
||||
@ -766,7 +766,7 @@ static int stm32_dma2d_setclut(FAR const struct fb_cmap_s *cmap)
|
||||
* blit operation becomes active
|
||||
*/
|
||||
|
||||
# ifndef CONFIG_FB_TRANSPARENCY
|
||||
# ifndef CONFIG_STM32_FB_TRANSPARENCY
|
||||
uint8_t *clut = (uint8_t *)g_dma2ddev.clut;
|
||||
uint16_t offset = 3 * n;
|
||||
|
||||
|
@ -468,7 +468,7 @@
|
||||
# error "DMA2D must also support L8 CLUT pixel format if supported by LTDC"
|
||||
# endif
|
||||
# ifdef STM32_LTDC_L1CMAP
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32_FB_TRANSPARENCY
|
||||
# define STM32_LAYER_CLUT_SIZE STM32_LTDC_NCLUT * sizeof(uint32_t)
|
||||
# else
|
||||
# define STM32_LAYER_CLUT_SIZE STM32_LTDC_NCLUT * 3 * sizeof(uint8_t)
|
||||
@ -476,7 +476,7 @@
|
||||
# endif
|
||||
# ifdef STM32_LTDC_L2CMAP
|
||||
# undef STM32_LAYER_CLUT_SIZE
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32_FB_TRANSPARENCY
|
||||
# define STM32_LAYER_CLUT_SIZE STM32_LTDC_NCLUT * sizeof(uint32_t) * 2
|
||||
# else
|
||||
# define STM32_LAYER_CLUT_SIZE STM32_LTDC_NCLUT * 3 * sizeof(uint8_t) * 2
|
||||
@ -815,7 +815,7 @@ static const uint32_t g_ltdcpins[] =
|
||||
static uint8_t g_redclut[STM32_LTDC_NCLUT];
|
||||
static uint8_t g_greenclut[STM32_LTDC_NCLUT];
|
||||
static uint8_t g_blueclut[STM32_LTDC_NCLUT];
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32_FB_TRANSPARENCY
|
||||
static uint8_t g_transpclut[STM32_LTDC_NCLUT];
|
||||
# endif
|
||||
#endif /* CONFIG_STM32_FB_CMAP */
|
||||
@ -919,7 +919,7 @@ static struct stm32_ltdcdev_s g_vtable =
|
||||
.red = g_redclut,
|
||||
.green = g_greenclut,
|
||||
.blue = g_blueclut,
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32_FB_TRANSPARENCY
|
||||
.transp = g_transpclut
|
||||
# endif
|
||||
}
|
||||
@ -2112,7 +2112,7 @@ static void stm32_ltdc_lgetclut(FAR struct stm32_ltdc_s * layer,
|
||||
for (n = cmap->first; n < cmap->len && n < STM32_LTDC_NCLUT; n++)
|
||||
{
|
||||
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32_FB_TRANSPARENCY
|
||||
cmap->transp[n] = priv_cmap->transp[n];
|
||||
# endif
|
||||
cmap->red[n] = priv_cmap->red[n];
|
||||
@ -2120,7 +2120,7 @@ static void stm32_ltdc_lgetclut(FAR struct stm32_ltdc_s * layer,
|
||||
cmap->blue[n] = priv_cmap->blue[n];
|
||||
|
||||
reginfo("color = %d, transp=%02x, red=%02x, green=%02x, blue=%02x\n", n,
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32_FB_TRANSPARENCY
|
||||
cmap->transp[n],
|
||||
# endif
|
||||
cmap->red[n],
|
||||
@ -2494,7 +2494,7 @@ static int stm32_putcmap(struct fb_vtable_s *vtable,
|
||||
priv_cmap->red[n] = cmap->red[n];
|
||||
priv_cmap->green[n] = cmap->green[n];
|
||||
priv_cmap->blue[n] = cmap->blue[n];
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32_FB_TRANSPARENCY
|
||||
/* Not supported by LTDC */
|
||||
|
||||
priv_cmap->transp[n] = cmap->transp[n];
|
||||
@ -3029,7 +3029,7 @@ int stm32_ltdcinitialize(void)
|
||||
memset(&g_redclut, 0, STM32_LTDC_NCLUT);
|
||||
memset(&g_blueclut, 0, STM32_LTDC_NCLUT);
|
||||
memset(&g_greenclut, 0, STM32_LTDC_NCLUT);
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32_FB_TRANSPARENCY
|
||||
memset(&g_transpclut, 0, STM32_LTDC_NCLUT);
|
||||
# endif
|
||||
#endif /* CONFIG_STM32_FB_CMAP */
|
||||
|
@ -5060,19 +5060,19 @@ endchoice # Layer 2 color format
|
||||
endif # STM32F7_LTDC_L2
|
||||
|
||||
config STM32F7_FB_CMAP
|
||||
bool "Enable color map support"
|
||||
bool "Color map support"
|
||||
default y
|
||||
select FB_CMAP
|
||||
---help---
|
||||
Enabling color map support is neccessary for ltdc L8 format.
|
||||
EnablingEnablescolor map support is necessary for ltdc L8 format.
|
||||
|
||||
config FB_TRANSPARENCY
|
||||
bool "Enable transparency color map support"
|
||||
config STM32F7_FB_TRANSPARENCY
|
||||
bool "Transparency color map support"
|
||||
default y
|
||||
depends on STM32F7_FB_CMAP
|
||||
select FB_TRANSPARENCY
|
||||
---help---
|
||||
Enabling transparency color map support is neccessary for
|
||||
ltdc L8 format.
|
||||
Enables transparency color map support is necessary for ltdc L8 format.
|
||||
|
||||
config STM32F7_LTDC_REGDEBUG
|
||||
bool "Enable LTDC register value debug messages"
|
||||
|
@ -252,7 +252,7 @@ static bool g_initialized;
|
||||
|
||||
#ifdef CONFIG_STM32F7_FB_CMAP
|
||||
static uint32_t g_clut[STM32_DMA2D_NCLUT *
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32F7_FB_TRANSPARENCY
|
||||
4
|
||||
# else
|
||||
3
|
||||
@ -698,7 +698,7 @@ static void stm32_dma2d_lpfc(int lid, uint32_t blendmode, uint8_t alpha,
|
||||
|
||||
/* Set the CLUT color mode */
|
||||
|
||||
# ifndef CONFIG_FB_TRANSPARENCY
|
||||
# ifndef CONFIG_STM32F7_FB_TRANSPARENCY
|
||||
pfccrreg |= DMA2D_xGPFCCR_CCM;
|
||||
# endif
|
||||
|
||||
@ -767,7 +767,7 @@ static int stm32_dma2d_setclut(FAR const struct fb_cmap_s *cmap)
|
||||
* blit operation becomes active
|
||||
*/
|
||||
|
||||
# ifndef CONFIG_FB_TRANSPARENCY
|
||||
# ifndef CONFIG_STM32F7_FB_TRANSPARENCY
|
||||
uint8_t *clut = (uint8_t *)g_dma2ddev.clut;
|
||||
uint16_t offset = 3 * n;
|
||||
|
||||
|
@ -470,7 +470,7 @@
|
||||
# error "DMA2D must also support L8 CLUT pixel format if supported by LTDC"
|
||||
# endif
|
||||
# ifdef STM32_LTDC_L1CMAP
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32F7_FB_TRANSPARENCY
|
||||
# define STM32_LAYER_CLUT_SIZE STM32_LTDC_NCLUT * sizeof(uint32_t)
|
||||
# else
|
||||
# define STM32_LAYER_CLUT_SIZE STM32_LTDC_NCLUT * 3 * sizeof(uint8_t)
|
||||
@ -478,7 +478,7 @@
|
||||
# endif
|
||||
# ifdef STM32_LTDC_L2CMAP
|
||||
# undef STM32_LAYER_CLUT_SIZE
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32F7_FB_TRANSPARENCY
|
||||
# define STM32_LAYER_CLUT_SIZE STM32_LTDC_NCLUT * sizeof(uint32_t) * 2
|
||||
# else
|
||||
# define STM32_LAYER_CLUT_SIZE STM32_LTDC_NCLUT * 3 * sizeof(uint8_t) * 2
|
||||
@ -817,7 +817,7 @@ static const uint32_t g_ltdcpins[] =
|
||||
static uint8_t g_redclut[STM32_LTDC_NCLUT];
|
||||
static uint8_t g_greenclut[STM32_LTDC_NCLUT];
|
||||
static uint8_t g_blueclut[STM32_LTDC_NCLUT];
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32F7_FB_TRANSPARENCY
|
||||
static uint8_t g_transpclut[STM32_LTDC_NCLUT];
|
||||
# endif
|
||||
#endif /* CONFIG_STM32F7_FB_CMAP */
|
||||
@ -921,7 +921,7 @@ static struct stm32_ltdcdev_s g_vtable =
|
||||
.red = g_redclut,
|
||||
.green = g_greenclut,
|
||||
.blue = g_blueclut,
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32F7_FB_TRANSPARENCY
|
||||
.transp = g_transpclut
|
||||
# endif
|
||||
}
|
||||
@ -2114,7 +2114,7 @@ static void stm32_ltdc_lgetclut(FAR struct stm32_ltdc_s * layer,
|
||||
for (n = cmap->first; n < cmap->len && n < STM32_LTDC_NCLUT; n++)
|
||||
{
|
||||
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32F7_FB_TRANSPARENCY
|
||||
cmap->transp[n] = priv_cmap->transp[n];
|
||||
# endif
|
||||
cmap->red[n] = priv_cmap->red[n];
|
||||
@ -2122,7 +2122,7 @@ static void stm32_ltdc_lgetclut(FAR struct stm32_ltdc_s * layer,
|
||||
cmap->blue[n] = priv_cmap->blue[n];
|
||||
|
||||
reginfo("color = %d, transp=%02x, red=%02x, green=%02x, blue=%02x\n", n,
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32F7_FB_TRANSPARENCY
|
||||
cmap->transp[n],
|
||||
# endif
|
||||
cmap->red[n],
|
||||
@ -2496,7 +2496,7 @@ static int stm32_putcmap(struct fb_vtable_s *vtable,
|
||||
priv_cmap->red[n] = cmap->red[n];
|
||||
priv_cmap->green[n] = cmap->green[n];
|
||||
priv_cmap->blue[n] = cmap->blue[n];
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32F7_FB_TRANSPARENCY
|
||||
/* Not supported by LTDC */
|
||||
|
||||
priv_cmap->transp[n] = cmap->transp[n];
|
||||
@ -3031,7 +3031,7 @@ int stm32_ltdcinitialize(void)
|
||||
memset(&g_redclut, 0, STM32_LTDC_NCLUT);
|
||||
memset(&g_blueclut, 0, STM32_LTDC_NCLUT);
|
||||
memset(&g_greenclut, 0, STM32_LTDC_NCLUT);
|
||||
# ifdef CONFIG_FB_TRANSPARENCY
|
||||
# ifdef CONFIG_STM32F7_FB_TRANSPARENCY
|
||||
memset(&g_transpclut, 0, STM32_LTDC_NCLUT);
|
||||
# endif
|
||||
#endif /* CONFIG_STM32F7_FB_CMAP */
|
||||
|
@ -277,6 +277,13 @@ config FB_CMAP
|
||||
Set by driver-specific configuration to indicate support for color
|
||||
mapping. Not directly user selectable.
|
||||
|
||||
config FB_TRANSPARENCY
|
||||
bool
|
||||
default n
|
||||
---help---
|
||||
Set by driver-specific configuration to indicate support for color
|
||||
transparency. Not directly user selectable.
|
||||
|
||||
menuconfig DRIVERS_VIDEO
|
||||
bool "Video Device Support"
|
||||
default n
|
||||
|
Loading…
x
Reference in New Issue
Block a user