summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/devvga.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-01-02 15:29:15 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2015-01-02 15:29:15 +0100
commit9aec87c46c483ca1cf560e0e8a929cdf72447371 (patch)
treed8a01bc7852d52012468de3c0c225cbfdee053d4 /sys/src/9/pc/devvga.c
parent7848fe597006ecc6ee0605341ada08b7dea42f2a (diff)
vgavesa: get rid of the vesa kproc
in 9front, screen blanking is always initiated from process context, so there is no need for a kproc anymore. care has been taken for the race between vesadisable() and vesablank() by acquiering the drawlock prior calling scr->dev->enable() and scr->dev->disable(). this also has the side effect of accelerated fills and scrolls not being called during device disable.
Diffstat (limited to 'sys/src/9/pc/devvga.c')
-rw-r--r--sys/src/9/pc/devvga.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/src/9/pc/devvga.c b/sys/src/9/pc/devvga.c
index 3867d36dc..5d2ec72c8 100644
--- a/sys/src/9/pc/devvga.c
+++ b/sys/src/9/pc/devvga.c
@@ -309,6 +309,11 @@ vgactl(Cmdbuf *cb)
for(i = 0; vgadev[i]; i++){
if(strcmp(cb->f[1], vgadev[i]->name))
continue;
+ qlock(&drawlock);
+ if(waserror()){
+ qunlock(&drawlock);
+ nexterror();
+ }
if(scr->dev){
if(scr->dev->disable)
scr->dev->disable(scr);
@@ -319,6 +324,8 @@ vgactl(Cmdbuf *cb)
scr->dev = vgadev[i];
if(scr->dev->enable)
scr->dev->enable(scr);
+ qunlock(&drawlock);
+ poperror();
return;
}
break;