]> err.no Git - linux-2.6/commitdiff
drm: add device/vendor id to drm_device_t for compat with FreeBSD drivers
authorEric Anholt <eric@anholt.net>
Thu, 21 Sep 2006 18:19:34 +0000 (04:19 +1000)
committerDave Airlie <airlied@linux.ie>
Thu, 21 Sep 2006 19:32:34 +0000 (05:32 +1000)
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/char/drm/drmP.h
drivers/char/drm/drm_stub.c
drivers/char/drm/i915_dma.c

index 4363f6e50c77e647b8b0b8a10428f2b814c3dcd9..7690a59ace0426b0249127831b3d668bab2bb444 100644 (file)
@@ -723,6 +723,8 @@ typedef struct drm_device {
        drm_agp_head_t *agp;    /**< AGP data */
 
        struct pci_dev *pdev;           /**< PCI device structure */
+       int pci_vendor;                 /**< PCI vendor id */
+       int pci_device;                 /**< PCI device id */
 #ifdef __alpha__
        struct pci_controller *hose;
 #endif
index a9bb18ac3a2b35d0bf82516e93df3574f104e75b..7b1d4e8659baa41e71560f8c02d5592baa66ea4a 100644 (file)
@@ -65,6 +65,8 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
        mutex_init(&dev->ctxlist_mutex);
 
        dev->pdev = pdev;
+       dev->pci_device = pdev->device;
+       dev->pci_vendor = pdev->vendor;
 
 #ifdef __alpha__
        dev->hose = pdev->sysdata;
index a7924e28a847a6c57f34e7226b7db0f63abbe462..fb7913ff5286b58e6fd8b5a574590f8e1d8f8948 100644 (file)
 #include "i915_drm.h"
 #include "i915_drv.h"
 
-#define IS_I965G(dev) (dev->pdev->device == 0x2972 || \
-                      dev->pdev->device == 0x2982 || \
-                      dev->pdev->device == 0x2992 || \
-                      dev->pdev->device == 0x29A2)
+#define IS_I965G(dev) (dev->pci_device == 0x2972 || \
+                      dev->pci_device == 0x2982 || \
+                      dev->pci_device == 0x2992 || \
+                      dev->pci_device == 0x29A2)
 
 /* Really want an OS-independent resettable timer.  Would like to have
  * this loop run for (eg) 3 sec, but have the timer reset every time