diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-12-03 16:41:59 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-12-03 16:41:59 +0000 |
commit | b7168af93fb78357d61a31778d0cf52690b1cb9a (patch) | |
tree | 8f70ec98ef9e5c8261c9ab3019797241daf58afa /sys/arch | |
parent | a29b6f78d02770e3777700a3c4e872b2ae3db8af (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')
-rw-r--r-- | sys/arch/sparc/dev/fb.c | 34 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/fb.c | 34 |
2 files changed, 34 insertions, 34 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); diff --git a/sys/arch/sparc64/dev/fb.c b/sys/arch/sparc64/dev/fb.c index d189f340bbd..95e2dc0cb3c 100644 --- a/sys/arch/sparc64/dev/fb.c +++ b/sys/arch/sparc64/dev/fb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fb.c,v 1.15 2006/12/02 11:25:09 miod Exp $ */ +/* $OpenBSD: fb.c,v 1.16 2006/12/03 16:41:58 miod Exp $ */ /* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */ /* @@ -192,6 +192,22 @@ fbwscons_init(struct sunfb *sf, int flags) cols = a2int(getpropstring(optionsnode, "screen-#columns"), 80); 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 highlighted + * white. + */ + ri->ri_devcmap[WSCOL_WHITE] = ri->ri_devcmap[WSCOL_WHITE + 8]; + } } void @@ -239,22 +255,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 highlighted - * 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); |