On Tue, 2002-12-03 at 01:31, James Simmons wrote:
James,
> 2) The ability to go back to vga text mode on close of /dev/fb.
> Yes fbdev/fbcon supports that now.
>
Here's a preliminary and highly unpolished patch for saving and
restoring the initial vga state. The module allows saving/restoring of
specific hardware states (vga fonts/character maps, color map, and/or
video mode) by specifying different flags. Most hardware probably will
just need restoring of the initial video mode though. Hopefully, it
should be generic enough to complement device specific state save and
restore routines.
For testing purposes, I also patched vga16fb.c to use the module during
fb_open and fb_release. Try loading vga16fb, and when opened, the video
mode will change. On close, the state of vgacon should be restored. I
have tested this with two different VGA cards, and both seems to work
quite well. However, color map and character map state restores are still untested.
Note that the module still makes assumptions that may not be necessarily
correct for all hardware (ie vga base is at 0xa0000). Secondly, there's
no check if the card is in VGA mode, EGA mode, or graphics mode. Please
review.
Tony
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Dec 07 2002 - 22:00:17 EST