diff options
author | Robert Noland <rnoland@2hip.net> | 2008-08-13 17:05:59 -0400 |
---|---|---|
committer | Robert Noland <rnoland@2hip.net> | 2008-08-24 15:25:19 -0400 |
commit | 16c1a87580af89be02e7e6c1898f18b36829e007 (patch) | |
tree | 61c8259e0aed6323cf30d3ac7395615ffbce5835 | |
parent | 9101a0205c897fea28e6a3d875111a83ad7f7732 (diff) |
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.
-rw-r--r-- | shared-core/i915_dma.c | 6 | ||||
-rw-r--r-- | shared-core/i915_irq.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c index 5811fa3c..34d9355d 100644 --- a/shared-core/i915_dma.c +++ b/shared-core/i915_dma.c @@ -1073,6 +1073,9 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) i915_gem_load(dev); + DRM_SPININIT(&dev_priv->swaps_lock, "swap"); + DRM_SPININIT(&dev_priv->user_irq_lock, "userirq"); + #ifdef __linux__ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) 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_SPINUNINIT(&dev_priv->swaps_lock); + DRM_SPINUNINIT(&dev_priv->user_irq_lock); + #ifdef __linux__ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25) intel_opregion_free(dev); diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c index 418e0ae9..89264ae2 100644 --- a/shared-core/i915_irq.c +++ b/shared-core/i915_irq.c @@ -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; int ret, num_pipes = 2; - DRM_SPININIT(&dev_priv->swaps_lock, "swap"); INIT_LIST_HEAD(&dev_priv->vbl_swaps.head); dev_priv->swaps_pending = 0; - DRM_SPININIT(&dev_priv->user_irq_lock, "userirq"); dev_priv->user_irq_refcount = 0; dev_priv->irq_mask_reg = ~0; |