Date: Mon, 19 Jan 1998 10:01:45 +0100 (CET)
From: Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be>
To: Linux/m68k <linux-m68k@lists.linux-m68k.org>
Subject: L68K: misc fb fixes
Sender: owner-linux-m68k@phil.uni-sb.de


Some frame buffer fixes:

  - fix typos in color map names
  - make fbcon.c compile on non-m68k (yes, blanking will move out of fbcon.c
    in the near future)
  - don't enable vfb unless you say video=vfb

diff -u --recursive --exclude-from=/home/geert/diff-excludes-linux --new-file m68k-2.1.79/drivers/video/atafb.c linux/drivers/video/atafb.c
--- m68k-2.1.79/drivers/video/atafb.c	Tue Jan 13 19:11:42 1998
+++ linux/drivers/video/atafb.c	Mon Jan 19 00:10:57 1998
@@ -1630,7 +1630,7 @@
 			(((green & 0xe) >> 1) | ((green & 1) << 3) << 4) |
 			((blue & 0xe) >> 1) | ((blue & 1) << 3);
 #ifdef CONFIG_FBCON_CFB16
-		cfb16_cmap[regno] = (red << 11) | (green << 5) | blue;
+		fbcon_cfb16_cmap[regno] = (red << 11) | (green << 5) | blue;
 #endif
 	}
 	return 0;
diff -u --recursive --exclude-from=/home/geert/diff-excludes-linux --new-file m68k-2.1.79/drivers/video/atyfb.c linux/drivers/video/atyfb.c
--- m68k-2.1.79/drivers/video/atyfb.c	Tue Jan 13 19:11:42 1998
+++ linux/drivers/video/atyfb.c	Mon Jan 19 00:02:42 1998
@@ -41,8 +41,9 @@
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/pci-bridge.h>
-#include "aty.h"
 
+#include "aty.h"
+#include "fbcon.h"
 #include "fbcon-cfb8.h"
 #include "fbcon-cfb16.h"
 #include "fbcon-cfb32.h"
diff -u --recursive --exclude-from=/home/geert/diff-excludes-linux --new-file m68k-2.1.79/drivers/video/fbcon.c linux/drivers/video/fbcon.c
--- m68k-2.1.79/drivers/video/fbcon.c	Wed Jan 14 20:08:58 1998
+++ linux/drivers/video/fbcon.c	Mon Jan 19 00:01:20 1998
@@ -880,7 +880,14 @@
 
     if (!p->can_soft_blank) {
 	if (blank) {
-	    if (p->visual == FB_VISUAL_MONO01 || MACH_IS_MAC)
+#ifdef CONFIG_MAC
+	    if (MACH_IS_MAC)
+		mymemset(p->screen_base,
+			 p->var.xres_virtual*p->var.yres_virtual*
+			 p->var.bits_per_pixel>>3);
+	    else
+#endif
+	    if (p->visual == FB_VISUAL_MONO01)
 		mymemset(p->screen_base,
 			 p->var.xres_virtual*p->var.yres_virtual*
 			 p->var.bits_per_pixel>>3);
diff -u --recursive --exclude-from=/home/geert/diff-excludes-linux --new-file m68k-2.1.79/drivers/video/tgafb.c linux/drivers/video/tgafb.c
--- m68k-2.1.79/drivers/video/tgafb.c	Tue Jan 13 19:11:43 1998
+++ linux/drivers/video/tgafb.c	Mon Jan 19 00:11:03 1998
@@ -839,7 +839,7 @@
 
 #ifdef CONFIG_FBCON_CFB32
     if (regno < 16 && tga_type != 0)
-	cfb32_cmap[regno] = (red << 16) | (green << 8) | blue;
+	fbcon_cfb32_cmap[regno] = (red << 16) | (green << 8) | blue;
 #endif /* CONFIG_FBCON_CFB32 */
 
     /* How to set a single color register?? */
diff -u --recursive --exclude-from=/home/geert/diff-excludes-linux --new-file m68k-2.1.79/drivers/video/vfb.c linux/drivers/video/vfb.c
--- m68k-2.1.79/drivers/video/vfb.c	Tue Jan 13 19:11:43 1998
+++ linux/drivers/video/vfb.c	Mon Jan 19 00:13:11 1998
@@ -58,6 +58,8 @@
     0, FB_VMODE_NONINTERLACED
 };
 
+static int vfb_enable = 0;	/* disabled by default */
+
 
     /*
      *  Interface used by the world
@@ -385,6 +387,8 @@
 
     fb_info.fontname[0] = '\0';
 
+    vfb_enable = 1;
+
     if (!options || !*options)
 	return;
 
@@ -403,6 +407,9 @@
 __initfunc(unsigned long vfb_init(unsigned long mem_start))
 {
     int err;
+
+    if (!vfb_enable)
+	return mem_start;
 
     if (mem_start) {
 	videomemory = mem_start;

Greetings,

						Geert

--
Geert Uytterhoeven                     Geert.Uytterhoeven@cs.kuleuven.ac.be
Wavelets, Linux/{m68k~Amiga,PPC~CHRP}  http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium

