summaryrefslogtreecommitdiff
path: root/linux-core/drm_drv.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-17 18:20:05 -0700
committerJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-17 18:20:05 -0700
commitc71c44bb9288e0bf1b319ec19a2e25f4467d9583 (patch)
treecdb4fc7d4a107082cd6d039706991c4118af840d /linux-core/drm_drv.c
parent4f0841a31cbed315a3e891557eadc55cab0dfd23 (diff)
parentd20aaf485893ed11dd0d68daf63ccadd77b02213 (diff)
Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
Diffstat (limited to 'linux-core/drm_drv.c')
-rw-r--r--linux-core/drm_drv.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 7bb8c659..5aa7137b 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -375,9 +375,6 @@ static void drm_cleanup(drm_device_t * dev)
drm_lastclose(dev);
drm_fence_manager_takedown(dev);
- if (!drm_fb_loaded)
- pci_disable_device(dev->pdev);
-
drm_ctxbitmap_cleanup(dev);
if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) && dev->agp
@@ -389,15 +386,16 @@ static void drm_cleanup(drm_device_t * dev)
DRM_DEBUG("mtrr_del=%d\n", retval);
}
- // drm_bo_driver_finish(dev);
-
+ if (dev->driver->unload)
+ dev->driver->unload(dev);
+
if (drm_core_has_AGP(dev) && dev->agp) {
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
dev->agp = NULL;
}
- if (dev->driver->unload)
- dev->driver->unload(dev);
+
+ // drm_bo_driver_finish(dev);
if (dev->maplist) {
drm_free(dev->maplist, sizeof(*dev->maplist), DRM_MEM_MAPS);
dev->maplist = NULL;
@@ -406,6 +404,9 @@ static void drm_cleanup(drm_device_t * dev)
drm_ht_remove(&dev->object_hash);
}
+ if (!drm_fb_loaded)
+ pci_disable_device(dev->pdev);
+
drm_put_head(&dev->primary);
if (drm_put_dev(dev))
DRM_ERROR("Cannot unload module\n");