diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2011-12-31 18:19:22 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2011-12-31 18:19:22 -0500 |
commit | 821d6b410e02897f84c4b732f3678f64e396c9cf (patch) | |
tree | c77eff40c3098d16f76c29f7332a2a367eb6afa7 /vgasrc/vgafb.c | |
parent | cecbc5da2c5826e35ba402b448f736fe3fa5008d (diff) | |
download | seabios-821d6b410e02897f84c4b732f3678f64e396c9cf.tar.gz |
vgabios: Refactor vga_set_mode and stdvga_set_mode.
Split out the BDA setup part of vga_set_mode to new function
modeswitch_set_bda. Move the remaining parts (palette loading, screen
clearing, font loading) of vga_set_mode into stdvga_set_mode.
Add new mode switching flags and pass them to stdvga_set_mode, so it
does not need to inspect modeset_ctl directly.
Move code needed by stdvga_set_mode (perform_gray_scale_summing,
clear_screen) to stdvga.c.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/vgafb.c')
-rw-r--r-- | vgasrc/vgafb.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/vgasrc/vgafb.c b/vgasrc/vgafb.c index 19ab1dfa..38ed0704 100644 --- a/vgasrc/vgafb.c +++ b/vgasrc/vgafb.c @@ -158,24 +158,6 @@ vgafb_scroll(int nblines, int attr, struct cursorpos ul, struct cursorpos lr) } } -void -clear_screen(struct vgamode_s *vmode_g) -{ - switch (GET_GLOBAL(vmode_g->memmodel)) { - case CTEXT: - case MTEXT: - memset16_far(GET_GLOBAL(vmode_g->sstart), 0, 0x0720, 32*1024); - break; - case CGA: - memset16_far(GET_GLOBAL(vmode_g->sstart), 0, 0x0000, 32*1024); - break; - default: - // XXX - old code gets/sets/restores sequ register 2 to 0xf - - // but it should always be 0xf anyway. - memset16_far(GET_GLOBAL(vmode_g->sstart), 0, 0x0000, 64*1024); - } -} - /**************************************************************** * Read/write characters to screen |