Skip to content

Commit

Permalink
drm: fix ordering of driver unload vs agp unload.
Browse files Browse the repository at this point in the history
For KMS drivers, we really need to cleanup the driver before disabling
the AGP subsystem.

Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Dave Airlie committed Jan 7, 2009
1 parent 241fa85 commit a75f284
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a75f284

Please sign in to comment.