From b25e48b949ad5be3429ad254b83bce59c063e149 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 23 Aug 2011 06:03:54 +0200 Subject: [PATCH] vgavesa: cleanup --- sys/src/9/pc/vgavesa.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/sys/src/9/pc/vgavesa.c b/sys/src/9/pc/vgavesa.c index d6e899890..9a260907f 100644 --- a/sys/src/9/pc/vgavesa.c +++ b/sys/src/9/pc/vgavesa.c @@ -53,15 +53,8 @@ vbesetup(Ureg *u, int ax) static void vbecall(Ureg *u) { - static QLock callq; ulong pa; - eqlock(&callq); - if(waserror()){ - qunlock(&callq); - nexterror(); - } - pa = PADDR(RMBUF); if(devtab[cmem->type]->write(cmem, modebuf, sizeof(modebuf), pa) != sizeof(modebuf)) error("write modebuf"); @@ -76,9 +69,6 @@ vbecall(Ureg *u) if(devtab[cmem->type]->read(cmem, modebuf, sizeof(modebuf), pa) != sizeof(modebuf)) error("read modebuf"); - - poperror(); - qunlock(&callq); } static void @@ -229,12 +219,14 @@ vesaproc(void*) while(vesactl != Cdisable){ if(!waserror()){ sleep(&vesar, vesadisabled, nil); + vbesetup(&u, 0x4f10); if(vesactl == Cblank) u.bx = 0x0101; else u.bx = 0x0001; vbecall(&u); + poperror(); } }