Bug #13233: Fix build on FreeBSD.
parent
c12a3a3ce0
commit
a74181ddb2
|
@ -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,8 +1320,10 @@ 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,8 +1337,10 @@ 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;
|
||||
}
|
||||
|
|
|
@ -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 || \
|
||||
|
|
Loading…
Reference in New Issue