i915: Move spinlock init / destroy to load / unload time.
This resolves the panic on FreeBSD during VT switch, without attempting any of the more lofty goals for the time being.main
parent
9101a0205c
commit
16c1a87580
|
@ -1073,6 +1073,9 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
|
||||||
|
|
||||||
i915_gem_load(dev);
|
i915_gem_load(dev);
|
||||||
|
|
||||||
|
DRM_SPININIT(&dev_priv->swaps_lock, "swap");
|
||||||
|
DRM_SPININIT(&dev_priv->user_irq_lock, "userirq");
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
|
||||||
intel_init_chipset_flush_compat(dev);
|
intel_init_chipset_flush_compat(dev);
|
||||||
|
@ -1100,6 +1103,9 @@ int i915_driver_unload(struct drm_device *dev)
|
||||||
|
|
||||||
drm_rmmap(dev, dev_priv->mmio_map);
|
drm_rmmap(dev, dev_priv->mmio_map);
|
||||||
|
|
||||||
|
DRM_SPINUNINIT(&dev_priv->swaps_lock);
|
||||||
|
DRM_SPINUNINIT(&dev_priv->user_irq_lock);
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
|
||||||
intel_opregion_free(dev);
|
intel_opregion_free(dev);
|
||||||
|
|
|
@ -948,11 +948,9 @@ int i915_driver_irq_postinstall(struct drm_device * dev)
|
||||||
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
|
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
|
||||||
int ret, num_pipes = 2;
|
int ret, num_pipes = 2;
|
||||||
|
|
||||||
DRM_SPININIT(&dev_priv->swaps_lock, "swap");
|
|
||||||
INIT_LIST_HEAD(&dev_priv->vbl_swaps.head);
|
INIT_LIST_HEAD(&dev_priv->vbl_swaps.head);
|
||||||
dev_priv->swaps_pending = 0;
|
dev_priv->swaps_pending = 0;
|
||||||
|
|
||||||
DRM_SPININIT(&dev_priv->user_irq_lock, "userirq");
|
|
||||||
dev_priv->user_irq_refcount = 0;
|
dev_priv->user_irq_refcount = 0;
|
||||||
dev_priv->irq_mask_reg = ~0;
|
dev_priv->irq_mask_reg = ~0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue