]> git.sur5r.net Git - u-boot/commitdiff
video: cfb_console: add weak default video_set_lut()
authorAnatolij Gustschin <agust@denx.de>
Sat, 1 May 2010 20:21:09 +0000 (22:21 +0200)
committerAnatolij Gustschin <agust@denx.de>
Mon, 14 Jun 2010 10:28:28 +0000 (12:28 +0200)
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>
arch/powerpc/cpu/mpc512x/diu.c
board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
drivers/video/cfb_console.c
drivers/video/sm501.c

index f8d19a0a1f802769dac9e60289417a8161d217cb..1cce6a233cc10d06350d4735fb8166a2f65aae31 100644 (file)
@@ -179,18 +179,4 @@ void *video_hw_init(void)
        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) */
index 94fb1ebf8f8604c4f1d7fc5fd3ae7183451d3d98..a7b7f45458436dad78ef8dc6f6c9b43ba533ca46 100644 (file)
@@ -183,15 +183,6 @@ void *video_hw_init(void)
        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 /* CONFIG_FSL_DIU_FB */
index d1f47c9157130a20678199d72e30a4c1c57c3004..96d52fbaea1c1bd299e8b4bc8a813d15669e6796 100644 (file)
@@ -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)
 
 #define FILL_8BIT_332RGB(r,g,b)        {                       \
index 283d2d969c9a9149a5c4f6836005d9999ccfbf4d..8c963162db8d93545ab16eded13efe4270d4a32b 100644 (file)
@@ -131,16 +131,3 @@ void *video_hw_init (void)
 
        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 */
-       )
-{
-}