diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-11-29 12:13:56 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-11-29 12:13:56 +0000 |
commit | fb2255fc8756c12ec3557ef061587f1ffdb3fcc5 (patch) | |
tree | 2979602a939896459f2502111118521c6012ac2d | |
parent | afe56911378491afdcb3a537d27aa1860371ba7b (diff) |
Add a new member to struct wsemuldisplaydev_attach_args, for a frame buffer
driver to be able to tell how many wscons screens to attach to it,
instead of WSDISPLAY_DEFAULTSCREENS which is a global setting.
-rw-r--r-- | sys/arch/alpha/tc/cfb.c | 3 | ||||
-rw-r--r-- | sys/arch/alpha/tc/sfb.c | 3 | ||||
-rw-r--r-- | sys/arch/hp300/dev/diofb.c | 3 | ||||
-rw-r--r-- | sys/arch/luna88k/dev/lunafb.c | 3 | ||||
-rw-r--r-- | sys/arch/mac68k/dev/macfb.c | 3 | ||||
-rw-r--r-- | sys/arch/macppc/pci/vgafb.c | 3 | ||||
-rw-r--r-- | sys/arch/sparc/dev/fb.c | 3 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/fb.c | 3 | ||||
-rw-r--r-- | sys/arch/vax/vsa/gpx.c | 3 | ||||
-rw-r--r-- | sys/arch/vax/vsa/lcg.c | 3 | ||||
-rw-r--r-- | sys/arch/vax/vsa/lcspx.c | 3 | ||||
-rw-r--r-- | sys/arch/vax/vsa/smg.c | 3 | ||||
-rw-r--r-- | sys/arch/zaurus/zaurus/zaurus_lcd.c | 3 | ||||
-rw-r--r-- | sys/dev/ic/sti.c | 3 | ||||
-rw-r--r-- | sys/dev/ic/vga.c | 3 | ||||
-rw-r--r-- | sys/dev/isa/ega.c | 3 | ||||
-rw-r--r-- | sys/dev/isa/pcdisplay.c | 3 | ||||
-rw-r--r-- | sys/dev/pci/tga.c | 3 | ||||
-rw-r--r-- | sys/dev/pcmcia/cfxga.c | 4 | ||||
-rw-r--r-- | sys/dev/wscons/wsdisplay.c | 16 | ||||
-rw-r--r-- | sys/dev/wscons/wsdisplayvar.h | 3 |
21 files changed, 49 insertions, 28 deletions
diff --git a/sys/arch/alpha/tc/cfb.c b/sys/arch/alpha/tc/cfb.c index 498a8582feb..fd9f4eb7280 100644 --- a/sys/arch/alpha/tc/cfb.c +++ b/sys/arch/alpha/tc/cfb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cfb.c,v 1.17 2006/07/12 15:36:04 martin Exp $ */ +/* $OpenBSD: cfb.c,v 1.18 2006/11/29 12:13:51 miod Exp $ */ /* $NetBSD: cfb.c,v 1.7 1996/12/05 01:39:39 cgd Exp $ */ /* @@ -227,6 +227,7 @@ cfbattach(parent, self, aux) waa.scrdata = &cfb_screenlist; waa.accessops = &cfb_accessops; waa.accesscookie = sc; + waa.defaultscreens = 0; config_found(self, &waa, wsemuldisplaydevprint); } diff --git a/sys/arch/alpha/tc/sfb.c b/sys/arch/alpha/tc/sfb.c index 64dc2653fa3..cd4d937d40d 100644 --- a/sys/arch/alpha/tc/sfb.c +++ b/sys/arch/alpha/tc/sfb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sfb.c,v 1.17 2006/07/12 15:36:04 martin Exp $ */ +/* $OpenBSD: sfb.c,v 1.18 2006/11/29 12:13:51 miod Exp $ */ /* $NetBSD: sfb.c,v 1.7 1996/12/05 01:39:44 cgd Exp $ */ /* @@ -272,6 +272,7 @@ sfbattach(parent, self, aux) waa.scrdata = &sfb_screenlist; waa.accessops = &sfb_accessops; waa.accesscookie = sc; + waa.defaultscreens = 0; config_found(self, &waa, wsemuldisplaydevprint); } diff --git a/sys/arch/hp300/dev/diofb.c b/sys/arch/hp300/dev/diofb.c index 56057bcdaa8..2716ff48d48 100644 --- a/sys/arch/hp300/dev/diofb.c +++ b/sys/arch/hp300/dev/diofb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diofb.c,v 1.14 2006/08/11 18:33:13 miod Exp $ */ +/* $OpenBSD: diofb.c,v 1.15 2006/11/29 12:13:54 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -320,6 +320,7 @@ diofb_end_attach(void *sc, struct wsdisplay_accessops *accessops, waa.scrdata = &fb->wsl; waa.accessops = accessops; waa.accesscookie = fb; + waa.defaultscreens = 0; config_found((struct device *)sc, &waa, wsemuldisplaydevprint); } diff --git a/sys/arch/luna88k/dev/lunafb.c b/sys/arch/luna88k/dev/lunafb.c index a2b28962a0d..3d73d2b540a 100644 --- a/sys/arch/luna88k/dev/lunafb.c +++ b/sys/arch/luna88k/dev/lunafb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lunafb.c,v 1.7 2006/08/06 13:04:33 miod Exp $ */ +/* $OpenBSD: lunafb.c,v 1.8 2006/11/29 12:13:54 miod Exp $ */ /* $NetBSD: lunafb.c,v 1.7.6.1 2002/08/07 01:48:34 lukem Exp $ */ /*- @@ -216,6 +216,7 @@ omfbattach(parent, self, args) waa.scrdata = &omfb_screenlist; waa.accessops = &omfb_accessops; waa.accesscookie = sc; + waa.defaultscreens = 0; config_found(self, &waa, wsemuldisplaydevprint); } diff --git a/sys/arch/mac68k/dev/macfb.c b/sys/arch/mac68k/dev/macfb.c index 9283f2a125c..a9219860533 100644 --- a/sys/arch/mac68k/dev/macfb.c +++ b/sys/arch/mac68k/dev/macfb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: macfb.c,v 1.17 2006/06/30 15:15:21 miod Exp $ */ +/* $OpenBSD: macfb.c,v 1.18 2006/11/29 12:13:54 miod Exp $ */ /* $NetBSD: macfb.c,v 1.11 2005/01/15 16:00:59 chs Exp $ */ /* * Copyright (c) 1998 Matt DeBergalis @@ -369,6 +369,7 @@ macfb_attach_common(struct macfb_softc *sc, struct macfb_devconfig *dc) waa.scrdata = &dc->dc_screenlist; waa.accessops = &macfb_accessops; waa.accesscookie = sc; + waa.defaultscreens = 0; config_found((struct device *)sc, &waa, wsemuldisplaydevprint); } diff --git a/sys/arch/macppc/pci/vgafb.c b/sys/arch/macppc/pci/vgafb.c index 536121e635b..01cc9a2a226 100644 --- a/sys/arch/macppc/pci/vgafb.c +++ b/sys/arch/macppc/pci/vgafb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vgafb.c,v 1.31 2006/05/30 20:59:56 matthieu Exp $ */ +/* $OpenBSD: vgafb.c,v 1.32 2006/11/29 12:13:54 miod Exp $ */ /* $NetBSD: vga.c,v 1.3 1996/12/02 22:24:54 cgd Exp $ */ /* @@ -221,6 +221,7 @@ vgafb_wsdisplay_attach(struct device *parent, struct vgafb_config *vc, aa.scrdata = &vgafb_screenlist; aa.accessops = &vgafb_accessops; aa.accesscookie = vc; + aa.defaultscreens = 0; /* no need to keep the burner function if no hw support */ if (cons_backlight_available == 0) diff --git a/sys/arch/sparc/dev/fb.c b/sys/arch/sparc/dev/fb.c index cbf911e435c..36bac1da16c 100644 --- a/sys/arch/sparc/dev/fb.c +++ b/sys/arch/sparc/dev/fb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fb.c,v 1.39 2006/07/01 16:15:58 miod Exp $ */ +/* $OpenBSD: fb.c,v 1.40 2006/11/29 12:13:54 miod Exp $ */ /* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */ /* @@ -491,6 +491,7 @@ fbwscons_attach(struct sunfb *sf, struct wsdisplay_accessops *op, int isconsole) waa.scrdata = &sf->sf_wsl; waa.accessops = op; waa.accesscookie = sf; + waa.defaultscreens = 0; config_found(&sf->sf_dev, &waa, wsemuldisplaydevprint); } diff --git a/sys/arch/sparc64/dev/fb.c b/sys/arch/sparc64/dev/fb.c index ffcc950b0f2..114f162821d 100644 --- a/sys/arch/sparc64/dev/fb.c +++ b/sys/arch/sparc64/dev/fb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fb.c,v 1.13 2006/07/01 16:15:59 miod Exp $ */ +/* $OpenBSD: fb.c,v 1.14 2006/11/29 12:13:54 miod Exp $ */ /* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */ /* @@ -300,6 +300,7 @@ fbwscons_attach(struct sunfb *sf, struct wsdisplay_accessops *op, int isconsole) waa.scrdata = &sf->sf_wsl; waa.accessops = op; waa.accesscookie = sf; + waa.defaultscreens = 0; config_found(&sf->sf_dev, &waa, wsemuldisplaydevprint); } diff --git a/sys/arch/vax/vsa/gpx.c b/sys/arch/vax/vsa/gpx.c index 366c013d133..7e8bc47b617 100644 --- a/sys/arch/vax/vsa/gpx.c +++ b/sys/arch/vax/vsa/gpx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpx.c,v 1.14 2006/11/05 14:41:18 miod Exp $ */ +/* $OpenBSD: gpx.c,v 1.15 2006/11/29 12:13:54 miod Exp $ */ /* * Copyright (c) 2006 Miodrag Vallat. * @@ -357,6 +357,7 @@ gpx_attach(struct device *parent, struct device *self, void *aux) aa.scrdata = &gpx_screenlist; aa.accessops = &gpx_accessops; aa.accesscookie = sc; + aa.defaultscreens = 0; config_found(self, &aa, wsemuldisplaydevprint); diff --git a/sys/arch/vax/vsa/lcg.c b/sys/arch/vax/vsa/lcg.c index 7629aa0a6c2..d06f34fb6d6 100644 --- a/sys/arch/vax/vsa/lcg.c +++ b/sys/arch/vax/vsa/lcg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lcg.c,v 1.9 2006/08/22 21:05:03 miod Exp $ */ +/* $OpenBSD: lcg.c,v 1.10 2006/11/29 12:13:54 miod Exp $ */ /* * Copyright (c) 2006 Miodrag Vallat. * @@ -295,6 +295,7 @@ lcg_attach(struct device *parent, struct device *self, void *aux) aa.scrdata = &lcg_screenlist; aa.accessops = &lcg_accessops; aa.accesscookie = sc; + aa.defaultscreens = 0; config_found(self, &aa, wsemuldisplaydevprint); return; diff --git a/sys/arch/vax/vsa/lcspx.c b/sys/arch/vax/vsa/lcspx.c index bcf7c62dea2..df4d91c8a03 100644 --- a/sys/arch/vax/vsa/lcspx.c +++ b/sys/arch/vax/vsa/lcspx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lcspx.c,v 1.10 2006/08/27 16:55:41 miod Exp $ */ +/* $OpenBSD: lcspx.c,v 1.11 2006/11/29 12:13:54 miod Exp $ */ /* * Copyright (c) 2006 Miodrag Vallat. * @@ -275,6 +275,7 @@ lcspx_attach(struct device *parent, struct device *self, void *aux) aa.scrdata = &lcspx_screenlist; aa.accessops = &lcspx_accessops; aa.accesscookie = sc; + aa.defaultscreens = 0; config_found(self, &aa, wsemuldisplaydevprint); return; diff --git a/sys/arch/vax/vsa/smg.c b/sys/arch/vax/vsa/smg.c index d545a609529..2c7a288b627 100644 --- a/sys/arch/vax/vsa/smg.c +++ b/sys/arch/vax/vsa/smg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smg.c,v 1.17 2006/08/05 16:57:42 miod Exp $ */ +/* $OpenBSD: smg.c,v 1.18 2006/11/29 12:13:54 miod Exp $ */ /* $NetBSD: smg.c,v 1.21 2000/03/23 06:46:44 thorpej Exp $ */ /* * Copyright (c) 2006, Miodrag Vallat @@ -326,6 +326,7 @@ smg_attach(struct device *parent, struct device *self, void *aux) aa.scrdata = &smg_screenlist; aa.accessops = &smg_accessops; aa.accesscookie = sc; + aa.defaultscreens = 0; config_found(self, &aa, wsemuldisplaydevprint); } diff --git a/sys/arch/zaurus/zaurus/zaurus_lcd.c b/sys/arch/zaurus/zaurus/zaurus_lcd.c index 809bf63eacf..058ba10dc92 100644 --- a/sys/arch/zaurus/zaurus/zaurus_lcd.c +++ b/sys/arch/zaurus/zaurus/zaurus_lcd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zaurus_lcd.c,v 1.20 2006/06/02 20:50:14 miod Exp $ */ +/* $OpenBSD: zaurus_lcd.c,v 1.21 2006/11/29 12:13:54 miod Exp $ */ /* $NetBSD: lubbock_lcd.c,v 1.1 2003/08/09 19:38:53 bsh Exp $ */ /* @@ -185,6 +185,7 @@ lcd_attach(struct device *parent, struct device *self, void *aux) aa.scrdata = &lcd_screen_list; aa.accessops = &lcd_accessops; aa.accesscookie = sc; + aa.defaultscreens = 0; (void)config_found(self, &aa, wsemuldisplaydevprint); diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c index 7e6afa2e8b4..500aa22e873 100644 --- a/sys/dev/ic/sti.c +++ b/sys/dev/ic/sti.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sti.c,v 1.44 2006/08/22 21:04:32 miod Exp $ */ +/* $OpenBSD: sti.c,v 1.45 2006/11/29 12:13:54 miod Exp $ */ /* * Copyright (c) 2000-2003 Michael Shalayeff @@ -467,6 +467,7 @@ sti_end_attach(void *v) waa.scrdata = &sti_default_screenlist; waa.accessops = &sti_accessops; waa.accesscookie = sc; + waa.defaultscreens = 0; /* attach as console if required */ if (waa.console && !ISSET(sc->sc_flags, STI_ATTACHED)) { diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c index 884dddf39e9..c5489d3df46 100644 --- a/sys/dev/ic/vga.c +++ b/sys/dev/ic/vga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga.c,v 1.39 2006/09/29 19:46:02 miod Exp $ */ +/* $OpenBSD: vga.c,v 1.40 2006/11/29 12:13:54 miod Exp $ */ /* $NetBSD: vga.c,v 1.28.2.1 2000/06/30 16:27:47 simonb Exp $ */ /* @@ -532,6 +532,7 @@ vga_extended_attach(self, iot, memt, type, map) aa.scrdata = (vc->hdl.vh_mono ? &vga_screenlist_mono : &vga_screenlist); aa.accessops = &vga_accessops; aa.accesscookie = vc; + aa.defaultscreens = 0; config_found(self, &aa, wsemuldisplaydevprint); } diff --git a/sys/dev/isa/ega.c b/sys/dev/isa/ega.c index f0c4bb7448b..4be901605cb 100644 --- a/sys/dev/isa/ega.c +++ b/sys/dev/isa/ega.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ega.c,v 1.8 2006/09/29 19:46:04 miod Exp $ */ +/* $OpenBSD: ega.c,v 1.9 2006/11/29 12:13:54 miod Exp $ */ /* $NetBSD: ega.c,v 1.4.4.1 2000/06/30 16:27:47 simonb Exp $ */ /* @@ -520,6 +520,7 @@ ega_attach(parent, self, aux) aa.scrdata = &ega_screenlist; aa.accessops = &ega_accessops; aa.accesscookie = dc; + aa.defaultscreens = 0; config_found(self, &aa, wsemuldisplaydevprint); } diff --git a/sys/dev/isa/pcdisplay.c b/sys/dev/isa/pcdisplay.c index 4f2be0968b3..d39d4316ada 100644 --- a/sys/dev/isa/pcdisplay.c +++ b/sys/dev/isa/pcdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcdisplay.c,v 1.7 2004/04/02 04:39:51 deraadt Exp $ */ +/* $OpenBSD: pcdisplay.c,v 1.8 2006/11/29 12:13:54 miod Exp $ */ /* $NetBSD: pcdisplay.c,v 1.9.4.1 2000/06/30 16:27:48 simonb Exp $ */ /* @@ -287,6 +287,7 @@ pcdisplay_attach(parent, self, aux) aa.scrdata = &pcdisplay_screenlist; aa.accessops = &pcdisplay_accessops; aa.accesscookie = sc; + aa.defaultscreens = 0; config_found(self, &aa, wsemuldisplaydevprint); } diff --git a/sys/dev/pci/tga.c b/sys/dev/pci/tga.c index 01bc6c89d44..80d6ed8b7c5 100644 --- a/sys/dev/pci/tga.c +++ b/sys/dev/pci/tga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tga.c,v 1.26 2006/02/16 23:05:46 miod Exp $ */ +/* $OpenBSD: tga.c,v 1.27 2006/11/29 12:13:55 miod Exp $ */ /* $NetBSD: tga.c,v 1.40 2002/03/13 15:05:18 ad Exp $ */ /* @@ -540,6 +540,7 @@ tgaattach(parent, self, aux) aa.scrdata = &tga_screenlist; aa.accessops = &tga_accessops; aa.accesscookie = sc; + aa.defaultscreens = 0; config_found(self, &aa, wsemuldisplaydevprint); diff --git a/sys/dev/pcmcia/cfxga.c b/sys/dev/pcmcia/cfxga.c index 1e011a6d71e..4424a96f46d 100644 --- a/sys/dev/pcmcia/cfxga.c +++ b/sys/dev/pcmcia/cfxga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cfxga.c,v 1.11 2006/11/28 12:01:27 miod Exp $ */ +/* $OpenBSD: cfxga.c,v 1.12 2006/11/29 12:13:55 miod Exp $ */ /* * Copyright (c) 2005, 2006, Matthieu Herrb and Miodrag Vallat @@ -404,9 +404,7 @@ cfxga_attach(struct device *parent, struct device *self, void *aux) waa.scrdata = &sc->sc_wsl; waa.accessops = &cfxga_accessops; waa.accesscookie = sc; -#ifdef notyet waa.defaultscreens = 1; -#endif if ((sc->sc_wsdisplay = config_found(self, &waa, wsemuldisplaydevprint)) == NULL) { diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index 5112dbc5880..4e71d61d85a 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.70 2006/11/01 03:37:24 tedu Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.71 2006/11/29 12:13:55 miod Exp $ */ /* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */ /* @@ -233,7 +233,7 @@ int wsdisplayparam(struct tty *, struct termios *); void wsdisplay_common_attach(struct wsdisplay_softc *sc, int console, int mux, const struct wsscreen_list *, const struct wsdisplay_accessops *accessops, - void *accesscookie); + void *accesscookie, u_int defaultscreens); int wsdisplay_common_detach(struct wsdisplay_softc *, int); #ifdef WSDISPLAY_COMPAT_RAWKBD @@ -571,7 +571,7 @@ wsdisplay_emul_attach(struct device *parent, struct device *self, void *aux) wsdisplay_common_attach(sc, ap->console, sc->sc_dv.dv_cfdata->wsemuldisplaydevcf_mux, ap->scrdata, - ap->accessops, ap->accesscookie); + ap->accessops, ap->accesscookie, ap->defaultscreens); if (ap->console && cn_tab == &wsdisplay_cons) { int maj; @@ -659,7 +659,8 @@ wsemuldisplaydevprint(void *aux, const char *pnp) void wsdisplay_common_attach(struct wsdisplay_softc *sc, int console, int kbdmux, const struct wsscreen_list *scrdata, - const struct wsdisplay_accessops *accessops, void *accesscookie) + const struct wsdisplay_accessops *accessops, void *accesscookie, + u_int defaultscreens) { static int hookset = 0; int i, start = 0; @@ -728,9 +729,12 @@ wsdisplay_common_attach(struct wsdisplay_softc *sc, int console, int kbdmux, /* * Set up a number of virtual screens if wanted. The * WSDISPLAYIO_ADDSCREEN ioctl is more flexible, so this code - * is for special cases like installation kernels. + * is for special cases like installation kernels, as well as + * sane multihead defaults. */ - for (i = start; i < wsdisplay_defaultscreens; i++) { + if (defaultscreens == 0) + defaultscreens = wsdisplay_defaultscreens; + for (i = start; i < defaultscreens; i++) { if (wsdisplay_addscreen(sc, i, 0, 0)) break; } diff --git a/sys/dev/wscons/wsdisplayvar.h b/sys/dev/wscons/wsdisplayvar.h index 3f9cb984620..09357bc337d 100644 --- a/sys/dev/wscons/wsdisplayvar.h +++ b/sys/dev/wscons/wsdisplayvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplayvar.h,v 1.18 2006/06/30 21:38:19 miod Exp $ */ +/* $OpenBSD: wsdisplayvar.h,v 1.19 2006/11/29 12:13:55 miod Exp $ */ /* $NetBSD: wsdisplayvar.h,v 1.30 2005/02/04 02:10:49 perry Exp $ */ /* @@ -143,6 +143,7 @@ struct wsemuldisplaydev_attach_args { const struct wsscreen_list *scrdata; /* screen cfg info */ const struct wsdisplay_accessops *accessops; /* access ops */ void *accesscookie; /* access cookie */ + u_int defaultscreens; /* screens to create */ }; #define WSEMULDISPLAYDEVCF_CONSOLE 0 |