]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/i915: use drm_mm_takedown
authorBen Widawsky <ben@bwidawsk.net>
Sat, 25 May 2013 19:26:37 +0000 (12:26 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 26 May 2013 13:25:37 +0000 (15:25 +0200)
I noticed this while doing the VMA abstraction. AFAICT, it won't
actually fix anything, but it is the correct thing to do.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c

index 3cda7521e8d77af7ded93543741d22c4feda10d4..45283679ac874c2f0f27b68b2f268d67b816423e 100644 (file)
@@ -1361,6 +1361,7 @@ cleanup_gem:
        i915_gem_cleanup_ringbuffer(dev);
        mutex_unlock(&dev->struct_mutex);
        i915_gem_cleanup_aliasing_ppgtt(dev);
+       drm_mm_takedown(&dev_priv->mm.gtt_space);
 cleanup_irq:
        drm_irq_uninstall(dev);
 cleanup_gem_stolen:
@@ -1778,6 +1779,7 @@ int i915_driver_unload(struct drm_device *dev)
                        i915_free_hws(dev);
        }
 
+       drm_mm_takedown(&dev_priv->mm.gtt_space);
        if (dev_priv->regs != NULL)
                pci_iounmap(dev->pdev, dev_priv->regs);