summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Noland <rnoland@wombat.2hip.net>2008-06-02 19:35:00 -0400
committerRobert Noland <rnoland@wombat.2hip.net>2008-06-08 01:53:45 -0400
commit93c57ff4e5d9f62be0a353222fef564dd9e59e39 (patch)
tree44307bc80663c7510574acb7aac55528c8f49a3c
parentfc74c2e9d65dbd0c611e1610886df098c6e3273b (diff)
[FreeBSD] Remove the locks in the vblank_disable_fn
They are recursive and causing panics with witness enabled.
-rw-r--r--bsd-core/drm_irq.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/bsd-core/drm_irq.c b/bsd-core/drm_irq.c
index 79f8f9ff..132d01bb 100644
--- a/bsd-core/drm_irq.c
+++ b/bsd-core/drm_irq.c
@@ -69,18 +69,14 @@ drm_irq_handler_wrap(DRM_IRQ_ARGS)
static void vblank_disable_fn(void *arg)
{
struct drm_device *dev = (struct drm_device *)arg;
- unsigned long irqflags;
int i;
- DRM_SPINLOCK_IRQSAVE(&dev->vbl_lock, irqflags);
if (callout_pending(&dev->vblank_disable_timer)) {
/* callout was reset */
- DRM_SPINUNLOCK_IRQRESTORE(&dev->vbl_lock, irqflags);
return;
}
if (!callout_active(&dev->vblank_disable_timer)) {
/* callout was stopped */
- DRM_SPINUNLOCK_IRQRESTORE(&dev->vbl_lock, irqflags);
return;
}
callout_deactivate(&dev->vblank_disable_timer);
@@ -92,7 +88,6 @@ static void vblank_disable_fn(void *arg)
dev->vblank_enabled[i] = 0;
}
}
- DRM_SPINUNLOCK_IRQRESTORE(&dev->vbl_lock, irqflags);
}
static void drm_vblank_cleanup(struct drm_device *dev)
@@ -106,6 +101,7 @@ static void drm_vblank_cleanup(struct drm_device *dev)
DRM_SPINLOCK_IRQSAVE(&dev->vbl_lock, irqflags);
callout_stop(&dev->vblank_disable_timer);
DRM_SPINUNLOCK_IRQRESTORE(&dev->vbl_lock, irqflags);
+
callout_drain(&dev->vblank_disable_timer);
vblank_disable_fn((void *)dev);