The new IPEK01 board uses the X888RGB mode for the Lime graphics
controller. For this mode video accelaration does not work. This patch
makes the accelaration configurable via CONFIG_VIDEO_MB862xx_ACCEL,
which is enabled for the lwmon5 and the socrates board for backward
compatibility.

Signed-off-by: Anatolij Gustschin <ag...@denx.de>
Signed-off-by: Wolfgang Grandegger <w...@grandegger.com>
---
 drivers/video/cfb_console.c |    2 ++
 drivers/video/mb862xx.c     |   16 +++++++++++++++-
 include/configs/lwmon5.h    |    1 +
 include/configs/socrates.h  |    1 +
 4 files changed, 19 insertions(+), 1 deletion(-)

Index: u-boot-mainline/drivers/video/cfb_console.c
===================================================================
--- u-boot-mainline.orig/drivers/video/cfb_console.c    2009-10-19 
13:17:14.582303087 +0200
+++ u-boot-mainline/drivers/video/cfb_console.c 2009-10-19 13:17:29.406303158 
+0200
@@ -146,9 +146,11 @@
 #ifdef CONFIG_VIDEO_CORALP
 #define VIDEO_FB_LITTLE_ENDIAN
 #endif
+#ifdef CONFIG_VIDEO_MB862xx_ACCEL
 #define VIDEO_HW_RECTFILL
 #define VIDEO_HW_BITBLT
 #endif
+#endif
 
 /*****************************************************************************/
 /* Include video_fb.h after definitions of VIDEO_HW_RECTFILL etc            */
Index: u-boot-mainline/drivers/video/mb862xx.c
===================================================================
--- u-boot-mainline.orig/drivers/video/mb862xx.c        2009-10-19 
13:17:14.582303087 +0200
+++ u-boot-mainline/drivers/video/mb862xx.c     2009-10-19 13:17:17.467553012 
+0200
@@ -89,6 +89,7 @@
                                       (GC_DISP_BASE | GC_L0PAL0) + \
                                       ((idx) << 2)), (val))
 
+#if defined(CONFIG_VIDEO_MB862xx_ACCEL)
 static void gdc_sw_reset (void)
 {
        GraphicDevice *dev = &mb862xx;
@@ -129,6 +130,7 @@
                        break;
                }
 }
+#endif
 
 #if !defined(CONFIG_VIDEO_CORALP)
 static void board_disp_init (void)
@@ -144,11 +146,13 @@
 #endif
 
 /*
- * Init drawing engine
+ * Init drawing engine if accel enabled.
+ * Also clears visible framebuffer.
  */
 static void de_init (void)
 {
        GraphicDevice *dev = &mb862xx;
+#if defined(CONFIG_VIDEO_MB862xx_ACCEL)
        int cf = (dev->gdfBytesPP == 1) ? 0x0000 : 0x8000;
 
        dev->dprBase = dev->frameAdrs + GC_DRAW_BASE;
@@ -174,6 +178,14 @@
        DE_WR_FIFO (dev->winSizeY << 16 | dev->winSizeX);
        /* sync with SW access to framebuffer */
        de_wait ();
+#else
+       unsigned int i, *p;
+
+       i = dev->winSizeX * dev->winSizeY;
+       p = (unsigned int *)dev->frameAdrs;
+       while (i--)
+               *p++ = 0;
+#endif
 }
 
 #if defined(CONFIG_VIDEO_CORALP)
@@ -389,6 +401,7 @@
        L0PAL_WR_REG (index, (r << 16) | (g << 8) | (b));
 }
 
+#if defined(CONFIG_VIDEO_MB862xx_ACCEL)
 /*
  * Drawing engine Fill and BitBlt screen region
  */
@@ -430,3 +443,4 @@
        DE_WR_FIFO ((height << 16) | width);
        de_wait (); /* sync */
 }
+#endif
Index: u-boot-mainline/include/configs/lwmon5.h
===================================================================
--- u-boot-mainline.orig/include/configs/lwmon5.h       2009-10-19 
13:17:14.582303087 +0200
+++ u-boot-mainline/include/configs/lwmon5.h    2009-10-19 13:17:29.406303158 
+0200
@@ -344,6 +344,7 @@
 /* Video console */
 #define CONFIG_VIDEO
 #define CONFIG_VIDEO_MB862xx
+#define CONFIG_VIDEO_MB862xx_ACCEL
 #define CONFIG_CFB_CONSOLE
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_CONSOLE_EXTRA_INFO
Index: u-boot-mainline/include/configs/socrates.h
===================================================================
--- u-boot-mainline.orig/include/configs/socrates.h     2009-10-19 
13:17:14.583302392 +0200
+++ u-boot-mainline/include/configs/socrates.h  2009-10-19 13:17:29.406303158 
+0200
@@ -198,6 +198,7 @@
 
 #define CONFIG_VIDEO
 #define CONFIG_VIDEO_MB862xx
+#define CONFIG_VIDEO_MB862xx_ACCEL
 #define CONFIG_CFB_CONSOLE
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to