diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-06-30 21:38:20 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-06-30 21:38:20 +0000 |
commit | b06dcbe12fcf1901e5515acc951a8c18ab23e8c6 (patch) | |
tree | b2474be510eb7efb17db69ee2c8f676d381958c1 /sys/dev | |
parent | 4c0ac263ded8f53c10fafb84a0cf047c25b626d4 (diff) |
For 32bit sun frame buffers, tweak ri_devcmap to get the BoW palette instead
of needing different WSCOL_{BLACK,WHITE} values than 8bit frame buffers.
This allows us to not special case the alloc_attr() invocations depending
on the color depth, and to make WSCOL_{BLACK,WHITE} constants again in the
wsemul_sun land.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/sbus/agten.c | 11 | ||||
-rw-r--r-- | sys/dev/wscons/wsdisplayvar.h | 11 | ||||
-rw-r--r-- | sys/dev/wscons/wsemul_sun.c | 10 |
3 files changed, 7 insertions, 25 deletions
diff --git a/sys/dev/sbus/agten.c b/sys/dev/sbus/agten.c index 2db079e7a6b..94a821f191c 100644 --- a/sys/dev/sbus/agten.c +++ b/sys/dev/sbus/agten.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agten.c,v 1.5 2006/06/02 20:00:56 miod Exp $ */ +/* $OpenBSD: agten.c,v 1.6 2006/06/30 21:38:19 miod Exp $ */ /* * Copyright (c) 2002, 2003, Miodrag Vallat. * All rights reserved. @@ -351,13 +351,8 @@ agten_alloc_screen(v, type, cookiep, curxp, curyp, attrp) *cookiep = &sc->sc_sunfb.sf_ro; *curyp = 0; *curxp = 0; - if (sc->sc_sunfb.sf_depth == 8) { - sc->sc_sunfb.sf_ro.ri_ops.alloc_attr(&sc->sc_sunfb.sf_ro, - WSCOL_BLACK, WSCOL_WHITE, WSATTR_WSCOLORS, attrp); - } else { - sc->sc_sunfb.sf_ro.ri_ops.alloc_attr(&sc->sc_sunfb.sf_ro, - 0, 0, 0, attrp); - } + sc->sc_sunfb.sf_ro.ri_ops.alloc_attr(&sc->sc_sunfb.sf_ro, + WSCOL_BLACK, WSCOL_WHITE, WSATTR_WSCOLORS, attrp); sc->sc_nscreens++; return (0); } diff --git a/sys/dev/wscons/wsdisplayvar.h b/sys/dev/wscons/wsdisplayvar.h index 3c4fde4c8a0..3f9cb984620 100644 --- a/sys/dev/wscons/wsdisplayvar.h +++ b/sys/dev/wscons/wsdisplayvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplayvar.h,v 1.17 2006/06/29 17:54:32 miod Exp $ */ +/* $OpenBSD: wsdisplayvar.h,v 1.18 2006/06/30 21:38:19 miod Exp $ */ /* $NetBSD: wsdisplayvar.h,v 1.30 2005/02/04 02:10:49 perry Exp $ */ /* @@ -68,8 +68,8 @@ struct wsdisplay_emulops { /* fg / bg values. Made identical to ANSI terminal color codes. */ /* XXX should be #if NWSEMUL_SUN > 1 */ #if defined(__sparc__) || defined(__sparc64__) -#define WSCOL_WHITE wscol_white -#define WSCOL_BLACK wscol_black +#define WSCOL_WHITE 0 +#define WSCOL_BLACK 15 #else #define WSCOL_BLACK 0 #define WSCOL_WHITE 7 @@ -89,11 +89,6 @@ struct wsdisplay_emulops { /* XXX need a free_attr() ??? */ }; -/* XXX should be #if NWSEMUL_SUN > 1 */ -#if defined(__sparc__) || defined(__sparc64__) -extern int wscol_white, wscol_black; -#endif - #define WSSCREEN_NAME_SIZE 16 struct wsscreen_descr { diff --git a/sys/dev/wscons/wsemul_sun.c b/sys/dev/wscons/wsemul_sun.c index dd58be25200..213c8c8c40f 100644 --- a/sys/dev/wscons/wsemul_sun.c +++ b/sys/dev/wscons/wsemul_sun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsemul_sun.c,v 1.14 2006/06/29 17:54:32 miod Exp $ */ +/* $OpenBSD: wsemul_sun.c,v 1.15 2006/06/30 21:38:19 miod Exp $ */ /* $NetBSD: wsemul_sun.c,v 1.11 2000/01/05 11:19:36 drochner Exp $ */ /* @@ -120,14 +120,6 @@ struct wsemul_sun_emuldata wsemul_sun_console_emuldata; #define COLS_LEFT (edp->ncols - 1 - edp->ccol) #define ROWS_LEFT (edp->nrows - 1 - edp->crow) -/* - * wscons color codes - * To compensate for Sun color choices on older framebuffers, these need to - * be variables. - */ -int wscol_white = 0; /* 0 */ -int wscol_black = 7; /* 255 */ - void wsemul_sun_init(edp, type, cookie, ccol, crow, defattr) struct wsemul_sun_emuldata *edp; |