diff options
author | Dave Airlie <airlied@linux.ie> | 2009-01-07 02:54:57 +0100 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2009-01-07 02:54:57 +0100 |
commit | a75f28419a7efff611a81293d41d0e2137d7591e (patch) | |
tree | 44ca76615c5460b2f651723faa381b3b1b79cc71 | |
parent | drm/i915: Respect the other stolen memory sizes we know of. (diff) | |
download | linux-a75f28419a7efff611a81293d41d0e2137d7591e.tar.xz linux-a75f28419a7efff611a81293d41d0e2137d7591e.zip |
drm: fix ordering of driver unload vs agp unload.
For KMS drivers, we really need to cleanup the driver before disabling
the AGP subsystem.
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index febb517ee679..5ff88d952226 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -314,14 +314,14 @@ static void drm_cleanup(struct drm_device * dev) DRM_DEBUG("mtrr_del=%d\n", retval); } + 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_ht_remove(&dev->map_hash); drm_ctxbitmap_cleanup(dev); |