Skip to content

Commit

Permalink
drm: add device/vendor id to drm_device_t for compat with FreeBSD dri…
Browse files Browse the repository at this point in the history
…vers

Signed-off-by: Dave Airlie <airlied@linux.ie>
  • Loading branch information
Eric Anholt authored and Dave Airlie committed Sep 21, 2006
1 parent e08870c commit 2f02cc3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions drivers/char/drm/drmP.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions drivers/char/drm/drm_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions drivers/char/drm/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f02cc3

Please sign in to comment.