diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2014-10-23 16:37:08 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2014-10-27 11:03:12 -0400 |
commit | 12900b1a2431946f59e4973729280296a4a9cffd (patch) | |
tree | f02bf0b37e361e771b9f44ed9d0e03eedccaad68 /vgasrc/stdvgamodes.c | |
parent | 63977905a05fe36deac4aee9ef28bec8a13be402 (diff) | |
download | seabios-12900b1a2431946f59e4973729280296a4a9cffd.tar.gz |
vgabios: Fill in available legacy modes in video_func_static at runtime
Instead of hard coding the list of modes, fill them in from the list
of supported modes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/stdvgamodes.c')
-rw-r--r-- | vgasrc/stdvgamodes.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vgasrc/stdvgamodes.c b/vgasrc/stdvgamodes.c index 53b7463a..c553514f 100644 --- a/vgasrc/stdvgamodes.c +++ b/vgasrc/stdvgamodes.c @@ -397,6 +397,15 @@ stdvga_build_video_param(void) , get_global_seg(), GET_GLOBAL(stdmode_g->grdc_regs) , ARRAY_SIZE(vparam_g->grdc_regs)); } + + // Fill available legacy modes in video_func_static table + u32 modes = 0; + for (i = 0; i < ARRAY_SIZE(vga_modes); i++) { + u16 mode = vga_modes[i].mode; + if (mode <= 0x13) + modes |= 1<<i; + } + SET_VGA(static_functionality.modes, modes); } void |