ref: b25e48b949ad5be3429ad254b83bce59c063e149
parent: 54db805a16553ba1e8e2c5d1aeb06e0f62916465
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Tue Aug 23 02:03:54 EDT 2011
vgavesa: cleanup
--- a/sys/src/9/pc/vgavesa.c
+++ b/sys/src/9/pc/vgavesa.c
@@ -53,15 +53,8 @@
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 @@
if(devtab[cmem->type]->read(cmem, modebuf, sizeof(modebuf), pa) != sizeof(modebuf))
error("read modebuf");
-
- poperror();
- qunlock(&callq);
}
static void
@@ -229,6 +219,7 @@
while(vesactl != Cdisable){
if(!waserror()){
sleep(&vesar, vesadisabled, nil);
+
vbesetup(&u, 0x4f10);
if(vesactl == Cblank)
u.bx = 0x0101;
@@ -235,6 +226,7 @@
else
u.bx = 0x0001;
vbecall(&u);
+
poperror();
}
}