Module Name:    src
Committed By:   mlelstv
Date:           Sat Jul 12 05:30:33 UTC 2014

Modified Files:
        src/sys/dev/ic: vga.c vga_raster.c

Log Message:
detach wscons when detaching console


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/dev/ic/vga.c
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/ic/vga_raster.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/vga.c
diff -u src/sys/dev/ic/vga.c:1.111 src/sys/dev/ic/vga.c:1.112
--- src/sys/dev/ic/vga.c:1.111	Mon Nov  4 16:54:56 2013
+++ src/sys/dev/ic/vga.c	Sat Jul 12 05:30:33 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: vga.c,v 1.111 2013/11/04 16:54:56 christos Exp $ */
+/* $NetBSD: vga.c,v 1.112 2014/07/12 05:30:33 mlelstv Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -28,8 +28,9 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.111 2013/11/04 16:54:56 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.112 2014/07/12 05:30:33 mlelstv Exp $");
 
+#include "opt_vga.h"
 /* for WSCONS_SUPPORT_PCVTFONTS */
 #include "opt_wsdisplay_compat.h"
 /* for WSDISPLAY_CUSTOM_BORDER */
@@ -727,9 +728,14 @@ vga_cndetach(void)
 	vh = &vc->hdl;
 
 	if (vgaconsole) {
+		wsdisplay_cndetach();
+
 		bus_space_unmap(vh->vh_iot, vh->vh_ioh_vga, 0x10);
 		bus_space_unmap(vh->vh_iot, vh->vh_ioh_6845, 0x10);
 
+		vga_console_attached = 0;
+		vgaconsole = 0;
+
 		return 1;
 	}
 

Index: src/sys/dev/ic/vga_raster.c
diff -u src/sys/dev/ic/vga_raster.c:1.40 src/sys/dev/ic/vga_raster.c:1.41
--- src/sys/dev/ic/vga_raster.c:1.40	Fri Apr 18 22:02:44 2014
+++ src/sys/dev/ic/vga_raster.c	Sat Jul 12 05:30:33 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: vga_raster.c,v 1.40 2014/04/18 22:02:44 mlelstv Exp $	*/
+/*	$NetBSD: vga_raster.c,v 1.41 2014/07/12 05:30:33 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Bang Jun-Young
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.40 2014/04/18 22:02:44 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.41 2014/07/12 05:30:33 mlelstv Exp $");
 
 #include "opt_vga.h"
 #include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */
@@ -570,9 +570,14 @@ vga_cndetach(void)
 	vh = &vc->hdl;
 
 	if (vgaconsole) {
+		wsdisplay_cndetach();
+
 		bus_space_unmap(vh->vh_iot, vh->vh_ioh_vga, 0x10);
 		bus_space_unmap(vh->vh_iot, vh->vh_ioh_6845, 0x10);
 
+		vga_console_attached = 0;
+		vgaconsole = 0;
+
 		return 1;
 	}
 

Reply via email to