Put the PCI device/vendor id in the drm_device_t.
This helps us unbreak FreeBSD DRM from the 965 changes.main
parent
d572676185
commit
55057660f0
|
@ -714,6 +714,9 @@ struct drm_device {
|
|||
struct drm_driver_info driver;
|
||||
drm_pci_id_list_t *id_entry; /* PCI ID, name, and chipset private */
|
||||
|
||||
u_int16_t pci_device; /* PCI device id */
|
||||
u_int16_t pci_vendor; /* PCI vendor id */
|
||||
|
||||
char *unique; /* Unique identifier: e.g., busid */
|
||||
int unique_len; /* Length of unique field */
|
||||
#ifdef __FreeBSD__
|
||||
|
|
|
@ -516,6 +516,9 @@ static int drm_load(drm_device_t *dev)
|
|||
dev->pci_slot = pci_get_slot(dev->device);
|
||||
dev->pci_func = pci_get_function(dev->device);
|
||||
|
||||
dev->pci_vendor = pci_get_vendor(dev->device);
|
||||
dev->pci_device = pci_get_device(dev->device);
|
||||
|
||||
TAILQ_INIT(&dev->maplist);
|
||||
|
||||
drm_mem_init();
|
||||
|
|
|
@ -747,6 +747,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__
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,3)
|
||||
struct pci_controler *hose;
|
||||
|
|
|
@ -66,6 +66,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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue