summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/dev/fb.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/sys/arch/sparc/dev/fb.c b/sys/arch/sparc/dev/fb.c
index cf38948d23f..430c36dcdf1 100644
--- a/sys/arch/sparc/dev/fb.c
+++ b/sys/arch/sparc/dev/fb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fb.c,v 1.41 2006/12/02 11:25:07 miod Exp $ */
+/* $OpenBSD: fb.c,v 1.42 2006/12/03 16:41:56 miod Exp $ */
/* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */
/*
@@ -375,6 +375,22 @@ fbwscons_init(struct sunfb *sf, int flags)
#endif
rasops_init(ri, rows, cols);
+
+ if (sf->sf_depth == 8) {
+ /*
+ * If we are running with an indexed palette, compensate
+ * the swap of black and white through ri_devcmap.
+ */
+ ri->ri_devcmap[WSCOL_SUN_BLACK] = 0;
+ ri->ri_devcmap[WSCOL_SUN_WHITE] = 0xffffffff;
+ } else if (sf->sf_depth > 8) {
+ /*
+ * If we are running on a direct color frame buffer,
+ * make the ``normal'' white the same as the hilighted
+ * white.
+ */
+ ri->ri_devcmap[WSCOL_WHITE] = ri->ri_devcmap[WSCOL_WHITE + 8];
+ }
}
void
@@ -422,22 +438,6 @@ fbwscons_console_init(struct sunfb *sf, int row)
(sf->sf_ccolp != NULL || sf->sf_crowp != NULL))
ri->ri_updatecursor = fb_updatecursor;
- if (sf->sf_depth == 8) {
- /*
- * If we are running with an indexed palette, compensate
- * the swap of black and white through ri_devcmap.
- */
- ri->ri_devcmap[WSCOL_SUN_BLACK] = 0;
- ri->ri_devcmap[WSCOL_SUN_WHITE] = 0xffffffff;
- } else if (sf->sf_depth > 8) {
- /*
- * If we are running on a direct color frame buffer,
- * make the ``normal'' white the same as the hilighted
- * white.
- */
- ri->ri_devcmap[WSCOL_WHITE] = ri->ri_devcmap[WSCOL_WHITE + 8];
- }
-
if (ISSET(ri->ri_caps, WSSCREEN_WSCOLORS))
ri->ri_ops.alloc_attr(ri,
WSCOL_BLACK, WSCOL_WHITE, WSATTR_WSCOLORS, &defattr);