aboutsummaryrefslogtreecommitdiff
path: root/vgasrc/stdvgamodes.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2012-01-21 11:26:37 -0500
committerKevin O'Connor <kevin@koconnor.net>2012-02-01 20:35:48 -0500
commite6bc4c1c5817e9c2d1f55b5c0ad5167e93aed418 (patch)
tree000d400718d26759e7b48f915a622ade7bb3d42a /vgasrc/stdvgamodes.c
parent4a73f933968e5cf6f2a6ce1ad87448dd6b136e48 (diff)
downloadseabios-hppa-e6bc4c1c5817e9c2d1f55b5c0ad5167e93aed418.zip
seabios-hppa-e6bc4c1c5817e9c2d1f55b5c0ad5167e93aed418.tar.gz
seabios-hppa-e6bc4c1c5817e9c2d1f55b5c0ad5167e93aed418.tar.bz2
vgabios: Move BDA setting from driver code to common code.
Always setup the BDA on a mode switch. Call that BDA setup code unconditionally. Also, always set vbe_mode and use that for finding the current mode and for reporting the mode to vbe callers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/stdvgamodes.c')
-rw-r--r--vgasrc/stdvgamodes.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/vgasrc/stdvgamodes.c b/vgasrc/stdvgamodes.c
index 08c3a58..1b47e98 100644
--- a/vgasrc/stdvgamodes.c
+++ b/vgasrc/stdvgamodes.c
@@ -298,6 +298,13 @@ static struct stdvga_mode_s vga_modes[] VAR16 = {
* Mode functions
****************************************************************/
+int
+stdvga_is_mode(struct vgamode_s *vmode_g)
+{
+ return (vmode_g >= &vga_modes[0].info
+ && vmode_g <= &vga_modes[ARRAY_SIZE(vga_modes)-1].info);
+}
+
struct vgamode_s *
stdvga_find_mode(int mode)
{