diff options
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/i915_dma.c | 6 | ||||
-rw-r--r-- | shared-core/i915_drv.h | 20 |
2 files changed, 17 insertions, 9 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c index 4d77dfcf..2a02aedf 100644 --- a/shared-core/i915_dma.c +++ b/shared-core/i915_dma.c @@ -192,7 +192,9 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init) I915_WRITE(0x02080, dev_priv->dma_status_page); } DRM_DEBUG("Enabled hardware status page\n"); +#ifdef I915_HAVE_BUFFER mutex_init(&dev_priv->cmdbuf_mutex); +#endif return 0; } @@ -1318,9 +1320,11 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) ret = drm_addmap(dev, base, size, _DRM_REGISTERS, _DRM_KERNEL, &dev_priv->mmio_map); +#ifdef __LINUX__ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) intel_init_chipset_flush_compat(dev); #endif +#endif return ret; } @@ -1333,9 +1337,11 @@ int i915_driver_unload(struct drm_device *dev) drm_free(dev->dev_private, sizeof(drm_i915_private_t), DRM_MEM_DRIVER); +#ifdef __LINUX__ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) intel_fini_chipset_flush_compat(dev); #endif +#endif return 0; } diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h index c66b0651..79a2e71c 100644 --- a/shared-core/i915_drv.h +++ b/shared-core/i915_drv.h @@ -313,10 +313,12 @@ extern int i915_move(struct drm_buffer_object *bo, int evict, void i915_flush_ttm(struct drm_ttm *ttm); #endif +#ifdef __LINUX__ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) extern void intel_init_chipset_flush_compat(struct drm_device *dev); extern void intel_fini_chipset_flush_compat(struct drm_device *dev); #endif +#endif #define I915_READ(reg) DRM_READ32(dev_priv->mmio_map, (reg)) #define I915_WRITE(reg,val) DRM_WRITE32(dev_priv->mmio_map, (reg), (val)) @@ -1148,16 +1150,16 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); #define PALETTE_A 0x0a000 #define PALETTE_B 0x0a800 -#define IS_I830(dev) ((dev)->pci_device == PCI_DEVICE_ID_INTEL_82830_CGC) -#define IS_845G(dev) ((dev)->pci_device == PCI_DEVICE_ID_INTEL_82845G_IG) -#define IS_I85X(dev) ((dev)->pci_device == PCI_DEVICE_ID_INTEL_82855GM_IG) -#define IS_I855(dev) ((dev)->pci_device == PCI_DEVICE_ID_INTEL_82855GM_IG) -#define IS_I865G(dev) ((dev)->pci_device == PCI_DEVICE_ID_INTEL_82865_IG) +#define IS_I830(dev) ((dev)->pci_device == 0x3577) +#define IS_845G(dev) ((dev)->pci_device == 0x2562) +#define IS_I85X(dev) ((dev)->pci_device == 0x3582) +#define IS_I855(dev) ((dev)->pci_device == 0x3582) +#define IS_I865G(dev) ((dev)->pci_device == 0x2572) -#define IS_I915G(dev) (dev->pci_device == PCI_DEVICE_ID_INTEL_82915G_IG)/* || dev->pci_device == PCI_DEVICE_ID_INTELPCI_CHIP_E7221_G)*/ -#define IS_I915GM(dev) ((dev)->pci_device == PCI_DEVICE_ID_INTEL_82915GM_IG) -#define IS_I945G(dev) ((dev)->pci_device == PCI_DEVICE_ID_INTEL_82945G_IG) -#define IS_I945GM(dev) ((dev)->pci_device == PCI_DEVICE_ID_INTEL_82945GM_IG) +#define IS_I915G(dev) (dev->pci_device == 0x2582)/* || dev->pci_device == PCI_DEVICE_ID_INTELPCI_CHIP_E7221_G)*/ +#define IS_I915GM(dev) ((dev)->pci_device == 0x2592) +#define IS_I945G(dev) ((dev)->pci_device == 0x2772) +#define IS_I945GM(dev) ((dev)->pci_device == 0x27A2) #define IS_I965G(dev) ((dev)->pci_device == 0x2972 || \ (dev)->pci_device == 0x2982 || \ |