]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.36.2/drm-i915-free-hardware-status-page-on-unload-when-physically-mapped.patch
Fixes for 5.10
[thirdparty/kernel/stable-queue.git] / releases / 2.6.36.2 / drm-i915-free-hardware-status-page-on-unload-when-physically-mapped.patch
1 From c2873e9633fe908dccd36dbb1d370e9c59a1ca62 Mon Sep 17 00:00:00 2001
2 From: Keith Packard <keithp@keithp.com>
3 Date: Thu, 7 Oct 2010 09:20:12 +0100
4 Subject: drm/i915: Free hardware status page on unload when physically mapped
5
6 From: Keith Packard <keithp@keithp.com>
7
8 commit c2873e9633fe908dccd36dbb1d370e9c59a1ca62 upstream.
9
10 A physically mapped hardware status page is allocated at driver load
11 time but was never freed. Call the existing code to free this page at
12 driver unload time on hardware which uses this kind.
13
14 Signed-off-by: Keith Packard <keithp@keithp.com>
15 [ickle: call before tearing down registers on KMS-only path, as pointed
16 out by Dave Airlie]
17 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19
20 ---
21 drivers/gpu/drm/i915/i915_dma.c | 3 +++
22 1 file changed, 3 insertions(+)
23
24 --- a/drivers/gpu/drm/i915/i915_dma.c
25 +++ b/drivers/gpu/drm/i915/i915_dma.c
26 @@ -2306,6 +2306,9 @@ int i915_driver_unload(struct drm_device
27 i915_gem_lastclose(dev);
28
29 intel_cleanup_overlay(dev);
30 +
31 + if (!I915_NEED_GFX_HWS(dev))
32 + i915_free_hws(dev);
33 }
34
35 intel_teardown_mchbar(dev);