[PATCH] console palette fix

From: James Simmons (jsimmons@acsu.buffalo.edu)
Date: Thu Jul 06 2000 - 09:01:47 EST


This patches fixes a problem several fbdev drivers where having. The patch
works great with vgacon as well. I have tested it with vgacon and fbdev
for several weeks and it works fine. Other people have tried the patch and
it worked for them. On calling sw->con_switch for fbdev drivers this could
change the video mode. For many types of video hardware the way the
palette is set depends on the video mode. In redraw_screen the palette was
being set before the video mode was changed. This was producing errors on
several drivers. This patch fixed this problem by setting the palette
after sw->con_switch was called. Thank you.

Q: Why did they deprecate a.out support in linux?
A: Because a nasty coff is bad for your elf.

James Simmons [jsimmons@linux-fbdev.org] ____/|
fbdev/console/gfx developer \ o.O|
http://www.linux-fbdev.org =(_)=
http://linuxgfx.sourceforge.net U
http://linuxconsole.sourceforge.net

--- console.c.orig Thu Jul 6 09:43:31 2000
+++ console.c Thu Jul 6 09:44:40 2000
@@ -581,10 +581,11 @@
 
         if (redraw) {
                 set_origin(currcons);
- set_palette(currcons);
- if (sw->con_switch(vc_cons[currcons].d) && vcmode != KD_GRAPHICS)
+ if (sw->con_switch(vc_cons[currcons].d) && vcmode != KD_GRAPHICS) {
                         /* Update the screen contents */
+ set_palette(currcons);
                         do_update_region(currcons, origin, screenbuf_size/2);
+ }
         }
         set_cursor(currcons);
         if (is_switch) {

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



This archive was generated by hypermail 2b29 : Fri Jul 07 2000 - 21:00:18 EST