summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared-core/i915_dma.c6
-rw-r--r--shared-core/i915_irq.c2
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;