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.
This commit is contained in:
parent
538cf7be5e
commit
77e6a4072b
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user