Module Name:    src
Committed By:   riastradh
Date:           Wed Jul 24 01:57:06 UTC 2013

Modified Files:
        src/sys/external/bsd/drm2/dist/include/drm [riastradh-drm2]: drmP.h

Log Message:
Dribble some PCI device goo into drmP.h.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.11 -r1.1.1.1.2.12 \
    src/sys/external/bsd/drm2/dist/include/drm/drmP.h

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.1.1.1.2.11 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.1.1.1.2.12
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.1.1.1.2.11	Wed Jul 24 01:55:29 2013
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Wed Jul 24 01:57:06 2013
@@ -1220,8 +1220,13 @@ struct drm_device {
 
 	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 @@ static __inline__ void drm_core_dropmap(
 
 #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 @@ static __inline__ int drm_pci_device_is_
 		}
 	}
 
+#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);

Reply via email to