diff options
author | Dave Airlie <airlied@redhat.com> | 2008-11-03 09:33:32 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-11-03 09:33:32 +1000 |
commit | fd9e05b3f4f464ddf08097817a3af824f54a97ca (patch) | |
tree | 414e36abffb6d20f5fbaf77ff936feb05e51cb36 /shared-core/radeon_cp.c | |
parent | 624da91277ee33936ea3cfaf20e7f6775293deb2 (diff) |
radeon: release agp on module unload
Diffstat (limited to 'shared-core/radeon_cp.c')
-rw-r--r-- | shared-core/radeon_cp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c index b6207c7d..8e97f034 100644 --- a/shared-core/radeon_cp.c +++ b/shared-core/radeon_cp.c @@ -2476,6 +2476,12 @@ int radeon_modeset_agp_init(struct drm_device *dev) } return 0; } + +void radeon_modeset_agp_destroy(struct drm_device *dev) +{ + if (dev->agp->acquired) + drm_agp_release(dev); +} #endif int radeon_modeset_cp_init(struct drm_device *dev) @@ -2790,6 +2796,10 @@ int radeon_driver_unload(struct drm_device *dev) drm_irq_uninstall(dev); radeon_modeset_cleanup(dev); radeon_gem_mm_fini(dev); +#if __OS_HAS_AGP + if (dev_priv->flags & RADEON_IS_AGP) + radeon_modeset_agp_destroy(dev); +#endif } drm_bo_driver_finish(dev); |