diff options
author | dumbbell <dumbbell@FreeBSD.org> | 2016-03-12 11:57:32 +0000 |
---|---|---|
committer | dumbbell <dumbbell@FreeBSD.org> | 2016-03-12 11:57:32 +0000 |
commit | 3c057e4b1fa0583a4ca025153e05a66869a4396e (patch) | |
tree | 6dc2d7ee68248e48cf186e0518e7be12ba905be5 /sys/dev/drm2/i915 | |
parent | 5d06908346a0d9e815ab557d810bf06c3ed08665 (diff) | |
download | FreeBSD-src-3c057e4b1fa0583a4ca025153e05a66869a4396e.zip FreeBSD-src-3c057e4b1fa0583a4ca025153e05a66869a4396e.tar.gz |
drm/i915: Call i915_gem_gtt_fini() when the device is detached
This fixes several memory leaks. Apparently, this problem exists in
Linux 3.8 but the code changed in Linux 3.9 so it may be fixed upstream
already. Still, this is something we need to pay attention to.
Diffstat (limited to 'sys/dev/drm2/i915')
-rw-r--r-- | sys/dev/drm2/i915/i915_dma.c | 6 |
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); |