summaryrefslogtreecommitdiff
path: root/bsd-core
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-core')
-rw-r--r--bsd-core/drm_drv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c
index 32b284e1..47c212e2 100644
--- a/bsd-core/drm_drv.c
+++ b/bsd-core/drm_drv.c
@@ -460,7 +460,9 @@ static int drm_lastclose(struct drm_device *dev)
dev->magiclist[i].head = dev->magiclist[i].tail = NULL;
}
+ DRM_UNLOCK();
drm_drawable_free_all(dev);
+ DRM_LOCK();
/* Clear AGP information */
if ( dev->agp ) {
@@ -655,8 +657,11 @@ static void drm_unload(struct drm_device *dev)
dev->agp = NULL;
}
- if (dev->driver.unload != NULL)
+ if (dev->driver.unload != NULL) {
+ DRM_LOCK();
dev->driver.unload(dev);
+ DRM_UNLOCK();
+ }
delete_unrhdr(dev->drw_unrhdr);