Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/riastradh-drm2]: src/sys/external/bsd/drm2/dist/include/drm Dribble some...



details:   https://anonhg.NetBSD.org/src/rev/337a1f5570be
branches:  riastradh-drm2
changeset: 788037:337a1f5570be
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 24 01:57:06 2013 +0000

description:
Dribble some PCI device goo into drmP.h.

diffstat:

 sys/external/bsd/drm2/dist/include/drm/drmP.h |  14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diffs (41 lines):

diff -r a11579c4fb53 -r 337a1f5570be sys/external/bsd/drm2/dist/include/drm/drmP.h
--- a/sys/external/bsd/drm2/dist/include/drm/drmP.h     Wed Jul 24 01:56:48 2013 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drmP.h     Wed Jul 24 01:57:06 2013 +0000
@@ -1220,8 +1220,13 @@
 
        struct drm_agp_head *agp;       /**< AGP data */
 
+#ifdef __NetBSD__
+       device_t dev;
+       struct pci_attach_args pa;
+#else
        struct device *dev;             /**< Device structure */
        struct pci_dev *pdev;           /**< PCI device structure */
+#endif
        int pci_vendor;                 /**< PCI vendor id */
        int pci_device;                 /**< PCI device id */
 #ifdef __alpha__
@@ -1799,6 +1804,10 @@
 
 #include <drm/drm_mem_util.h>
 
+#ifdef __NetBSD__              /* XXX temporary measure 20130212 */
+struct pci_device_id;
+#endif
+
 extern int drm_fill_in_dev(struct drm_device *dev,
                           const struct pci_device_id *ent,
                           struct drm_driver *driver);
@@ -1816,7 +1825,12 @@
                }
        }
 
+#ifdef __NetBSD__
+       return pci_get_capability(dev->pa.pa_pc, dev->pa.pa_tag, PCI_CAP_AGP,
+           NULL, NULL);
+#else
        return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP);
+#endif
 }
 
 extern int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver);



Home | Main Index | Thread Index | Old Index