summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2002-09-23 18:13:40 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2002-09-23 18:13:40 +0000
commit9f57793bc6e166c2d6c5729c4cf132985f711c9c (patch)
treef3925ead21b40221616cc66be69a0bf5178668cb /sys
parent7f125e23dc888aa59d3858398f1d10c7022dd5c7 (diff)
Get the wsdisplay capabilities from rasops, rather than attempting to
guess them at compile-time. Plus this makes cgtwelve a bit more clean. ok fgs@ deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/dev/bwtwo.c7
-rw-r--r--sys/arch/sparc/dev/cgeight.c8
-rw-r--r--sys/arch/sparc/dev/cgfour.c8
-rw-r--r--sys/arch/sparc/dev/cgfourteen.c8
-rw-r--r--sys/arch/sparc/dev/cgsix.c8
-rw-r--r--sys/arch/sparc/dev/cgthree.c8
-rw-r--r--sys/arch/sparc/dev/cgtwelve.c30
-rw-r--r--sys/arch/sparc/dev/cgtwo.c8
-rw-r--r--sys/arch/sparc/dev/p9100.c8
-rw-r--r--sys/arch/sparc/dev/tcx.c8
-rw-r--r--sys/arch/sparc/dev/vigra.c8
11 files changed, 23 insertions, 86 deletions
diff --git a/sys/arch/sparc/dev/bwtwo.c b/sys/arch/sparc/dev/bwtwo.c
index fefb679b5eb..8933bba0303 100644
--- a/sys/arch/sparc/dev/bwtwo.c
+++ b/sys/arch/sparc/dev/bwtwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bwtwo.c,v 1.23 2002/09/09 22:15:15 miod Exp $ */
+/* $OpenBSD: bwtwo.c,v 1.24 2002/09/23 18:13:38 miod Exp $ */
/* $NetBSD: bwtwo.c,v 1.33 1997/05/24 20:16:02 pk Exp $ */
/*
@@ -99,10 +99,6 @@ struct bwtwo_softc {
struct wsscreen_descr bwtwo_stdscreen = {
"std",
- 0, 0, /* will be filled in */
- 0,
- 0, 0,
- WSSCREEN_UNDERLINE | WSSCREEN_REVERSE
};
const struct wsscreen_descr *bwtwo_scrlist[] = {
@@ -316,6 +312,7 @@ obp_name:
sc->sc_sunfb.sf_ro.ri_hw = sc;
fbwscons_init(&sc->sc_sunfb, isconsole);
+ bwtwo_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
bwtwo_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
bwtwo_stdscreen.ncols = sc->sc_sunfb.sf_ro.ri_cols;
bwtwo_stdscreen.textops = &sc->sc_sunfb.sf_ro.ri_ops;
diff --git a/sys/arch/sparc/dev/cgeight.c b/sys/arch/sparc/dev/cgeight.c
index c68765753bd..3296fb51589 100644
--- a/sys/arch/sparc/dev/cgeight.c
+++ b/sys/arch/sparc/dev/cgeight.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgeight.c,v 1.15 2002/09/09 22:15:15 miod Exp $ */
+/* $OpenBSD: cgeight.c,v 1.16 2002/09/23 18:13:38 miod Exp $ */
/* $NetBSD: cgeight.c,v 1.13 1997/05/24 20:16:04 pk Exp $ */
/*
@@ -94,11 +94,6 @@ struct cgeight_softc {
struct wsscreen_descr cgeight_stdscreen = {
"std",
- 0, 0, /* will be filled in */
- 0,
- 0, 0,
- WSSCREEN_UNDERLINE | WSSCREEN_HILIT |
- WSSCREEN_REVERSE | WSSCREEN_WSCOLORS
};
const struct wsscreen_descr *cgeight_scrlist[] = {
@@ -239,6 +234,7 @@ cgeightattach(parent, self, args)
PFOUR_COLOR_OFF_OVERLAY, round_page(sc->sc_sunfb.sf_fbsize));
fbwscons_init(&sc->sc_sunfb, isconsole);
+ cgeight_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
cgeight_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
cgeight_stdscreen.ncols = sc->sc_sunfb.sf_ro.ri_cols;
cgeight_stdscreen.textops = &sc->sc_sunfb.sf_ro.ri_ops;
diff --git a/sys/arch/sparc/dev/cgfour.c b/sys/arch/sparc/dev/cgfour.c
index a8977b30e39..e38f1947018 100644
--- a/sys/arch/sparc/dev/cgfour.c
+++ b/sys/arch/sparc/dev/cgfour.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgfour.c,v 1.15 2002/09/09 22:15:16 miod Exp $ */
+/* $OpenBSD: cgfour.c,v 1.16 2002/09/23 18:13:38 miod Exp $ */
/* $NetBSD: cgfour.c,v 1.13 1997/05/24 20:16:06 pk Exp $ */
/*
@@ -98,11 +98,6 @@ struct cgfour_softc {
struct wsscreen_descr cgfour_stdscreen = {
"std",
- 0, 0, /* will be filled in */
- 0,
- 0, 0,
- WSSCREEN_UNDERLINE | WSSCREEN_HILIT |
- WSSCREEN_REVERSE | WSSCREEN_WSCOLORS
};
const struct wsscreen_descr *cgfour_scrlist[] = {
@@ -252,6 +247,7 @@ cgfourattach(parent, self, args)
sc->sc_sunfb.sf_ro.ri_hw = sc;
fbwscons_init(&sc->sc_sunfb, isconsole);
+ cgfour_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
cgfour_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
cgfour_stdscreen.ncols = sc->sc_sunfb.sf_ro.ri_cols;
cgfour_stdscreen.textops = &sc->sc_sunfb.sf_ro.ri_ops;
diff --git a/sys/arch/sparc/dev/cgfourteen.c b/sys/arch/sparc/dev/cgfourteen.c
index 0e747f8ca6d..d9456e30555 100644
--- a/sys/arch/sparc/dev/cgfourteen.c
+++ b/sys/arch/sparc/dev/cgfourteen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgfourteen.c,v 1.15 2002/09/20 11:17:56 fgsch Exp $ */
+/* $OpenBSD: cgfourteen.c,v 1.16 2002/09/23 18:13:38 miod Exp $ */
/* $NetBSD: cgfourteen.c,v 1.7 1997/05/24 20:16:08 pk Exp $ */
/*
@@ -136,11 +136,6 @@ struct cgfourteen_softc {
struct wsscreen_descr cgfourteen_stdscreen = {
"std",
- 0, 0, /* will be filled in */
- 0,
- 0, 0,
- WSSCREEN_UNDERLINE | WSSCREEN_HILIT |
- WSSCREEN_REVERSE | WSSCREEN_WSCOLORS
};
const struct wsscreen_descr *cgfourteen_scrlist[] = {
@@ -331,6 +326,7 @@ cgfourteenattach(parent, self, args)
sc->sc_sunfb.sf_ro.ri_hw = sc;
fbwscons_init(&sc->sc_sunfb, isconsole);
+ cgfourteen_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
cgfourteen_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
cgfourteen_stdscreen.ncols = sc->sc_sunfb.sf_ro.ri_cols;
cgfourteen_stdscreen.textops = &sc->sc_sunfb.sf_ro.ri_ops;
diff --git a/sys/arch/sparc/dev/cgsix.c b/sys/arch/sparc/dev/cgsix.c
index c8b0a00bc70..667579fa7b4 100644
--- a/sys/arch/sparc/dev/cgsix.c
+++ b/sys/arch/sparc/dev/cgsix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgsix.c,v 1.20 2002/09/09 22:15:16 miod Exp $ */
+/* $OpenBSD: cgsix.c,v 1.21 2002/09/23 18:13:38 miod Exp $ */
/* $NetBSD: cgsix.c,v 1.33 1997/08/07 19:12:30 pk Exp $ */
/*
@@ -135,11 +135,6 @@ struct cgsix_softc {
struct wsscreen_descr cgsix_stdscreen = {
"std",
- 0, 0, /* will be filled in */
- 0,
- 0, 0,
- WSSCREEN_UNDERLINE | WSSCREEN_HILIT |
- WSSCREEN_REVERSE | WSSCREEN_WSCOLORS
};
const struct wsscreen_descr *cgsix_scrlist[] = {
@@ -367,6 +362,7 @@ cgsixattach(parent, self, args)
cgsix_ras_init(sc);
}
+ cgsix_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
cgsix_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
cgsix_stdscreen.ncols = sc->sc_sunfb.sf_ro.ri_cols;
cgsix_stdscreen.textops = &sc->sc_sunfb.sf_ro.ri_ops;
diff --git a/sys/arch/sparc/dev/cgthree.c b/sys/arch/sparc/dev/cgthree.c
index 81687a4ae36..345565140e5 100644
--- a/sys/arch/sparc/dev/cgthree.c
+++ b/sys/arch/sparc/dev/cgthree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgthree.c,v 1.16 2002/09/09 22:15:16 miod Exp $ */
+/* $OpenBSD: cgthree.c,v 1.17 2002/09/23 18:13:38 miod Exp $ */
/* $NetBSD: cgthree.c,v 1.33 1997/05/24 20:16:11 pk Exp $ */
/*
@@ -126,11 +126,6 @@ struct cgthree_softc {
struct wsscreen_descr cgthree_stdscreen = {
"std",
- 0, 0, /* will be filled in */
- 0,
- 0, 0,
- WSSCREEN_UNDERLINE | WSSCREEN_HILIT |
- WSSCREEN_REVERSE | WSSCREEN_WSCOLORS
};
const struct wsscreen_descr *cgthree_scrlist[] = {
@@ -325,6 +320,7 @@ cgthreeattach(parent, self, args)
sc->sc_sunfb.sf_ro.ri_hw = sc;
fbwscons_init(&sc->sc_sunfb, isconsole);
+ cgthree_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
cgthree_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
cgthree_stdscreen.ncols = sc->sc_sunfb.sf_ro.ri_cols;
cgthree_stdscreen.textops = &sc->sc_sunfb.sf_ro.ri_ops;
diff --git a/sys/arch/sparc/dev/cgtwelve.c b/sys/arch/sparc/dev/cgtwelve.c
index 0b036b3f71c..a2e29bbc8bc 100644
--- a/sys/arch/sparc/dev/cgtwelve.c
+++ b/sys/arch/sparc/dev/cgtwelve.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgtwelve.c,v 1.3 2002/09/20 11:17:56 fgsch Exp $ */
+/* $OpenBSD: cgtwelve.c,v 1.4 2002/09/23 18:13:38 miod Exp $ */
/*
* Copyright (c) 2002 Miodrag Vallat. All rights reserved.
@@ -92,39 +92,17 @@ struct cgtwelve_softc {
struct wsscreen_descr cgtwelve_stdscreen = {
"std",
- 0, 0, /* will be filled in */
- 0,
- 0, 0,
- WSSCREEN_UNDERLINE | WSSCREEN_HILIT |
- WSSCREEN_REVERSE | WSSCREEN_WSCOLORS
-};
-
-struct wsscreen_descr cgtwelve_monoscreen = {
- "std",
- 0, 0, /* will be filled in */
- 0,
- 0, 0,
- WSSCREEN_UNDERLINE | WSSCREEN_REVERSE
};
const struct wsscreen_descr *cgtwelve_scrlist[] = {
&cgtwelve_stdscreen,
};
-const struct wsscreen_descr *cgtwelve_monoscrlist[] = {
- &cgtwelve_monoscreen,
-};
-
struct wsscreen_list cgtwelve_screenlist = {
sizeof(cgtwelve_scrlist) / sizeof(struct wsscreen_descr *),
cgtwelve_scrlist
};
-struct wsscreen_list cgtwelve_monoscreenlist = {
- sizeof(cgtwelve_monoscrlist) / sizeof(struct wsscreen_descr *),
- cgtwelve_monoscrlist
-};
-
int cgtwelve_ioctl(void *, u_long, caddr_t, int, struct proc *);
int cgtwelve_alloc_screen(void *, const struct wsscreen_descr *, void **,
int *, int *, long *);
@@ -274,6 +252,7 @@ cgtwelveattach(parent, self, args)
sc->sc_sunfb.sf_ro.ri_hw = sc;
fbwscons_init(&sc->sc_sunfb, isconsole);
+ cgtwelve_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
cgtwelve_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
cgtwelve_stdscreen.ncols = sc->sc_sunfb.sf_ro.ri_cols;
cgtwelve_stdscreen.textops = &sc->sc_sunfb.sf_ro.ri_ops;
@@ -302,10 +281,7 @@ cgtwelveattach(parent, self, args)
printf("\n");
waa.console = isconsole;
- if (sc->sc_sunfb.sf_depth == 1)
- waa.scrdata = &cgtwelve_monoscreenlist;
- else
- waa.scrdata = &cgtwelve_screenlist;
+ waa.scrdata = &cgtwelve_screenlist;
waa.accessops = &cgtwelve_accessops;
waa.accesscookie = sc;
config_found(self, &waa, wsemuldisplaydevprint);
diff --git a/sys/arch/sparc/dev/cgtwo.c b/sys/arch/sparc/dev/cgtwo.c
index 53f34837b46..7d891956c48 100644
--- a/sys/arch/sparc/dev/cgtwo.c
+++ b/sys/arch/sparc/dev/cgtwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgtwo.c,v 1.23 2002/09/09 22:15:16 miod Exp $ */
+/* $OpenBSD: cgtwo.c,v 1.24 2002/09/23 18:13:38 miod Exp $ */
/* $NetBSD: cgtwo.c,v 1.22 1997/05/24 20:16:12 pk Exp $ */
/*
@@ -119,11 +119,6 @@ struct cgtwo_softc {
struct wsscreen_descr cgtwo_stdscreen = {
"std",
- 0, 0, /* will be filled in */
- 0,
- 0, 0,
- WSSCREEN_UNDERLINE | WSSCREEN_HILIT |
- WSSCREEN_REVERSE | WSSCREEN_WSCOLORS
};
const struct wsscreen_descr *cgtwo_scrlist[] = {
@@ -270,6 +265,7 @@ cgtwoattach(parent, self, args)
sc->sc_sunfb.sf_ro.ri_hw = sc;
fbwscons_init(&sc->sc_sunfb, isconsole);
+ cgtwo_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
cgtwo_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
cgtwo_stdscreen.ncols = sc->sc_sunfb.sf_ro.ri_cols;
cgtwo_stdscreen.textops = &sc->sc_sunfb.sf_ro.ri_ops;
diff --git a/sys/arch/sparc/dev/p9100.c b/sys/arch/sparc/dev/p9100.c
index 7fdabfa4e64..b1141c00ef9 100644
--- a/sys/arch/sparc/dev/p9100.c
+++ b/sys/arch/sparc/dev/p9100.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: p9100.c,v 1.9 2002/09/09 22:15:16 miod Exp $ */
+/* $OpenBSD: p9100.c,v 1.10 2002/09/23 18:13:38 miod Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -84,11 +84,6 @@ struct p9100_softc {
struct wsscreen_descr p9100_stdscreen = {
"std",
- 0, 0, /* will be filled in */
- 0,
- 0, 0,
- WSSCREEN_UNDERLINE | WSSCREEN_HILIT |
- WSSCREEN_REVERSE | WSSCREEN_WSCOLORS
};
const struct wsscreen_descr *p9100_scrlist[] = {
@@ -290,6 +285,7 @@ p9100attach(parent, self, args)
sc->sc_sunfb.sf_ro.ri_hw = sc;
fbwscons_init(&sc->sc_sunfb, isconsole);
+ p9100_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
p9100_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
p9100_stdscreen.ncols = sc->sc_sunfb.sf_ro.ri_cols;
p9100_stdscreen.textops = &sc->sc_sunfb.sf_ro.ri_ops;
diff --git a/sys/arch/sparc/dev/tcx.c b/sys/arch/sparc/dev/tcx.c
index a0bfbb93611..9bc310e11c6 100644
--- a/sys/arch/sparc/dev/tcx.c
+++ b/sys/arch/sparc/dev/tcx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcx.c,v 1.9 2002/09/20 11:17:56 fgsch Exp $ */
+/* $OpenBSD: tcx.c,v 1.10 2002/09/23 18:13:39 miod Exp $ */
/* $NetBSD: tcx.c,v 1.8 1997/07/29 09:58:14 fair Exp $ */
/*
@@ -110,11 +110,6 @@ struct tcx_softc {
struct wsscreen_descr tcx_stdscreen = {
"std",
- 0, 0, /* will be filled in */
- 0,
- 0, 0,
- WSSCREEN_UNDERLINE | WSSCREEN_HILIT |
- WSSCREEN_REVERSE | WSSCREEN_WSCOLORS
};
const struct wsscreen_descr *tcx_scrlist[] = {
@@ -279,6 +274,7 @@ tcxattach(parent, self, args)
sc->sc_sunfb.sf_ro.ri_hw = sc;
fbwscons_init(&sc->sc_sunfb, isconsole);
+ tcx_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
tcx_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
tcx_stdscreen.ncols = sc->sc_sunfb.sf_ro.ri_cols;
tcx_stdscreen.textops = &sc->sc_sunfb.sf_ro.ri_ops;
diff --git a/sys/arch/sparc/dev/vigra.c b/sys/arch/sparc/dev/vigra.c
index a7d9685d456..7ab91b8fb8e 100644
--- a/sys/arch/sparc/dev/vigra.c
+++ b/sys/arch/sparc/dev/vigra.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vigra.c,v 1.2 2002/09/09 22:15:16 miod Exp $ */
+/* $OpenBSD: vigra.c,v 1.3 2002/09/23 18:13:39 miod Exp $ */
/*
* Copyright (c) 2002 Miodrag Vallat. All rights reserved.
@@ -106,11 +106,6 @@ struct vigra_softc {
struct wsscreen_descr vigra_stdscreen = {
"std",
- 0, 0, /* will be filled in */
- 0,
- 0, 0,
- WSSCREEN_UNDERLINE | WSSCREEN_HILIT |
- WSSCREEN_REVERSE | WSSCREEN_WSCOLORS
};
const struct wsscreen_descr *vigra_scrlist[] = {
@@ -249,6 +244,7 @@ vigraattach(parent, self, args)
fbwscons_init(&sc->sc_sunfb,
isconsole && (sc->sc_sunfb.sf_width != 800));
+ vigra_stdscreen.capabilities = sc->sc_sunfb.sf_ro.ri_caps;
vigra_stdscreen.nrows = sc->sc_sunfb.sf_ro.ri_rows;
vigra_stdscreen.ncols = sc->sc_sunfb.sf_ro.ri_cols;
vigra_stdscreen.textops = &sc->sc_sunfb.sf_ro.ri_ops;