diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2013-07-27 16:37:00 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-08-07 02:14:24 +0200 |
commit | 28ec711cd427f8b61f73712a43b8100ba8ca933b (patch) | |
tree | 1ceebcff67e41b55b570869984a15d62523aa8a7 /drivers/gpu/drm/drm_stub.c | |
parent | drm: don't push static constants on stack for %*ph (diff) | |
download | linux-28ec711cd427f8b61f73712a43b8100ba8ca933b.tar.xz linux-28ec711cd427f8b61f73712a43b8100ba8ca933b.zip |
drm/agp: move AGP cleanup paths to drm_agpsupport.c
Introduce two new helpers, drm_agp_clear() and drm_agp_destroy() which
clear all AGP mappings and destroy the AGP head. This allows to reduce the
AGP code in core DRM and move it all to drm_agpsupport.c.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_stub.c')
-rw-r--r-- | drivers/gpu/drm/drm_stub.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index 327ca19cda85..d663f7d66dab 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c @@ -451,16 +451,11 @@ void drm_put_dev(struct drm_device *dev) drm_lastclose(dev); - if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) && dev->agp) - arch_phys_wc_del(dev->agp->agp_mtrr); - if (dev->driver->unload) dev->driver->unload(dev); - if (drm_core_has_AGP(dev) && dev->agp) { - kfree(dev->agp); - dev->agp = NULL; - } + if (dev->driver->bus->agp_destroy) + dev->driver->bus->agp_destroy(dev); drm_vblank_cleanup(dev); |