summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/9/pc/devvga.c4
-rw-r--r--sys/src/9/pc/screen.c11
-rw-r--r--sys/src/9/pc/screen.h6
-rw-r--r--sys/src/9/pc/vgai81x.c1
-rw-r--r--sys/src/9/pc/vgamach64xx.c1
-rw-r--r--sys/src/9/pc/vgaradeon.c3
-rw-r--r--sys/src/9/pc/vgas3.c1
-rw-r--r--sys/src/9/pc/vgasavage.c1
-rw-r--r--sys/src/9/pc/vgat2r4.c1
9 files changed, 9 insertions, 20 deletions
diff --git a/sys/src/9/pc/devvga.c b/sys/src/9/pc/devvga.c
index 5120f5946..151b52346 100644
--- a/sys/src/9/pc/devvga.c
+++ b/sys/src/9/pc/devvga.c
@@ -314,6 +314,8 @@ vgactl(Cmdbuf *cb)
scr->fill = nil;
scr->scroll = nil;
scr->blank = nil;
+ hwblank = 0;
+ hwaccel = 0;
qunlock(&drawlock);
if(scr->dev->disable)
scr->dev->disable(scr);
@@ -410,7 +412,7 @@ vgactl(Cmdbuf *cb)
if(scr->dev && scr->dev->drawinit)
scr->dev->drawinit(scr);
hwblank = scr->blank != nil;
- hwaccel = !scr->softscreen && (scr->scroll || scr->fill);
+ hwaccel = scr->fill != nil || scr->scroll != nil;
vgascreenwin(scr);
resetscreenimage();
cursoron();
diff --git a/sys/src/9/pc/screen.c b/sys/src/9/pc/screen.c
index 494c6e908..d5cab912a 100644
--- a/sys/src/9/pc/screen.c
+++ b/sys/src/9/pc/screen.c
@@ -393,8 +393,8 @@ setcursor(Cursor* curs)
scr->cur->load(scr, curs);
}
-int hwaccel = 1;
-int hwblank = 0; /* turned on by drivers that are known good */
+int hwaccel = 0;
+int hwblank = 0;
int panning = 0;
int
@@ -423,12 +423,10 @@ hwdraw(Memdrawparam *par)
if(mask && mask->data->bdata == scrd->bdata)
swcursoravoid(par->mr);
}
- if(hwaccel == 0)
+ if(!hwaccel || scr->softscreen)
return 0;
if(dst->data->bdata != scrd->bdata || src == nil || mask == nil)
return 0;
- if(scr->fill==nil && scr->scroll==nil)
- return 0;
/*
* If we have an opaque mask and source is one opaque
@@ -670,9 +668,6 @@ bootscreeninit(void)
scr->useflush = 0;
scr->dev = nil;
- hwblank = 0;
- hwaccel = 0;
-
physgscreenr = gscreen->r;
vgaimageinit(chan);
diff --git a/sys/src/9/pc/screen.h b/sys/src/9/pc/screen.h
index bbe6b2512..ad83e82a6 100644
--- a/sys/src/9/pc/screen.h
+++ b/sys/src/9/pc/screen.h
@@ -135,9 +135,9 @@ extern void mouseresize(void);
extern void mouseredraw(void);
/* screen.c */
-extern int hwaccel; /* use hw acceleration; default on */
-extern int hwblank; /* use hw blanking; default on */
-extern int panning; /* use virtual screen panning; default off */
+extern int hwaccel; /* use hw acceleration */
+extern int hwblank; /* use hw blanking */
+extern int panning; /* use virtual screen panning */
extern void addvgaseg(char*, ulong, ulong);
extern uchar* attachscreen(Rectangle*, ulong*, int*, int*, int*);
extern void flushmemscreen(Rectangle);
diff --git a/sys/src/9/pc/vgai81x.c b/sys/src/9/pc/vgai81x.c
index ce31f6b50..07b8b489d 100644
--- a/sys/src/9/pc/vgai81x.c
+++ b/sys/src/9/pc/vgai81x.c
@@ -103,7 +103,6 @@ i81xenable(VGAscr* scr)
scr->storage = cursor;
scr->blank = i81xblank;
- hwblank = 1;
}
static void
diff --git a/sys/src/9/pc/vgamach64xx.c b/sys/src/9/pc/vgamach64xx.c
index 1c97e91d0..4e93f2453 100644
--- a/sys/src/9/pc/vgamach64xx.c
+++ b/sys/src/9/pc/vgamach64xx.c
@@ -956,7 +956,6 @@ mach64xxdrawinit(VGAscr *scr)
case ('L'<<8)|'M': /* 4C4D: Rage Mobility */
case ('L'<<8)|'P': /* 4C50: Rage 3D LTPro */
scr->blank = mach64lcdblank;
- hwblank = 1;
break;
}
}
diff --git a/sys/src/9/pc/vgaradeon.c b/sys/src/9/pc/vgaradeon.c
index 50d0bab65..28f74f3f2 100644
--- a/sys/src/9/pc/vgaradeon.c
+++ b/sys/src/9/pc/vgaradeon.c
@@ -450,10 +450,7 @@ radeondrawinit(VGAscr*scr)
scr->fill = radeonfill;
scr->scroll = radeonscroll;
- hwaccel = 1;
-
scr->blank = radeonblank;
- hwblank = 1;
}
/* hw overlay */
diff --git a/sys/src/9/pc/vgas3.c b/sys/src/9/pc/vgas3.c
index f59ff4bac..a948b3154 100644
--- a/sys/src/9/pc/vgas3.c
+++ b/sys/src/9/pc/vgas3.c
@@ -523,7 +523,6 @@ s3drawinit(VGAscr *scr)
* above.
*/
scr->blank = s3blank;
- /* hwblank = 1; not known to work well */
switch(id){
case VIRGE:
diff --git a/sys/src/9/pc/vgasavage.c b/sys/src/9/pc/vgasavage.c
index 263b688b0..f4c7f9f77 100644
--- a/sys/src/9/pc/vgasavage.c
+++ b/sys/src/9/pc/vgasavage.c
@@ -567,5 +567,4 @@ savageinit(VGAscr *scr)
scr->fill = savagefill;
scr->scroll = savagescroll;
scr->blank = savageblank;
- hwblank = 0;
}
diff --git a/sys/src/9/pc/vgat2r4.c b/sys/src/9/pc/vgat2r4.c
index 3b5f21472..14d49dd70 100644
--- a/sys/src/9/pc/vgat2r4.c
+++ b/sys/src/9/pc/vgat2r4.c
@@ -499,7 +499,6 @@ t2r4drawinit(VGAscr *scr)
scr->fill = t2r4hwfill;
scr->scroll = t2r4hwscroll;
scr->blank = t2r4blank;
- hwblank = 1;
}
VGAdev vgat2r4dev = {