summaryrefslogtreecommitdiff
path: root/sys/dev/sbus/cgsix.c
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2002-07-30 23:03:31 +0000
committerJason Wright <jason@cvs.openbsd.org>2002-07-30 23:03:31 +0000
commit9fa22dab6be1492a24bdccea29ac7472b91d342b (patch)
tree41535ba7d2de70d1f5ba358eecce02822a7eead2 /sys/dev/sbus/cgsix.c
parent1421d3a222d2f8eabc7e689cd8c5c93638c36ca9 (diff)
- Whoops, I had the mode mask and value bits backwards
- make sure FBC_MODE is reset when switching back to WSDISPLAYIO_MODE_EMUL
Diffstat (limited to 'sys/dev/sbus/cgsix.c')
-rw-r--r--sys/dev/sbus/cgsix.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/sbus/cgsix.c b/sys/dev/sbus/cgsix.c
index 3e3646ea4cf..fc9cba7cf8e 100644
--- a/sys/dev/sbus/cgsix.c
+++ b/sys/dev/sbus/cgsix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgsix.c,v 1.25 2002/07/30 18:07:02 jason Exp $ */
+/* $OpenBSD: cgsix.c,v 1.26 2002/07/30 23:03:30 jason Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -319,13 +319,18 @@ cgsix_ioctl(v, cmd, data, flags, p)
struct wsdisplay_cmap *cm;
struct wsdisplay_fbinfo *wdf;
int error;
+ u_int mode;
switch (cmd) {
case WSDISPLAYIO_GTYPE:
*(u_int *)data = WSDISPLAY_TYPE_UNKNOWN;
break;
case WSDISPLAYIO_SMODE:
- sc->sc_mode = *(u_int *)data;
+ mode = *(u_int *)data;
+ if (sc->sc_mode != WSDISPLAYIO_MODE_EMUL &&
+ mode == WSDISPLAYIO_MODE_EMUL)
+ cgsix_ras_init(sc);
+ sc->sc_mode = mode;
break;
case WSDISPLAYIO_GINFO:
wdf = (void *)data;
@@ -734,12 +739,8 @@ cgsix_ras_init(sc)
CG6_DRAIN(sc);
m = FBC_READ(sc, CG6_FBC_MODE);
m &= ~FBC_MODE_MASK;
-#if 0
- /* XXX doesn't work as advertised */
- FBC_WRITE(sc, CG6_FBC_MODE, m);
m |= FBC_MODE_VAL;
FBC_WRITE(sc, CG6_FBC_MODE, m);
-#endif
}
void