From 6f87851cb7fdd0607b5acf0225911e4b319d6e0d Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Wed, 18 Apr 2012 17:20:55 +0000 Subject: Don't attach a wsdisplay if not the console device, for part of the device is disabled, and nothing shows up on the monitor in this case. To be investigated later. --- sys/arch/sgi/gio/grtwo.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'sys/arch') diff --git a/sys/arch/sgi/gio/grtwo.c b/sys/arch/sgi/gio/grtwo.c index 6d77160f312..8fa4bee9730 100644 --- a/sys/arch/sgi/gio/grtwo.c +++ b/sys/arch/sgi/gio/grtwo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grtwo.c,v 1.1 2012/04/18 11:01:55 miod Exp $ */ +/* $OpenBSD: grtwo.c,v 1.2 2012/04/18 17:20:54 miod Exp $ */ /* $NetBSD: grtwo.c,v 1.11 2009/11/22 19:09:15 mbalmer Exp $ */ /* @@ -384,6 +384,16 @@ grtwo_attach(struct device *parent, struct device *self, void *aux) dc = &grtwo_console_dc; sc->sc_nscreens = 1; } else { + /* + * XXX The driver will not work correctly if we are not the + * XXX console device. An initialization is missing - it + * XXX seems that everything works, but the colormap is + * XXX stuck as black, which makes the device unusable. + */ + printf("\n%s: device has not been setup by firmware!\n", + self->dv_xname); + return; +#if 0 waa.console = 0; dc = malloc(sizeof(struct grtwo_devconfig), M_DEVBUF, M_WAITOK | M_CANFAIL | M_ZERO); @@ -398,6 +408,7 @@ grtwo_attach(struct device *parent, struct device *self, void *aux) free(dc, M_DEVBUF); goto out; } +#endif } sc->sc_dc = dc; dc->dc_sc = sc; @@ -418,9 +429,11 @@ grtwo_attach(struct device *parent, struct device *self, void *aux) config_found(self, &waa, wsemuldisplaydevprint); return; +#if 0 out: printf("\n%s: failed to allocate memory\n", self->dv_xname); return; +#endif } int -- cgit v1.2.3