From: Keith Packard Date: Thu, 7 Oct 2010 08:20:12 +0000 (+0100) Subject: drm/i915: Free hardware status page on unload when physically mapped X-Git-Tag: v2.6.35.10~172 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d428b23edbf023b941cbf54fed79a591a1348b32;p=karo-tx-linux.git drm/i915: Free hardware status page on unload when physically mapped commit c2873e9633fe908dccd36dbb1d370e9c59a1ca62 upstream. A physically mapped hardware status page is allocated at driver load time but was never freed. Call the existing code to free this page at driver unload time on hardware which uses this kind. Signed-off-by: Keith Packard Signed-off-by: Andi Kleen [ickle: call before tearing down registers on KMS-only path, as pointed out by Dave Airlie] Signed-off-by: Chris Wilson Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index d396fe5915dd..bdd39fb96590 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -2297,6 +2297,9 @@ int i915_driver_unload(struct drm_device *dev) i915_gem_lastclose(dev); intel_cleanup_overlay(dev); + + if (!I915_NEED_GFX_HWS(dev)) + i915_free_hws(dev); } intel_teardown_mchbar(dev);