Thu Apr 3 14:45:44 2014 UTC ()
Make i915drmkms grab the console by default.


(riastradh)
diff -r1.2 -r1.3 src/sys/external/bsd/drm2/i915drm/i915_pci.c

cvs diff -r1.2 -r1.3 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/03/18 18:20:42 1.2
+++ src/sys/external/bsd/drm2/i915drm/Attic/i915_pci.c 2014/04/03 14:45:44 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: i915_pci.c,v 1.2 2014/03/18 18:20:42 riastradh Exp $ */ 1/* $NetBSD: i915_pci.c,v 1.3 2014/04/03 14:45:44 riastradh 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.2 2014/03/18 18:20:42 riastradh Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: i915_pci.c,v 1.3 2014/04/03 14:45:44 riastradh Exp $");
34 34
35#include <sys/types.h> 35#include <sys/types.h>
36#ifndef _MODULE 36#ifndef _MODULE
37/* XXX Mega-kludge because modules are broken. */ 37/* XXX Mega-kludge because modules are broken. */
38#include <sys/once.h> 38#include <sys/once.h>
39#endif 39#endif
40#include <sys/systm.h> 40#include <sys/systm.h>
41 41
42#include <dev/pci/pciio.h> 42#include <dev/pci/pciio.h>
43#include <dev/pci/pcireg.h> 43#include <dev/pci/pcireg.h>
44#include <dev/pci/pcivar.h> 44#include <dev/pci/pcivar.h>
45 45
46#include <dev/pci/wsdisplay_pci.h> 46#include <dev/pci/wsdisplay_pci.h>
@@ -406,27 +406,27 @@ i915drm_fb_probe(struct drm_fb_helper *f @@ -406,27 +406,27 @@ i915drm_fb_probe(struct drm_fb_helper *f
406 406
407 /* XXX errno NetBSD->Linux */ 407 /* XXX errno NetBSD->Linux */
408 ret = -bus_space_map(dev->bst, 408 ret = -bus_space_map(dev->bst,
409 (dev_priv->mm.gtt_base_addr + sc->sc_fb_obj->gtt_offset), 409 (dev_priv->mm.gtt_base_addr + sc->sc_fb_obj->gtt_offset),
410 size, 410 size,
411 (BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE), 411 (BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE),
412 &sc->sc_fb_bsh); 412 &sc->sc_fb_bsh);
413 if (ret) { 413 if (ret) {
414 aprint_error_dev(sc->sc_dev, "unable to map framebuffer: %d\n", 414 aprint_error_dev(sc->sc_dev, "unable to map framebuffer: %d\n",
415 ret); 415 ret);
416 goto fail3; 416 goto fail3;
417 } 417 }
418 418
419 prop_dictionary_set_bool(dict, "is_console", 0); /* XXX */ 419 prop_dictionary_set_bool(dict, "is_console", 1); /* XXX */
420 prop_dictionary_set_uint32(dict, "width", mode_cmd.width); 420 prop_dictionary_set_uint32(dict, "width", mode_cmd.width);
421 prop_dictionary_set_uint32(dict, "height", mode_cmd.height); 421 prop_dictionary_set_uint32(dict, "height", mode_cmd.height);
422 prop_dictionary_set_uint8(dict, "depth", sizes->surface_bpp); 422 prop_dictionary_set_uint8(dict, "depth", sizes->surface_bpp);
423 prop_dictionary_set_uint16(dict, "linebytes", mode_cmd.pitches[0]); 423 prop_dictionary_set_uint16(dict, "linebytes", mode_cmd.pitches[0]);
424 prop_dictionary_set_uint32(dict, "address", 0); /* XXX >32-bit */ 424 prop_dictionary_set_uint32(dict, "address", 0); /* XXX >32-bit */
425 prop_dictionary_set_uint64(dict, "virtual_address", 425 prop_dictionary_set_uint64(dict, "virtual_address",
426 (uint64_t)bus_space_vaddr(dev->bst, sc->sc_fb_bsh)); 426 (uint64_t)bus_space_vaddr(dev->bst, sc->sc_fb_bsh));
427 sc->sc_genfb.sc_dev = sc->sc_dev; 427 sc->sc_genfb.sc_dev = sc->sc_dev;
428 genfb_init(&sc->sc_genfb); 428 genfb_init(&sc->sc_genfb);
429 429
430 genfb_ops.genfb_ioctl = i915drm_genfb_ioctl; 430 genfb_ops.genfb_ioctl = i915drm_genfb_ioctl;
431 genfb_ops.genfb_mmap = i915drm_genfb_mmap; 431 genfb_ops.genfb_mmap = i915drm_genfb_mmap;
432 432