mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
video: cfb_console: add weak default video_set_lut()
Do not enforce drivers to provide empty video_set_lut() if they do not implement indexed color (8 bpp) frame buffer support. Add default function to the cfb_console driver and remove empty video_set_lut() functions. Signed-off-by: Anatolij Gustschin <agust@denx.de>
This commit is contained in:
@ -179,18 +179,4 @@ void *video_hw_init(void)
|
|||||||
return (void *)pGD;
|
return (void *)pGD;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the LUT
|
|
||||||
*
|
|
||||||
* @index: color number
|
|
||||||
* @r: red
|
|
||||||
* @b: blue
|
|
||||||
* @g: green
|
|
||||||
*/
|
|
||||||
void video_set_lut
|
|
||||||
(unsigned int index, unsigned char r, unsigned char g, unsigned char b)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE) */
|
#endif /* defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE) */
|
||||||
|
@ -183,15 +183,6 @@ void *video_hw_init(void)
|
|||||||
return (void *)pGD;
|
return (void *)pGD;
|
||||||
}
|
}
|
||||||
|
|
||||||
void video_set_lut (unsigned int index, /* color number */
|
|
||||||
unsigned char r, /* red */
|
|
||||||
unsigned char g, /* green */
|
|
||||||
unsigned char b /* blue */
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE) */
|
#endif /* defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE) */
|
||||||
|
|
||||||
#endif /* CONFIG_FSL_DIU_FB */
|
#endif /* CONFIG_FSL_DIU_FB */
|
||||||
|
@ -749,6 +749,18 @@ void video_puts (const char *s)
|
|||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Do not enforce drivers (or board code) to provide empty
|
||||||
|
* video_set_lut() if they do not support 8 bpp format.
|
||||||
|
* Implement weak default function instead.
|
||||||
|
*/
|
||||||
|
void __video_set_lut (unsigned int index, unsigned char r,
|
||||||
|
unsigned char g, unsigned char b)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void video_set_lut (unsigned int, unsigned char, unsigned char, unsigned char)
|
||||||
|
__attribute__((weak, alias("__video_set_lut")));
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN)
|
#if defined(CONFIG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN)
|
||||||
|
|
||||||
#define FILL_8BIT_332RGB(r,g,b) { \
|
#define FILL_8BIT_332RGB(r,g,b) { \
|
||||||
|
@ -131,16 +131,3 @@ void *video_hw_init (void)
|
|||||||
|
|
||||||
return (&sm501);
|
return (&sm501);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
|
||||||
* video_set_lut --
|
|
||||||
*-----------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
void video_set_lut (
|
|
||||||
unsigned int index, /* color number */
|
|
||||||
unsigned char r, /* red */
|
|
||||||
unsigned char g, /* green */
|
|
||||||
unsigned char b /* blue */
|
|
||||||
)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user