diff options
author | jkim <jkim@FreeBSD.org> | 2009-11-03 20:22:09 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2009-11-03 20:22:09 +0000 |
commit | ad954ad919b32a580361464e038aa3d95d678d21 (patch) | |
tree | 1ca98f62a3bdba171d52de5e76d79c5379962729 /sys/dev/syscons | |
parent | 0731af5157c9d3fda2dbfe886eb68a9c8e53d73a (diff) | |
download | FreeBSD-src-ad954ad919b32a580361464e038aa3d95d678d21.zip FreeBSD-src-ad954ad919b32a580361464e038aa3d95d678d21.tar.gz |
Fix VESA color palette corruption:
- VBE 3.0 says palette format resets to 6-bit mode when video mode changes.
We simply set 8-bit mode when we switch modes if the adapter supports it.
- VBE 3.0 also says if the mode is not VGA compatible, we must use VBE
function to save/restore palette. Otherwise, VGA function may be used.
Thus, reinstate the save/load palette functions only for non-VGA compatible
modes regardless of its palette format.
- Let vesa(4) set VESA modes even if vga(4) claims to support it.
- Reset default palette if VESA pixel mode is set initially.
- Fix more style nits.
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r-- | sys/dev/syscons/syscons.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 9ea8a6b..836db55 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -414,6 +414,9 @@ sc_attach_unit(int unit, int flags) #endif sc_set_graphics_mode(scp, NULL, vmode); sc_set_pixel_mode(scp, NULL, 0, 0, 16, 8); +#ifndef SC_NO_PALETTE_LOADING + vidd_save_palette(sc->adp, sc->palette); +#endif sc->initial_mode = vmode; #ifdef DEV_SPLASH /* put up the splash again! */ |