drm/i915: fixup overlay stolen memory leak
Subsystems (2)
PATCH 1/1 drm/i915: fixup overlay stolen memory leak
We need to clean up the overlay first, before taking down the stolen memory allocator.
This regression has been introducec in
commit 8040513870399f1cb032cb8bc805df5042fedcdf
Author: Chris Wilson <[email protected]> Date: Thu Nov 15 11:32:29 2012 +0000
drm/i915: Allocate overlay registers from stolen memory
--- drivers/gpu/drm/i915/i915_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_dma.c +1 -1
@@ -1720,9 +1720,9 @@ int i915_driver_unload(struct drm_device *dev)mutex_unlock (&dev->struct_mutex);i915_gem_cleanup_aliasing_ppgtt (dev);i915_gem_cleanup_stolen (dev); -drm_mm_takedown (&dev_priv->mm.stolen);intel_cleanup_overlay (dev); +drm_mm_takedown (&dev_priv->mm.stolen);if (!I915_NEED_GFX_HWS (dev))i915_free_hws (dev);
Signature · 1 line
1.7.10.4
Quoted 10 lines · Daniel Vetter
We need to clean up the overlay first, before taking down the stolen memory allocator.
This regression has been introducec in
commit
8040513870399f1cb032cb8bc805df5042fedcdfAuthor: Chris Wilson <[email protected]> Date: Thu Nov 15 11:32:29 2012 +0000drm/i915: Allocate overlay registers from stolen memory
Time for a philosophical debate; I suggest the bug was latent and that the cleanup order was wrong originally. Here, we probably want to cleanup the overlay earlier, before we start tidying up the [pp]gtt etc. Also you want to move the drm_mm_takedown() into i915_gem_cleanup_stolen() for symmetry.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre