summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-07-16 21:03:10 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-07-16 21:03:10 +0000
commit5dab6d5af21b954f9810d69dbf419a64a0dcd283 (patch)
tree31baa103b0c269e8bc43bd523603aed21aac81ed /sys/arch/sparc64/dev
parent4fca826517a2f9595a073f0b0f2e9c47908be7fd (diff)
Clean up after X.
help & ok miod@
Diffstat (limited to 'sys/arch/sparc64/dev')
-rw-r--r--sys/arch/sparc64/dev/creator.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/arch/sparc64/dev/creator.c b/sys/arch/sparc64/dev/creator.c
index be6ea44fba4..079926f817c 100644
--- a/sys/arch/sparc64/dev/creator.c
+++ b/sys/arch/sparc64/dev/creator.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: creator.c,v 1.40 2008/12/27 17:23:01 miod Exp $ */
+/* $OpenBSD: creator.c,v 1.41 2009/07/16 21:03:09 kettenis Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -227,6 +227,19 @@ creator_ioctl(v, cmd, data, flags, p)
break;
case WSDISPLAYIO_SMODE:
sc->sc_mode = *(u_int *)data;
+ if (sc->sc_mode == WSDISPLAYIO_MODE_EMUL) {
+ struct rasops_info *ri = &sc->sc_sunfb.sf_ro;
+ long attr;
+
+ if ((sc->sc_sunfb.sf_dev.dv_cfdata->cf_flags &
+ CREATOR_CFFLAG_NOACCEL) == 0)
+ creator_ras_init(sc);
+
+ /* Clear screen. */
+ ri->ri_ops.alloc_attr(ri,
+ WSCOL_BLACK, WSCOL_WHITE, WSATTR_WSCOLORS, &attr);
+ ri->ri_ops.eraserows(ri, 0, ri->ri_rows, attr);
+ }
break;
case WSDISPLAYIO_GINFO:
wdf = (void *)data;