提交 2f02cc3f 编写于 作者: E Eric Anholt 提交者: Dave Airlie

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

Signed-off-by: NDave Airlie <airlied@linux.ie>
上级 e08870c8
...@@ -723,6 +723,8 @@ typedef struct drm_device { ...@@ -723,6 +723,8 @@ typedef struct drm_device {
drm_agp_head_t *agp; /**< AGP data */ drm_agp_head_t *agp; /**< AGP data */
struct pci_dev *pdev; /**< PCI device structure */ struct pci_dev *pdev; /**< PCI device structure */
int pci_vendor; /**< PCI vendor id */
int pci_device; /**< PCI device id */
#ifdef __alpha__ #ifdef __alpha__
struct pci_controller *hose; struct pci_controller *hose;
#endif #endif
......
...@@ -65,6 +65,8 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, ...@@ -65,6 +65,8 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev,
mutex_init(&dev->ctxlist_mutex); mutex_init(&dev->ctxlist_mutex);
dev->pdev = pdev; dev->pdev = pdev;
dev->pci_device = pdev->device;
dev->pci_vendor = pdev->vendor;
#ifdef __alpha__ #ifdef __alpha__
dev->hose = pdev->sysdata; dev->hose = pdev->sysdata;
......
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
#include "i915_drm.h" #include "i915_drm.h"
#include "i915_drv.h" #include "i915_drv.h"
#define IS_I965G(dev) (dev->pdev->device == 0x2972 || \ #define IS_I965G(dev) (dev->pci_device == 0x2972 || \
dev->pdev->device == 0x2982 || \ dev->pci_device == 0x2982 || \
dev->pdev->device == 0x2992 || \ dev->pci_device == 0x2992 || \
dev->pdev->device == 0x29A2) dev->pci_device == 0x29A2)
/* Really want an OS-independent resettable timer. Would like to have /* 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 * this loop run for (eg) 3 sec, but have the timer reset every time
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册