Commit a75f2841 authored by Dave Airlie's avatar Dave Airlie
Browse files

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: default avatarDave Airlie <>
parent 241fa85b
......@@ -314,14 +314,14 @@ static void drm_cleanup(struct drm_device * dev)
DRM_DEBUG("mtrr_del=%d\n", retval);
if (dev->driver->unload)
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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment