summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm2/i915/i915_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/drm2/i915/i915_dma.c')
-rw-r--r--sys/dev/drm2/i915/i915_dma.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/drm2/i915/i915_dma.c b/sys/dev/drm2/i915/i915_dma.c
index e2d8e4c..97a0eb9 100644
--- a/sys/dev/drm2/i915/i915_dma.c
+++ b/sys/dev/drm2/i915/i915_dma.c
@@ -1810,6 +1810,12 @@ int i915_driver_unload(struct drm_device *dev)
if (dev_priv->mmio_map != NULL)
drm_rmmap(dev, dev_priv->mmio_map);
+ /*
+ * NOTE Linux<->FreeBSD: Linux forgots to call
+ * i915_gem_gtt_fini(), causing memory leaks.
+ */
+ i915_gem_gtt_fini(dev);
+
if (dev_priv->wq != NULL)
taskqueue_free(dev_priv->wq);
OpenPOWER on IntegriCloud