Signed-off-by: Kevin O'Connor kevin@koconnor.net --- vgasrc/geodevga.c | 19 +++++++------------ 1 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/vgasrc/geodevga.c b/vgasrc/geodevga.c index c1e4244..3da1b7c 100644 --- a/vgasrc/geodevga.c +++ b/vgasrc/geodevga.c @@ -12,7 +12,7 @@ #include "biosvar.h" // GET_BDA #include "vgabios.h" // VGAREG_* #include "util.h" // memset -#include "stdvga.h" // VGAREG_VGA_CRTC_ADDRESS +#include "stdvga.h" // stdvga_crtc_write
/**************************************************************** @@ -110,33 +110,28 @@ static int legacyio_check(void) ****************************************************************/ static void crtce_lock(void) { - outb(EXTENDED_REGISTER_LOCK , VGAREG_VGA_CRTC_ADDRESS); - outb(CRTCE_LOCK, VGAREG_VGA_CRTC_DATA); + stdvga_crtc_write(VGAREG_VGA_CRTC_ADDRESS, EXTENDED_REGISTER_LOCK + , CRTCE_LOCK); }
static void crtce_unlock(void) { - outb(EXTENDED_REGISTER_LOCK , VGAREG_VGA_CRTC_ADDRESS); - outb(CRTCE_UNLOCK, VGAREG_VGA_CRTC_DATA); + stdvga_crtc_write(VGAREG_VGA_CRTC_ADDRESS, EXTENDED_REGISTER_LOCK + , CRTCE_UNLOCK); }
static u8 crtce_read(u8 reg) { - u8 val; - crtce_unlock(); - outb(reg , VGAREG_VGA_CRTC_ADDRESS); - val = inb(VGAREG_VGA_CRTC_DATA); + u8 val = stdvga_crtc_read(VGAREG_VGA_CRTC_ADDRESS, reg); crtce_lock(); - return val; }
static void crtce_write(u8 reg, u8 val) { crtce_unlock(); - outb(reg , VGAREG_VGA_CRTC_ADDRESS); - outb(val, VGAREG_VGA_CRTC_DATA); + stdvga_crtc_write(VGAREG_VGA_CRTC_ADDRESS, reg, val); crtce_lock(); }