drm: add device/vendor id to drm_device_t for compat with FreeBSD drivers

Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
Eric Anholt 2006-09-22 04:19:34 +10:00 committed by Dave Airlie
parent e08870c87a
commit 2f02cc3fb8
3 changed files with 8 additions and 4 deletions

View 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

View 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;

View file

@ -31,10 +31,10 @@
#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