From 16c1a87580af89be02e7e6c1898f18b36829e007 Mon Sep 17 00:00:00 2001 From: Robert Noland Date: Wed, 13 Aug 2008 17:05:59 -0400 Subject: 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. --- shared-core/i915_dma.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'shared-core/i915_dma.c') 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); -- cgit v1.2.3