git: 9front

Download patch

ref: 5264b34f53d64bf342deca56a936d6d71f270dc7
parent: c69de1671b3d75e16b731a513c73e7371c77ad24
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();
 		}
 	}
--