summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-06-30 15:15:22 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-06-30 15:15:22 +0000
commit74629fd965d4d75bd77a487b171452fb272223b8 (patch)
treea6dd9cf55de6da6d605aa14b720d55fb606fdcba /sys/arch
parent15e35923d4e4901054de8e982825410c047f9512 (diff)
When allocating the default rasops attribute, it is not necessary to use
non-zero parameters on a color display as long as we want white on black; this was inherited from sparc but this is not necessary on these platforms.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hp300/dev/diofb.c14
-rw-r--r--sys/arch/mac68k/dev/macfb.c15
2 files changed, 6 insertions, 23 deletions
diff --git a/sys/arch/hp300/dev/diofb.c b/sys/arch/hp300/dev/diofb.c
index c3159e5b9b5..1464f677b6a 100644
--- a/sys/arch/hp300/dev/diofb.c
+++ b/sys/arch/hp300/dev/diofb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diofb.c,v 1.10 2006/03/12 22:52:59 miod Exp $ */
+/* $OpenBSD: diofb.c,v 1.11 2006/06/30 15:15:20 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat
@@ -287,11 +287,7 @@ diofb_cnattach(struct diofb *fb)
struct rasops_info *ri;
ri = &fb->ri;
- if (ri->ri_caps & WSSCREEN_WSCOLORS)
- ri->ri_ops.alloc_attr(ri, WSCOL_WHITE, WSCOL_BLACK,
- WSATTR_WSCOLORS, &defattr);
- else
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
+ ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
wsdisplay_cnattach(&fb->wsd, ri, 0, 0, defattr);
}
@@ -442,11 +438,7 @@ diofb_alloc_screen(void *v, const struct wsscreen_descr *type,
*cookiep = ri;
*curxp = *curyp = 0;
- if (ri->ri_caps & WSSCREEN_WSCOLORS)
- ri->ri_ops.alloc_attr(ri, WSCOL_WHITE, WSCOL_BLACK,
- WSATTR_WSCOLORS, attrp);
- else
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, attrp);
+ ri->ri_ops.alloc_attr(ri, 0, 0, 0, attrp);
fb->nscreens++;
return (0);
diff --git a/sys/arch/mac68k/dev/macfb.c b/sys/arch/mac68k/dev/macfb.c
index a72a2e3c1e2..9283f2a125c 100644
--- a/sys/arch/mac68k/dev/macfb.c
+++ b/sys/arch/mac68k/dev/macfb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macfb.c,v 1.16 2006/04/14 09:36:49 martin Exp $ */
+/* $OpenBSD: macfb.c,v 1.17 2006/06/30 15:15:21 miod Exp $ */
/* $NetBSD: macfb.c,v 1.11 2005/01/15 16:00:59 chs Exp $ */
/*
* Copyright (c) 1998 Matt DeBergalis
@@ -455,11 +455,7 @@ macfb_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep,
*cookiep = ri;
*curxp = *curyp = 0;
- if ((ri->ri_caps & WSSCREEN_WSCOLORS) && ri->ri_depth <= 8)
- ri->ri_ops.alloc_attr(ri, WSCOL_WHITE, WSCOL_BLACK,
- WSATTR_WSCOLORS, defattrp);
- else
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, defattrp);
+ ri->ri_ops.alloc_attr(ri, 0, 0, 0, defattrp);
sc->sc_dc->dc_nscreens++;
return (0);
@@ -569,12 +565,7 @@ macfb_cnattach()
return (-1);
ri = &dc->dc_ri;
- if ((ri->ri_caps & WSSCREEN_WSCOLORS) && ri->ri_depth <= 8)
- ri->ri_ops.alloc_attr(ri, WSCOL_WHITE, WSCOL_BLACK,
- WSATTR_WSCOLORS, &defattr);
- else
- ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
-
+ ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
wsdisplay_cnattach(&dc->dc_wsd, ri, 0, 0, defattr);
macfb_consaddr = mac68k_vidphys;