Fixes for vgafb on 2.1.107

Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
Sun, 28 Jun 1998 16:03:01 +0200 (MET DST)


After a lot of work, I found out what was wrong with vgafb in 2.1.107. The
strange thing was that it does work in the vger tree...

This fix solves the `black-on-black' problem with vgafb:

--- native-2.1.107/drivers/video/vgafb.c.orig Fri Jun 26 23:08:05 1998
+++ native-2.1.107/drivers/video/vgafb.c Sun Jun 28 15:37:55 1998
@@ -581,8 +581,13 @@
disp.cmap.transp = NULL;

#ifdef __i386__
+#if 0
disp.screen_base = ioremap((unsigned long) fb_fix.smem_start,
fb_fix.smem_len);
+#else
+#warning should use ioremap, but the memory subsystem has not been initialized yet
+ disp.screen_base = bus_to_virt((unsigned long) fb_fix.smem_start);
+#endif
#else
disp.screen_base = bus_to_virt((unsigned long) fb_fix.smem_start);
#endif

Because the memory subsystem is initialized after the console in Linus' tree,
ioremap() returns zero and all characters arrive in your first 32K of innocent
memory. This explains why the system booted (invisible), but crashed a bit
later. Since there was a good reason for using ioremap() instead of
bus_to_virt() (Andrew Apted added that, IIRC), things may go wrong on some
boards.

Other related question: will the changed initialization order in the vger tree
(memory and PCI much earlier) make it in the standard tree? If you want to
probe for a graphics board in frame buffer device code, you're hosed ATM.

Suggestions to make life easier with 2.1.107:

- Use frame buffer devices and vgafb (until vgacon is sped up). Vgafb scrolls
much faster because it uses panning. You have to turn on the experimental
switch for this, but don't we all do this for a _development_ kernel? :-)

- Do not enable vesafb, unless you have a NeoMagic notebook and are going to
compile XF68_FBDev because you hate non-Open Source X servers.

- Do not enable vfb (the virtual frame buffer device).

Now vgafb is fixed, I can continue with scrollback support...

Greetings,

Geert

P.S. Expect a lot of other patches soon.

--
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

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu