summaryrefslogtreecommitdiff
path: root/sys/dev/sun
diff options
context:
space:
mode:
authorjdc <jdc@NetBSD.org>2009-01-01 13:53:07 +0000
committerjdc <jdc@NetBSD.org>2009-01-01 13:53:07 +0000
commit79efdbb4ff1965ad84978d668598d2c80d09df44 (patch)
tree43b0129333c13eee1eb725aa04cd20b478bb357d /sys/dev/sun
parent84ff1461c4eaa4b0546df0b5f618af5f11687dc3 (diff)
Back out previous and clear the screen directly.
Pointed out by macallan@.
Diffstat (limited to 'sys/dev/sun')
-rw-r--r--sys/dev/sun/bwtwo.c14
-rw-r--r--sys/dev/sun/cgsix.c11
-rw-r--r--sys/dev/sun/cgthree.c18
3 files changed, 24 insertions, 19 deletions
diff --git a/sys/dev/sun/bwtwo.c b/sys/dev/sun/bwtwo.c
index 5ef14da07f8..288fdc80004 100644
--- a/sys/dev/sun/bwtwo.c
+++ b/sys/dev/sun/bwtwo.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bwtwo.c,v 1.20 2008/12/29 14:27:59 jdc Exp $ */
+/* $NetBSD: bwtwo.c,v 1.21 2009/01/01 13:53:07 jdc Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bwtwo.c,v 1.20 2008/12/29 14:27:59 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bwtwo.c,v 1.21 2009/01/01 13:53:07 jdc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -286,13 +286,13 @@ bwtwoattach(sc, name, isconsole)
vcons_init_screen(&sc->vd, &bw2_console_screen, 1,
&defattr);
bw2_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC;
-
+
bwtwo_defaultscreen.textops = &ri->ri_ops;
bwtwo_defaultscreen.capabilities = ri->ri_caps;
bwtwo_defaultscreen.nrows = ri->ri_rows;
bwtwo_defaultscreen.ncols = ri->ri_cols;
sc->vd.active = &bw2_console_screen;
- wsdisplay_cnattach(&bwtwo_defaultscreen, ri, 0, 0, defattr);
+ wsdisplay_cnattach(&bwtwo_defaultscreen, ri, 0, 0, defattr);
} else {
/*
* we're not the console so we just clear the screen and don't
@@ -465,10 +465,12 @@ bwtwo_init_screen(void *cookie, struct vcons_screen *scr,
ri->ri_width = sc->sc_width;
ri->ri_height = sc->sc_height;
ri->ri_stride = sc->sc_stride;
- ri->ri_flg = RI_CENTER | RI_CLEAR;
+ ri->ri_flg = RI_CENTER;
ri->ri_bits = sc->sc_fb.fb_pixels;
-
+
+ memset(sc->sc_fb.fb_pixels, (*defattr >> 16) & 0xff,
+ sc->sc_stride * sc->sc_height);
rasops_init(ri, sc->sc_height/8, sc->sc_width/8);
ri->ri_caps = 0;
rasops_reconfig(ri, sc->sc_height / ri->ri_font->fontheight,
diff --git a/sys/dev/sun/cgsix.c b/sys/dev/sun/cgsix.c
index f1843155762..4898bc4422e 100644
--- a/sys/dev/sun/cgsix.c
+++ b/sys/dev/sun/cgsix.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cgsix.c,v 1.42 2008/12/29 14:42:15 jdc Exp $ */
+/* $NetBSD: cgsix.c,v 1.43 2009/01/01 13:53:53 jdc Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.42 2008/12/29 14:42:15 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.43 2009/01/01 13:53:53 jdc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1256,12 +1256,13 @@ cgsix_init_screen(void *cookie, struct vcons_screen *scr,
ri->ri_height = sc->sc_height;
ri->ri_stride = sc->sc_stride;
ri->ri_flg = RI_CENTER;
- /* Use software for initial screen clear on old revisions */
- if (sc->sc_fhcrev < 2)
- ri->ri_flg |= RI_CLEAR;
ri->ri_bits = sc->sc_fb.fb_pixels;
+ /* We need unaccelerated initial screen clear on old revisions */
+ if (sc->sc_fhcrev < 2)
+ memset(sc->sc_fb.fb_pixels, (*defattr >> 16) & 0xff,
+ sc->sc_stride * sc->sc_height);
rasops_init(ri, sc->sc_height/8, sc->sc_width/8);
ri->ri_caps = WSSCREEN_WSCOLORS | WSSCREEN_REVERSE;
rasops_reconfig(ri, sc->sc_height / ri->ri_font->fontheight,
diff --git a/sys/dev/sun/cgthree.c b/sys/dev/sun/cgthree.c
index c6821f0b674..dd6d09f1312 100644
--- a/sys/dev/sun/cgthree.c
+++ b/sys/dev/sun/cgthree.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cgthree.c,v 1.18 2008/12/29 14:27:59 jdc Exp $ */
+/* $NetBSD: cgthree.c,v 1.19 2009/01/01 13:53:07 jdc Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgthree.c,v 1.18 2008/12/29 14:27:59 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgthree.c,v 1.19 2009/01/01 13:53:07 jdc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -227,13 +227,13 @@ cgthreeattach(sc, name, isconsole)
vcons_init_screen(&sc->vd, &cg3_console_screen, 1,
&defattr);
cg3_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC;
-
+
cgthree_defaultscreen.textops = &ri->ri_ops;
cgthree_defaultscreen.capabilities = ri->ri_caps;
cgthree_defaultscreen.nrows = ri->ri_rows;
cgthree_defaultscreen.ncols = ri->ri_cols;
sc->vd.active = &cg3_console_screen;
- wsdisplay_cnattach(&cgthree_defaultscreen, ri, 0, 0, defattr);
+ wsdisplay_cnattach(&cgthree_defaultscreen, ri, 0, 0, defattr);
} else {
/*
* we're not the console so we just clear the screen and don't
@@ -257,7 +257,7 @@ cgthreeattach(sc, name, isconsole)
/* Initialize the default color map. */
cg3_setup_palette(sc);
-
+
aa.scrdata = &cgthree_screenlist;
aa.console = isconsole;
aa.accessops = &cgthree_accessops;
@@ -447,7 +447,7 @@ static void
cg3_setup_palette(struct cgthree_softc *sc)
{
int i, j;
-
+
j = 0;
for (i = 0; i < 256; i++) {
sc->sc_cmap.cm_map[i][0] = rasops_cmap[j];
@@ -583,10 +583,12 @@ cgthree_init_screen(void *cookie, struct vcons_screen *scr,
ri->ri_width = sc->sc_width;
ri->ri_height = sc->sc_height;
ri->ri_stride = sc->sc_stride;
- ri->ri_flg = RI_CENTER | RI_CLEAR;
+ ri->ri_flg = RI_CENTER;
ri->ri_bits = sc->sc_fb.fb_pixels;
-
+
+ memset(sc->sc_fb.fb_pixels, (*defattr >> 16) & 0xff,
+ sc->sc_stride * sc->sc_height);
rasops_init(ri, sc->sc_height/8, sc->sc_width/8);
ri->ri_caps = WSSCREEN_WSCOLORS | WSSCREEN_REVERSE;
rasops_reconfig(ri, sc->sc_height / ri->ri_font->fontheight,