mirror of
https://github.com/torvalds/linux
synced 2024-09-23 04:49:22 +00:00
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 8040513870
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu Nov 15 11:32:29 2012 +0000
drm/i915: Allocate overlay registers from stolen memory
v2: Rework the patch a bit as suggested by Chris Wilson:
- move the overlay teardown up, into the modeset cleanup
- move the stolen mm takedown into i915_gem_cleanup_stolen
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
dfd07d72cf
commit
4d7bb01162
|
@ -1737,9 +1737,6 @@ int i915_driver_unload(struct drm_device *dev)
|
||||||
mutex_unlock(&dev->struct_mutex);
|
mutex_unlock(&dev->struct_mutex);
|
||||||
i915_gem_cleanup_aliasing_ppgtt(dev);
|
i915_gem_cleanup_aliasing_ppgtt(dev);
|
||||||
i915_gem_cleanup_stolen(dev);
|
i915_gem_cleanup_stolen(dev);
|
||||||
drm_mm_takedown(&dev_priv->mm.stolen);
|
|
||||||
|
|
||||||
intel_cleanup_overlay(dev);
|
|
||||||
|
|
||||||
if (!I915_NEED_GFX_HWS(dev))
|
if (!I915_NEED_GFX_HWS(dev))
|
||||||
i915_free_hws(dev);
|
i915_free_hws(dev);
|
||||||
|
|
|
@ -173,7 +173,10 @@ void i915_gem_stolen_cleanup_compression(struct drm_device *dev)
|
||||||
|
|
||||||
void i915_gem_cleanup_stolen(struct drm_device *dev)
|
void i915_gem_cleanup_stolen(struct drm_device *dev)
|
||||||
{
|
{
|
||||||
|
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||||
|
|
||||||
i915_gem_stolen_cleanup_compression(dev);
|
i915_gem_stolen_cleanup_compression(dev);
|
||||||
|
drm_mm_takedown(&dev_priv->mm.stolen);
|
||||||
}
|
}
|
||||||
|
|
||||||
int i915_gem_init_stolen(struct drm_device *dev)
|
int i915_gem_init_stolen(struct drm_device *dev)
|
||||||
|
|
|
@ -8869,6 +8869,8 @@ void intel_modeset_cleanup(struct drm_device *dev)
|
||||||
flush_scheduled_work();
|
flush_scheduled_work();
|
||||||
|
|
||||||
drm_mode_config_cleanup(dev);
|
drm_mode_config_cleanup(dev);
|
||||||
|
|
||||||
|
intel_cleanup_overlay(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue