[patch] Re: Problems with VESA framebuffer console in 2.1.124-pre2

Gerd Knorr (kraxel@goldbach.in-berlin.de)
Sun, 4 Oct 1998 10:56:46 +0200


In lists.linux.kernel you write:

>Hi folks,
>the VESA framebuffer console worked fine for my Toshiba i586 notebook
>(graphics chip is a CT 65550) up to (at least) 2.1.120
>with vga=0x305 (1024x768 @ 256 colors).
>With 2.1.124-pre2 and using the default settings I get a black screen.
>Machine boots fine though. I then tried different video=vesa:... boot
>options:

>redraw,nopal works fine as before
>redraw black-on-black screen
>nopal characters are visible, but screen is vertically offset,
> redrawing is incorrect, e.g. at shell prompt the current
> line is not visible and appears as the bottom line after
> I hit return

>So the real culprit seems to be the protected mode palette code
>and there are glitches in the panning code as well.

Both panning and palette changes use the protected mode interface
of the VESA BIOS, so I suspect it is the same problem we have with
the APM BIOS: some BIOS versions are buggy...

Probably it is better not to use the protected mode by default. Here
is a patch which switches back the defaults.

Gerd

--------------------------------------------------------------------
diff -u ./drivers/video/vesafb.c-orig ./drivers/video/vesafb.c
--- ./drivers/video/vesafb.c-orig Sat Oct 3 21:09:12 1998
+++ ./drivers/video/vesafb.c Sat Oct 3 23:30:39 1998
@@ -4,7 +4,7 @@
* switching to graphics mode happens at boot time (while
* running in real mode, see arch/i386/video.S).
*
- * (c) 1998 Gerd Knorr <kraxel@cs.tu-berlin.de>
+ * (c) 1998 Gerd Knorr <kraxel@goldbach.in-berlin.de>
*
*/

@@ -90,8 +90,8 @@
static int inverse = 0;
static int currcon = 0;

-static int pmi_setpal = 1; /* pmi for palette changes ??? */
-static int ypan = 1;
+static int pmi_setpal = 0; /* pmi for palette changes ??? */
+static int ypan = 0;
static int ywrap = 0;
static unsigned short *pmi_base = 0;
static void (*pmi_start)(void);
@@ -437,8 +437,10 @@
ywrap=0,ypan=1;
else if (! strcmp(this_opt, "ywrap"))
ywrap=1,ypan=0;
- else if (! strcmp(this_opt, "nopal"))
+ else if (! strcmp(this_opt, "vgapal"))
pmi_setpal=0;
+ else if (! strcmp(this_opt, "pmipal"))
+ pmi_setpal=1;
else if (!strncmp(this_opt, "font:", 5))
strcpy(fb_info.fontname, this_opt+5);
}
diff -u ./Documentation/fb/vesafb.txt-orig ./Documentation/fb/vesafb.txt
--- ./Documentation/fb/vesafb.txt-orig Sat Oct 3 23:29:27 1998
+++ ./Documentation/fb/vesafb.txt Sat Oct 3 23:29:31 1998
@@ -79,17 +79,20 @@
by comma. Accepted options:

invers - no comment...
-redraw - scroll by redrawing the affected part of the screen
+
+redraw - scroll by redrawing the affected part of the screen.
+ This is the default.
ypan - enable display panning using the VESA protected mode
interface. This enables the Shift-PgUp scrollback
thing and greatly speeds up fullscreen scrolling.
It is slower than "redraw" when scrolling only a halve
- screen. This is the default.
+ screen. Seems not to work with some BIOSes.
ywrap - If your gfx board supports wrap-around, use this one
instead of ypan.
-nopal - Don't use the protected mode interface for palette
- changes. vesafb will try the standard vga registers
- instead.
+
+vgapal - Use the standard vga registers for palette changes.
+ This is the default.
+pmipal - Use the protected mode interface for palette changes.


Have fun!
diff -u ./CREDITS-orig ./CREDITS
--- ./CREDITS-orig Sat Oct 3 23:32:31 1998
+++ ./CREDITS Sat Oct 3 23:34:13 1998
@@ -943,8 +943,8 @@
S: Luxembourg

N: Gerd Knorr
-E: kraxel@cs.tu-berlin.de
-D: SCSI CD-ROM driver hacking, minor bug fixes
+E: kraxel@goldbach.in-berlin.de
+D: SCSI CD-ROM driver hacking, vesafb, v4l, minor bug fixes

N: Harald Koenig
E: koenig@tat.physik.uni-tuebingen.de

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/