vga(4): Simplify conditions for mode rejection somewhat.
authorSascha Wildner <saw@online.de>
Mon, 14 Dec 2009 20:16:50 +0000 (21:16 +0100)
committerSascha Wildner <saw@online.de>
Mon, 14 Dec 2009 20:17:04 +0000 (21:17 +0100)
commitfb5d6e269d49634015cfcda26285309a7bf582ae
tree2667030db8c80aa11a27898327ff4712e4e48722
parentd9d2ffefe942d24cd6b878e495772ac1f9a46361
vga(4): Simplify conditions for mode rejection somewhat.

When mapping the video parameter table to our mode_map, only reject modes
which are neither 40x25, 80x25 nor 80x30, instead of rejecting or accepting
the whole table based on comparing the initial mode's BIOS and power-up
register settings.

Add a VGA_KEEP_POWERON_MODE option which (when set) preserves the register
settings which were found for the initial mode upon power-on for switching
back to it (or some mode derived from it) from another mode. The power-on
settings are also taken for the initial mode in case the video parameter
table has no valid settings for it.

This is kinda similar to what's proposed in FreeBSD's kern/64114.
share/man/man4/vga.4
sys/config/LINT
sys/dev/video/fb/vga.c
sys/platform/pc32/conf/options
sys/platform/pc64/conf/options