From 4c467cde211fbdab6db278763c8caf0f30b3a3c1 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sun, 17 Jul 2005 17:13:39 +0000 Subject: Make sure we don't reprogram the colormap upon leaving mapped mode, if we are not the console display; prevents a stupid panic. --- sys/arch/sparc64/dev/vgafb.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/arch/sparc64/dev/vgafb.c b/sys/arch/sparc64/dev/vgafb.c index 8ceb7088251..f99324da786 100644 --- a/sys/arch/sparc64/dev/vgafb.c +++ b/sys/arch/sparc64/dev/vgafb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vgafb.c,v 1.41 2005/03/15 20:19:24 miod Exp $ */ +/* $OpenBSD: vgafb.c,v 1.42 2005/07/17 17:13:38 miod Exp $ */ /* * Copyright (c) 2001 Jason L. Wright (jason@thought.net) @@ -196,8 +196,11 @@ vgafb_ioctl(v, cmd, data, flags, p) break; case WSDISPLAYIO_SMODE: sc->sc_mode = *(u_int *)data; - if (sc->sc_mode == WSDISPLAYIO_MODE_EMUL) - fbwscons_setcolormap(&sc->sc_sunfb, vgafb_setcolor); + if (sc->sc_mode == WSDISPLAYIO_MODE_EMUL) { + if (sc->sc_console) /* XXX needs sc_ofhandle */ + fbwscons_setcolormap(&sc->sc_sunfb, + vgafb_setcolor); + } break; case WSDISPLAYIO_GINFO: wdf = (void *)data; -- cgit v1.2.3