diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-07-17 17:13:39 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-07-17 17:13:39 +0000 |
commit | 4c467cde211fbdab6db278763c8caf0f30b3a3c1 (patch) | |
tree | 608365962f382d6bd53a498142a74cc905f66d4c | |
parent | 89a279d87478cb30f7bddf246de44dab8098b660 (diff) |
Make sure we don't reprogram the colormap upon leaving mapped mode,
if we are not the console display; prevents a stupid panic.
-rw-r--r-- | sys/arch/sparc64/dev/vgafb.c | 9 |
1 files 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; |