summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);