diff options
author | Dave Airlie <airlied@linux.ie> | 2009-01-06 20:54:57 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2009-01-06 20:54:57 -0500 |
commit | a75f28419a7efff611a81293d41d0e2137d7591e (patch) | |
tree | 44ca76615c5460b2f651723faa381b3b1b79cc71 /drivers/gpu/drm/drm_drv.c | |
parent | 241fa85b2bb655224357d713c251077dee3585ce (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/drm_drv.c')
-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) | |||
314 | DRM_DEBUG("mtrr_del=%d\n", retval); | 314 | DRM_DEBUG("mtrr_del=%d\n", retval); |
315 | } | 315 | } |
316 | 316 | ||
317 | if (dev->driver->unload) | ||
318 | dev->driver->unload(dev); | ||
319 | |||
317 | if (drm_core_has_AGP(dev) && dev->agp) { | 320 | if (drm_core_has_AGP(dev) && dev->agp) { |
318 | drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS); | 321 | drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS); |
319 | dev->agp = NULL; | 322 | dev->agp = NULL; |
320 | } | 323 | } |
321 | 324 | ||
322 | if (dev->driver->unload) | ||
323 | dev->driver->unload(dev); | ||
324 | |||
325 | drm_ht_remove(&dev->map_hash); | 325 | drm_ht_remove(&dev->map_hash); |
326 | drm_ctxbitmap_cleanup(dev); | 326 | drm_ctxbitmap_cleanup(dev); |
327 | 327 | ||