summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-06-28 17:05:36 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-06-28 17:05:36 +0000
commitc561b3ac449ce8baa4cd514495757d6ed54abb94 (patch)
tree626793180227cf5c40d2027444e33b6e4a78a471 /sys/arch/sparc/dev
parent19144d022d5d113a772914ed1c19ccb6f9a886e1 (diff)
Sync sparc fb API with the sparc64 changes (fbwscons_init takes flags, and
the sunfb structure keeps pointer to the prom cursor coordinates).
Diffstat (limited to 'sys/arch/sparc/dev')
-rw-r--r--sys/arch/sparc/dev/agten.c4
-rw-r--r--sys/arch/sparc/dev/bwtwo.c4
-rw-r--r--sys/arch/sparc/dev/cgeight.c4
-rw-r--r--sys/arch/sparc/dev/cgfour.c4
-rw-r--r--sys/arch/sparc/dev/cgfourteen.c4
-rw-r--r--sys/arch/sparc/dev/cgsix.c4
-rw-r--r--sys/arch/sparc/dev/cgthree.c4
-rw-r--r--sys/arch/sparc/dev/cgtwelve.c4
-rw-r--r--sys/arch/sparc/dev/cgtwo.c4
-rw-r--r--sys/arch/sparc/dev/fb.c70
-rw-r--r--sys/arch/sparc/dev/mgx.c4
-rw-r--r--sys/arch/sparc/dev/p9000.c4
-rw-r--r--sys/arch/sparc/dev/p9100.c4
-rw-r--r--sys/arch/sparc/dev/tcx.c4
-rw-r--r--sys/arch/sparc/dev/tvtwo.c4
-rw-r--r--sys/arch/sparc/dev/vigra.c6
-rw-r--r--sys/arch/sparc/dev/zx.c4
17 files changed, 60 insertions, 76 deletions
diff --git a/sys/arch/sparc/dev/agten.c b/sys/arch/sparc/dev/agten.c
index 6ea6903f59a..ac7afb65780 100644
--- a/sys/arch/sparc/dev/agten.c
+++ b/sys/arch/sparc/dev/agten.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: agten.c,v 1.4 2003/06/24 21:55:05 miod Exp $ */
+/* $OpenBSD: agten.c,v 1.5 2003/06/28 17:05:33 miod Exp $ */
/*
* Copyright (c) 2002, 2003, Miodrag Vallat.
* All rights reserved.
@@ -224,7 +224,7 @@ agtenattach(struct device *parent, struct device *self, void *args)
sc->sc_sunfb.sf_ro.ri_bits = (void *)sc->sc_i128_fb;
sc->sc_sunfb.sf_ro.ri_hw = sc;
- fbwscons_init(&sc->sc_sunfb, isconsole);
+ fbwscons_init(&sc->sc_sunfb, isconsole ? 0 : RI_CLEAR);
fbwscons_setcolormap(&sc->sc_sunfb, agten_setcolor);
agten_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
diff --git a/sys/arch/sparc/dev/bwtwo.c b/sys/arch/sparc/dev/bwtwo.c
index ce114473c6c..893142220a2 100644
--- a/sys/arch/sparc/dev/bwtwo.c
+++ b/sys/arch/sparc/dev/bwtwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bwtwo.c,v 1.26 2003/06/02 23:27:53 millert Exp $ */
+/* $OpenBSD: bwtwo.c,v 1.27 2003/06/28 17:05:33 miod Exp $ */
/* $NetBSD: bwtwo.c,v 1.33 1997/05/24 20:16:02 pk Exp $ */
/*
@@ -306,7 +306,7 @@ obp_name:
sc->sc_sunfb.sf_ro.ri_bits = mapiodev(ca->ca_ra.ra_reg,
sc->sc_pixeloffset, round_page(sc->sc_sunfb.sf_fbsize));
sc->sc_sunfb.sf_ro.ri_hw = sc;
- fbwscons_init(&sc->sc_sunfb, isconsole);
+ fbwscons_init(&sc->sc_sunfb, isconsole ? 0 : RI_CLEAR);
bwtwo_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
bwtwo_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
diff --git a/sys/arch/sparc/dev/cgeight.c b/sys/arch/sparc/dev/cgeight.c
index 73523787df3..13eba516700 100644
--- a/sys/arch/sparc/dev/cgeight.c
+++ b/sys/arch/sparc/dev/cgeight.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgeight.c,v 1.20 2003/06/02 23:27:53 millert Exp $ */
+/* $OpenBSD: cgeight.c,v 1.21 2003/06/28 17:05:33 miod Exp $ */
/* $NetBSD: cgeight.c,v 1.13 1997/05/24 20:16:04 pk Exp $ */
/*
@@ -227,7 +227,7 @@ cgeightattach(parent, self, args)
sc->sc_sunfb.sf_ro.ri_hw = sc;
sc->sc_sunfb.sf_ro.ri_bits = mapiodev(ca->ca_ra.ra_reg,
PFOUR_COLOR_OFF_OVERLAY, round_page(sc->sc_sunfb.sf_fbsize));
- fbwscons_init(&sc->sc_sunfb, isconsole);
+ fbwscons_init(&sc->sc_sunfb, isconsole ? 0 : RI_CLEAR);
cgeight_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
cgeight_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
diff --git a/sys/arch/sparc/dev/cgfour.c b/sys/arch/sparc/dev/cgfour.c
index 4206c50d06e..fcad25130ac 100644
--- a/sys/arch/sparc/dev/cgfour.c
+++ b/sys/arch/sparc/dev/cgfour.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgfour.c,v 1.20 2003/06/04 04:11:37 deraadt Exp $ */
+/* $OpenBSD: cgfour.c,v 1.21 2003/06/28 17:05:33 miod Exp $ */
/* $NetBSD: cgfour.c,v 1.13 1997/05/24 20:16:06 pk Exp $ */
/*
@@ -237,7 +237,7 @@ cgfourattach(parent, self, args)
sc->sc_sunfb.sf_ro.ri_bits = mapiodev(ca->ca_ra.ra_reg,
PFOUR_COLOR_OFF_COLOR, round_page(sc->sc_sunfb.sf_fbsize));
sc->sc_sunfb.sf_ro.ri_hw = sc;
- fbwscons_init(&sc->sc_sunfb, isconsole);
+ fbwscons_init(&sc->sc_sunfb, isconsole ? 0 : RI_CLEAR);
fbwscons_setcolormap(&sc->sc_sunfb, cgfour_setcolor);
cgfour_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
diff --git a/sys/arch/sparc/dev/cgfourteen.c b/sys/arch/sparc/dev/cgfourteen.c
index 8cc62d38e06..56073f72045 100644
--- a/sys/arch/sparc/dev/cgfourteen.c
+++ b/sys/arch/sparc/dev/cgfourteen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgfourteen.c,v 1.25 2003/06/06 19:42:47 miod Exp $ */
+/* $OpenBSD: cgfourteen.c,v 1.26 2003/06/28 17:05:33 miod Exp $ */
/* $NetBSD: cgfourteen.c,v 1.7 1997/05/24 20:16:08 pk Exp $ */
/*
@@ -327,7 +327,7 @@ cgfourteenattach(parent, self, args)
cgfourteen_burner(sc, 1, 0);
sc->sc_sunfb.sf_ro.ri_hw = sc;
- fbwscons_init(&sc->sc_sunfb, isconsole);
+ fbwscons_init(&sc->sc_sunfb, isconsole ? 0 : RI_CLEAR);
fbwscons_setcolormap(&sc->sc_sunfb, cgfourteen_setcolor);
cgfourteen_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
diff --git a/sys/arch/sparc/dev/cgsix.c b/sys/arch/sparc/dev/cgsix.c
index 8fe063f410c..74c12b853ca 100644
--- a/sys/arch/sparc/dev/cgsix.c
+++ b/sys/arch/sparc/dev/cgsix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgsix.c,v 1.27 2003/06/28 13:32:25 miod Exp $ */
+/* $OpenBSD: cgsix.c,v 1.28 2003/06/28 17:05:33 miod Exp $ */
/* $NetBSD: cgsix.c,v 1.33 1997/08/07 19:12:30 pk Exp $ */
/*
@@ -349,7 +349,7 @@ cgsixattach(parent, self, args)
* XXX there should be a rasops "clear margins" feature
*/
fbwscons_init(&sc->sc_sunfb, isconsole &&
- (sc->sc_sunfb.sf_width >= 1024));
+ (sc->sc_sunfb.sf_width >= 1024) ? 0 : RI_CLEAR);
fbwscons_setcolormap(&sc->sc_sunfb, cgsix_setcolor);
/*
diff --git a/sys/arch/sparc/dev/cgthree.c b/sys/arch/sparc/dev/cgthree.c
index 30090a0d7a3..0e8b7cca2a4 100644
--- a/sys/arch/sparc/dev/cgthree.c
+++ b/sys/arch/sparc/dev/cgthree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgthree.c,v 1.22 2003/06/06 19:42:47 miod Exp $ */
+/* $OpenBSD: cgthree.c,v 1.23 2003/06/28 17:05:33 miod Exp $ */
/* $NetBSD: cgthree.c,v 1.33 1997/05/24 20:16:11 pk Exp $ */
/*
@@ -302,7 +302,7 @@ cgthreeattach(parent, self, args)
sc->sc_sunfb.sf_ro.ri_bits = mapiodev(ca->ca_ra.ra_reg, CG3REG_MEM,
round_page(sc->sc_sunfb.sf_fbsize));
sc->sc_sunfb.sf_ro.ri_hw = sc;
- fbwscons_init(&sc->sc_sunfb, isconsole);
+ fbwscons_init(&sc->sc_sunfb, isconsole ? 0 : RI_CLEAR);
fbwscons_setcolormap(&sc->sc_sunfb, cgthree_setcolor);
cgthree_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
diff --git a/sys/arch/sparc/dev/cgtwelve.c b/sys/arch/sparc/dev/cgtwelve.c
index 58932b97b56..c5af1e984ed 100644
--- a/sys/arch/sparc/dev/cgtwelve.c
+++ b/sys/arch/sparc/dev/cgtwelve.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgtwelve.c,v 1.8 2003/06/06 19:42:47 miod Exp $ */
+/* $OpenBSD: cgtwelve.c,v 1.9 2003/06/28 17:05:33 miod Exp $ */
/*
* Copyright (c) 2002, 2003 Miodrag Vallat. All rights reserved.
@@ -226,7 +226,7 @@ cgtwelveattach(parent, self, args)
sc->sc_sunfb.sf_ro.ri_bits = (void *)sc->sc_overlay;
sc->sc_sunfb.sf_ro.ri_hw = sc;
- fbwscons_init(&sc->sc_sunfb, isconsole);
+ fbwscons_init(&sc->sc_sunfb, isconsole ? 0 : RI_CLEAR);
cgtwelve_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
cgtwelve_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
diff --git a/sys/arch/sparc/dev/cgtwo.c b/sys/arch/sparc/dev/cgtwo.c
index c505384c7d8..2ea3dc1943c 100644
--- a/sys/arch/sparc/dev/cgtwo.c
+++ b/sys/arch/sparc/dev/cgtwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgtwo.c,v 1.28 2003/06/06 19:42:47 miod Exp $ */
+/* $OpenBSD: cgtwo.c,v 1.29 2003/06/28 17:05:33 miod Exp $ */
/* $NetBSD: cgtwo.c,v 1.22 1997/05/24 20:16:12 pk Exp $ */
/*
@@ -252,7 +252,7 @@ cgtwoattach(parent, self, args)
sc->sc_sunfb.sf_ro.ri_bits = mapiodev(&sc->sc_phys, CG2_PIXMAP_OFF,
round_page(sc->sc_sunfb.sf_fbsize));
sc->sc_sunfb.sf_ro.ri_hw = sc;
- fbwscons_init(&sc->sc_sunfb, isconsole);
+ fbwscons_init(&sc->sc_sunfb, isconsole ? 0 : RI_CLEAR);
fbwscons_setcolormap(&sc->sc_sunfb, cgtwo_setcolor);
cgtwo_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
diff --git a/sys/arch/sparc/dev/fb.c b/sys/arch/sparc/dev/fb.c
index 07a27db4c2e..16514738bff 100644
--- a/sys/arch/sparc/dev/fb.c
+++ b/sys/arch/sparc/dev/fb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fb.c,v 1.25 2003/06/28 14:26:16 miod Exp $ */
+/* $OpenBSD: fb.c,v 1.26 2003/06/28 17:05:33 miod Exp $ */
/* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */
/*
@@ -108,22 +108,18 @@ fb_unblank()
#if NWSDISPLAY > 0
void
-fb_setsize(sf, def_depth, def_width, def_height, node, bustype)
- struct sunfb *sf;
- int def_depth, def_width, def_height, node, bustype;
+fb_setsize(struct sunfb *sf, int def_depth, int def_width, int def_height,
+ int node, int bustype)
{
int def_linebytes;
- /*
- * The defaults below match my screen, but are not guaranteed
- * to be correct as defaults go...
- */
switch (bustype) {
case BUS_VME16:
case BUS_VME32:
case BUS_OBIO:
#if defined(SUN4M)
- if (CPU_ISSUN4M) { /* 4m has framebuffer on obio */
+ /* 4m may have SBus-like framebuffer on obio */
+ if (CPU_ISSUN4M) {
goto obpsize;
}
#endif
@@ -288,9 +284,7 @@ obpsize:
int a2int(char *, int);
int
-a2int(cp, deflt)
- char *cp;
- int deflt;
+a2int(char *cp, int deflt)
{
int i = 0;
@@ -302,16 +296,12 @@ a2int(cp, deflt)
}
void
-fbwscons_init(sf, isconsole)
- struct sunfb *sf;
- int isconsole;
+fbwscons_init(struct sunfb *sf, int flags)
{
int cols, rows;
/* ri_hw and ri_bits must have already been setup by caller */
- sf->sf_ro.ri_flg = RI_CENTER | RI_FULLCLEAR;
- if (!isconsole)
- sf->sf_ro.ri_flg |= RI_CLEAR;
+ sf->sf_ro.ri_flg = RI_CENTER | RI_FULLCLEAR | flags;
sf->sf_ro.ri_depth = sf->sf_depth;
sf->sf_ro.ri_stride = sf->sf_linebytes;
sf->sf_ro.ri_width = sf->sf_width;
@@ -331,9 +321,9 @@ fbwscons_init(sf, isconsole)
rows = (u_short)ep->eeTtyRows;
cols = (u_short)ep->eeTtyCols;
/* deal with broken nvram contents... */
- if (rows == 0)
+ if (rows <= 0)
rows = 34;
- if (cols == 0)
+ if (cols <= 0)
cols = 80;
} else {
rows = 34;
@@ -346,28 +336,27 @@ fbwscons_init(sf, isconsole)
}
void
-fbwscons_console_init(sf, wsc, row, burner)
- struct sunfb *sf;
- struct wsscreen_descr *wsc;
- int row;
- void (*burner)(void *, u_int, u_int);
+fbwscons_console_init(struct sunfb *sf, struct wsscreen_descr *wsc, int row,
+ void (*burner)(void *, u_int, u_int))
{
long defattr;
- int *ccolp, *crowp;
- if (CPU_ISSUN4 || romgetcursoraddr(&crowp, &ccolp))
- ccolp = crowp = NULL;
- if (ccolp != NULL)
- sf->sf_ro.ri_ccol = *ccolp;
+ if (CPU_ISSUN4 || romgetcursoraddr(&sf->sf_crowp, &sf->sf_ccolp))
+ sf->sf_ccolp = sf->sf_crowp = NULL;
+ if (sf->sf_ccolp != NULL)
+ sf->sf_ro.ri_ccol = *sf->sf_ccolp;
if (row < 0) {
- if (crowp != NULL)
- sf->sf_ro.ri_crow = *crowp;
+ if (sf->sf_crowp != NULL)
+ sf->sf_ro.ri_crow = *sf->sf_crowp;
else
/* assume last row */
sf->sf_ro.ri_crow = sf->sf_ro.ri_rows - 1;
- } else
+ } else {
sf->sf_ro.ri_crow = row;
+ if (sf->sf_crowp != NULL)
+ *sf->sf_crowp = row;
+ }
/*
* Scale back rows and columns if the font would not otherwise
@@ -406,9 +395,8 @@ fbwscons_console_init(sf, wsc, row, burner)
}
void
-fbwscons_setcolormap(sf, setcolor)
- struct sunfb *sf;
- void (*setcolor)(void *, u_int, u_int8_t, u_int8_t, u_int8_t);
+fbwscons_setcolormap(struct sunfb *sf,
+ void (*setcolor)(void *, u_int, u_int8_t, u_int8_t, u_int8_t))
{
int i;
u_char *color;
@@ -439,8 +427,7 @@ fbwscons_setcolormap(sf, setcolor)
* otherwise returns pfour ID
*/
int
-fb_pfour_id(va)
- void *va;
+fb_pfour_id(void *va)
{
volatile u_int32_t val, save, *pfour = va;
@@ -467,8 +454,7 @@ fb_pfour_id(va)
* Return the status of the video enable.
*/
int
-fb_pfour_get_video(sf)
- struct sunfb *sf;
+fb_pfour_get_video(struct sunfb *sf)
{
return ((*sf->sf_pfour & PFOUR_REG_VIDEO) != 0);
@@ -478,9 +464,7 @@ fb_pfour_get_video(sf)
* Enable or disable the framebuffer.
*/
void
-fb_pfour_set_video(sf, enable)
- struct sunfb *sf;
- int enable;
+fb_pfour_set_video(struct sunfb *sf, int enable)
{
volatile u_int32_t pfour;
diff --git a/sys/arch/sparc/dev/mgx.c b/sys/arch/sparc/dev/mgx.c
index 880ffeb23fd..c76ac76d465 100644
--- a/sys/arch/sparc/dev/mgx.c
+++ b/sys/arch/sparc/dev/mgx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mgx.c,v 1.4 2003/06/06 19:42:47 miod Exp $ */
+/* $OpenBSD: mgx.c,v 1.5 2003/06/28 17:05:33 miod Exp $ */
/*
* Copyright (c) 2003, Miodrag Vallat.
* All rights reserved.
@@ -204,7 +204,7 @@ mgxattach(struct device *parent, struct device *self, void *args)
0, round_page(sc->sc_sunfb.sf_fbsize));
sc->sc_sunfb.sf_ro.ri_hw = sc;
- fbwscons_init(&sc->sc_sunfb, isconsole);
+ fbwscons_init(&sc->sc_sunfb, isconsole ? 0 : RI_CLEAR);
bzero(sc->sc_cmap, sizeof(sc->sc_cmap));
fbwscons_setcolormap(&sc->sc_sunfb, mgx_setcolor);
diff --git a/sys/arch/sparc/dev/p9000.c b/sys/arch/sparc/dev/p9000.c
index fe128c5f8af..bc03bc341d6 100644
--- a/sys/arch/sparc/dev/p9000.c
+++ b/sys/arch/sparc/dev/p9000.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: p9000.c,v 1.2 2003/06/18 17:40:32 miod Exp $ */
+/* $OpenBSD: p9000.c,v 1.3 2003/06/28 17:05:33 miod Exp $ */
/*
* Copyright (c) 2003, Miodrag Vallat.
*
@@ -274,7 +274,7 @@ p9000attach(struct device *parent, struct device *self, void *args)
* XXX there should be a rasops "clear margins" feature
*/
fbwscons_init(&sc->sc_sunfb,
- isconsole && (sc->sc_sunfb.sf_width >= 1024));
+ isconsole && (sc->sc_sunfb.sf_width >= 1024) ? 0 : RI_CLEAR);
fbwscons_setcolormap(&sc->sc_sunfb, p9000_setcolor);
/*
diff --git a/sys/arch/sparc/dev/p9100.c b/sys/arch/sparc/dev/p9100.c
index eeaf1ed590e..776944b8f9d 100644
--- a/sys/arch/sparc/dev/p9100.c
+++ b/sys/arch/sparc/dev/p9100.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: p9100.c,v 1.23 2003/06/17 21:21:32 miod Exp $ */
+/* $OpenBSD: p9100.c,v 1.24 2003/06/28 17:05:33 miod Exp $ */
/*
* Copyright (c) 2003, Miodrag Vallat.
@@ -317,7 +317,7 @@ p9100attach(struct device *parent, struct device *self, void *args)
* XXX there should be a rasops "clear margins" feature
*/
fbwscons_init(&sc->sc_sunfb,
- isconsole && (sc->sc_sunfb.sf_width >= 1024));
+ isconsole && (sc->sc_sunfb.sf_width >= 1024) ? 0 : RI_CLEAR);
fbwscons_setcolormap(&sc->sc_sunfb, p9100_setcolor);
/*
diff --git a/sys/arch/sparc/dev/tcx.c b/sys/arch/sparc/dev/tcx.c
index fbdb9cad6f9..e263b8dcf65 100644
--- a/sys/arch/sparc/dev/tcx.c
+++ b/sys/arch/sparc/dev/tcx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcx.c,v 1.18 2003/06/15 21:04:11 miod Exp $ */
+/* $OpenBSD: tcx.c,v 1.19 2003/06/28 17:05:33 miod Exp $ */
/* $NetBSD: tcx.c,v 1.8 1997/07/29 09:58:14 fair Exp $ */
/*
@@ -263,7 +263,7 @@ tcxattach(parent, self, args)
sc->sc_sunfb.sf_ro.ri_hw = sc;
sc->sc_sunfb.sf_ro.ri_bits = (void *)sc->sc_dfb8;
- fbwscons_init(&sc->sc_sunfb, isconsole);
+ fbwscons_init(&sc->sc_sunfb, isconsole ? 0 : RI_CLEAR);
fbwscons_setcolormap(&sc->sc_sunfb, tcx_setcolor);
tcx_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
diff --git a/sys/arch/sparc/dev/tvtwo.c b/sys/arch/sparc/dev/tvtwo.c
index ebb832069f0..ef140851476 100644
--- a/sys/arch/sparc/dev/tvtwo.c
+++ b/sys/arch/sparc/dev/tvtwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tvtwo.c,v 1.2 2003/06/06 19:42:47 miod Exp $ */
+/* $OpenBSD: tvtwo.c,v 1.3 2003/06/28 17:05:33 miod Exp $ */
/*
* Copyright (c) 2003, Miodrag Vallat.
* All rights reserved.
@@ -246,7 +246,7 @@ tvtwoattach(struct device *parent, struct device *self, void *args)
tvtwo_initcmap(sc);
sc->sc_sunfb.sf_ro.ri_hw = sc;
- fbwscons_init(&sc->sc_sunfb, isconsole);
+ fbwscons_init(&sc->sc_sunfb, isconsole ? 0 : RI_CLEAR);
tvtwo_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
tvtwo_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
diff --git a/sys/arch/sparc/dev/vigra.c b/sys/arch/sparc/dev/vigra.c
index bb11b49b7dd..b1364e9a1b8 100644
--- a/sys/arch/sparc/dev/vigra.c
+++ b/sys/arch/sparc/dev/vigra.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vigra.c,v 1.8 2003/06/06 19:42:47 miod Exp $ */
+/* $OpenBSD: vigra.c,v 1.9 2003/06/28 17:05:33 miod Exp $ */
/*
* Copyright (c) 2002, 2003, Miodrag Vallat.
@@ -320,8 +320,8 @@ vigraattach(struct device *parent, struct device *self, void *args)
* vertically (why? no other frame buffer does this in such a mode!),
* so be lazy and clear the screen here too anyways...
*/
- fbwscons_init(&sc->sc_sunfb, isconsole &&
- (sc->sc_sunfb.sf_width != 800 && sc->sc_sunfb.sf_width != 1280));
+ fbwscons_init(&sc->sc_sunfb, isconsole && (sc->sc_sunfb.sf_width != 800
+ && sc->sc_sunfb.sf_width != 1280) ? 0 : RI_CLEAR);
fbwscons_setcolormap(&sc->sc_sunfb, vigra_setcolor);
vigra_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
diff --git a/sys/arch/sparc/dev/zx.c b/sys/arch/sparc/dev/zx.c
index 6a6db66c59c..e291f60101f 100644
--- a/sys/arch/sparc/dev/zx.c
+++ b/sys/arch/sparc/dev/zx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zx.c,v 1.4 2003/06/28 15:11:25 miod Exp $ */
+/* $OpenBSD: zx.c,v 1.5 2003/06/28 17:05:33 miod Exp $ */
/* $NetBSD: zx.c,v 1.5 2002/10/02 16:52:46 thorpej Exp $ */
/*
@@ -281,7 +281,7 @@ zx_attach(struct device *parent, struct device *self, void *args)
* below.
*/
sc->sc_sunfb.sf_depth = 32;
- fbwscons_init(&sc->sc_sunfb, isconsole);
+ fbwscons_init(&sc->sc_sunfb, isconsole ? 0 : RI_CLEAR);
sc->sc_sunfb.sf_depth = ri->ri_depth = 8;
ri->ri_ops.copyrows = zx_copyrows;