Sun Jul 13 01:17:15 2014 UTC ()
The vga driver now detaches wscons.


(mlelstv)
diff -r1.9 -r1.10 src/sys/external/bsd/drm2/i915drm/i915_pci.c

cvs diff -r1.9 -r1.10 src/sys/external/bsd/drm2/i915drm/Attic/i915_pci.c (expand / switch to unified diff)

--- src/sys/external/bsd/drm2/i915drm/Attic/i915_pci.c 2014/07/01 20:03:21 1.9
+++ src/sys/external/bsd/drm2/i915drm/Attic/i915_pci.c 2014/07/13 01:17:15 1.10
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: i915_pci.c,v 1.9 2014/07/01 20:03:21 riastradh Exp $ */ 1/* $NetBSD: i915_pci.c,v 1.10 2014/07/13 01:17:15 mlelstv Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2013 The NetBSD Foundation, Inc. 4 * Copyright (c) 2013 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Taylor R. Campbell. 8 * by Taylor R. Campbell.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: i915_pci.c,v 1.9 2014/07/01 20:03:21 riastradh Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: i915_pci.c,v 1.10 2014/07/13 01:17:15 mlelstv Exp $");
34 34
35#ifdef _KERNEL_OPT 35#ifdef _KERNEL_OPT
36#include "vga.h" 36#include "vga.h"
37#endif 37#endif
38 38
39#include <sys/types.h> 39#include <sys/types.h>
40#ifndef _MODULE 40#ifndef _MODULE
41/* XXX Mega-kludge because modules are broken. */ 41/* XXX Mega-kludge because modules are broken. */
42#include <sys/once.h> 42#include <sys/once.h>
43#endif 43#endif
44#include <sys/systm.h> 44#include <sys/systm.h>
45 45
46#include <dev/pci/pciio.h> 46#include <dev/pci/pciio.h>
@@ -201,31 +201,29 @@ i915drm_attach(device_t parent, device_t @@ -201,31 +201,29 @@ i915drm_attach(device_t parent, device_t
201 * 201 *
202 * XXX This is much too hairy! Can we simplify it and 202 * XXX This is much too hairy! Can we simplify it and
203 * x86/consinit.c? 203 * x86/consinit.c?
204 */ 204 */
205#if NVGA > 0 205#if NVGA > 0
206 if (vga_is_console(pa->pa_iot, -1) || 206 if (vga_is_console(pa->pa_iot, -1) ||
207 vga_is_console(pa->pa_memt, -1)) { 207 vga_is_console(pa->pa_memt, -1)) {
208 sc->sc_console = true; 208 sc->sc_console = true;
209 /* 209 /*
210 * There is a window from here until genfb attaches in 210 * There is a window from here until genfb attaches in
211 * which kernel messages will go into a black hole, 211 * which kernel messages will go into a black hole,
212 * until genfb replays the console. Whattakludge. 212 * until genfb replays the console. Whattakludge.
213 * 213 *
214 * wsdisplay_cndetach must come first, to clear cn_tab, 214 * vga_cndetach detaches wscons and unmaps the bus space
215 * so that nothing will use it; then vga_cndetach 215 * that it would have used.
216 * unmaps the bus space that it would have used. 
217 */ 216 */
218 wsdisplay_cndetach(); 
219 vga_cndetach(); 217 vga_cndetach();
220 } else 218 } else
221#endif 219#endif
222 if (genfb_is_console() && genfb_is_enabled()) { 220 if (genfb_is_console() && genfb_is_enabled()) {
223 sc->sc_console = true; 221 sc->sc_console = true;
224 } else { 222 } else {
225 sc->sc_console = false; 223 sc->sc_console = false;
226 } 224 }
227 225
228 /* Initialize the drm pci driver state. */ 226 /* Initialize the drm pci driver state. */
229 sc->sc_drm_dev.driver = i915_drm_driver; 227 sc->sc_drm_dev.driver = i915_drm_driver;
230 drm_pci_attach(self, pa, &sc->sc_pci_dev, &sc->sc_drm_dev); 228 drm_pci_attach(self, pa, &sc->sc_pci_dev, &sc->sc_drm_dev);
231 229