summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-12-03 16:41:59 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-12-03 16:41:59 +0000
commitb7168af93fb78357d61a31778d0cf52690b1cb9a (patch)
tree8f70ec98ef9e5c8261c9ab3019797241daf58afa /sys/arch/sparc/dev
parenta29b6f78d02770e3777700a3c4e872b2ae3db8af (diff)
Do the ri_devcmap reprogramming dance in fbwscons_init(), so that it applies
to non-console frame buffers as well.
Diffstat (limited to 'sys/arch/sparc/dev')
-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);