Thu Mar 5 20:19:30 2015 UTC ()
properly include files so that modules work.


(christos)
diff -r1.2 -r1.3 src/sys/external/bsd/drm2/pci/drmfb_pci.c

cvs diff -r1.2 -r1.3 src/sys/external/bsd/drm2/pci/drmfb_pci.c (expand / switch to unified diff)

--- src/sys/external/bsd/drm2/pci/drmfb_pci.c 2015/03/05 17:56:39 1.2
+++ src/sys/external/bsd/drm2/pci/drmfb_pci.c 2015/03/05 20:19:30 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: drmfb_pci.c,v 1.2 2015/03/05 17:56:39 riastradh Exp $ */ 1/* $NetBSD: drmfb_pci.c,v 1.3 2015/03/05 20:19:30 christos Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2014 The NetBSD Foundation, Inc. 4 * Copyright (c) 2014 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.
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
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/* 32/*
33 * drmfb_pci: drmfb hooks for PCI devices. 33 * drmfb_pci: drmfb hooks for PCI devices.
34 */ 34 */
35 35
36#include <sys/cdefs.h> 36#include <sys/cdefs.h>
37__KERNEL_RCSID(0, "$NetBSD: drmfb_pci.c,v 1.2 2015/03/05 17:56:39 riastradh Exp $"); 37__KERNEL_RCSID(0, "$NetBSD: drmfb_pci.c,v 1.3 2015/03/05 20:19:30 christos Exp $");
38 38
39#ifdef _KERNEL_OPT 39#ifdef _KERNEL_OPT
40#include "vga.h" 40#include "vga.h"
41#endif 41#endif
42 42
43#include <sys/types.h> 43#include <sys/types.h>
44#include <sys/device.h> 44#include <sys/device.h>
45#include <sys/errno.h> 45#include <sys/errno.h>
46#include <sys/systm.h> 46#include <sys/systm.h>
47 47
48#include <dev/pci/pciio.h> 48#include <dev/pci/pciio.h>
49#include <dev/pci/pcireg.h> 49#include <dev/pci/pcireg.h>
50#include <dev/pci/pcivar.h> 50#include <dev/pci/pcivar.h>
@@ -55,28 +55,28 @@ __KERNEL_RCSID(0, "$NetBSD: drmfb_pci.c, @@ -55,28 +55,28 @@ __KERNEL_RCSID(0, "$NetBSD: drmfb_pci.c,
55 * XXX All we really need is vga_is_console from vgavar.h, but the 55 * XXX All we really need is vga_is_console from vgavar.h, but the
56 * header files are missing their own dependencies, so we need to 56 * header files are missing their own dependencies, so we need to
57 * explicitly drag in the other crap. 57 * explicitly drag in the other crap.
58 */ 58 */
59#include <dev/ic/mc6845reg.h> 59#include <dev/ic/mc6845reg.h>
60#include <dev/ic/pcdisplayvar.h> 60#include <dev/ic/pcdisplayvar.h>
61#include <dev/ic/vgareg.h> 61#include <dev/ic/vgareg.h>
62#include <dev/ic/vgavar.h> 62#include <dev/ic/vgavar.h>
63#endif 63#endif
64 64
65#include <drm/drmP.h> 65#include <drm/drmP.h>
66#include <drm/drm_fb_helper.h> 66#include <drm/drm_fb_helper.h>
67 67
68#include "drmfb.h" 68#include <drm/drmfb.h>
69#include "drmfb_pci.h" 69#include <drm/drmfb_pci.h>
70 70
71/* 71/*
72 * drmfb_pci_mmap: Implementation of drmfb_params::dp_mmap. Don't use 72 * drmfb_pci_mmap: Implementation of drmfb_params::dp_mmap. Don't use
73 * this for dp_mmapfb -- how to get at the framebuffer is device- 73 * this for dp_mmapfb -- how to get at the framebuffer is device-
74 * specific. 74 * specific.
75 */ 75 */
76paddr_t 76paddr_t
77drmfb_pci_mmap(struct drmfb_softc *sc, off_t offset, int prot) 77drmfb_pci_mmap(struct drmfb_softc *sc, off_t offset, int prot)
78{ 78{
79 struct drm_device *const dev = sc->sc_da.da_fb_helper->dev; 79 struct drm_device *const dev = sc->sc_da.da_fb_helper->dev;
80 const struct pci_attach_args *const pa = &dev->pdev->pd_pa; 80 const struct pci_attach_args *const pa = &dev->pdev->pd_pa;
81 unsigned i; 81 unsigned i;
82 82