svn commit: r194960 - head/sys/dev/drm
Robert Noland
rnoland at FreeBSD.org
Thu Jun 25 14:15:46 UTC 2009
Author: rnoland
Date: Thu Jun 25 14:15:45 2009
New Revision: 194960
URL: http://svn.freebsd.org/changeset/base/194960
Log:
Ensure that we always hold the lock when calling vblank_disable_fn()
MFC after: 3 days
Modified:
head/sys/dev/drm/drm_irq.c
Modified: head/sys/dev/drm/drm_irq.c
==============================================================================
--- head/sys/dev/drm/drm_irq.c Thu Jun 25 13:36:57 2009 (r194959)
+++ head/sys/dev/drm/drm_irq.c Thu Jun 25 14:15:45 2009 (r194960)
@@ -70,6 +70,9 @@ static void vblank_disable_fn(void *arg)
struct drm_device *dev = (struct drm_device *)arg;
int i;
+ /* Make sure that we are called with the lock held */
+ mtx_assert(&dev->vbl_lock, MA_OWNED);
+
if (callout_pending(&dev->vblank_disable_timer)) {
/* callout was reset */
return;
@@ -109,7 +112,9 @@ void drm_vblank_cleanup(struct drm_devic
callout_drain(&dev->vblank_disable_timer);
+ DRM_SPINLOCK(&dev->vbl_lock);
vblank_disable_fn((void *)dev);
+ DRM_SPINUNLOCK(&dev->vbl_lock);
free(dev->vblank, DRM_MEM_DRIVER);
More information about the svn-src-head
mailing list