drm/i915: Free hardware status page on unload when physically mapped
Subsystems (2)
PATCH 1/1 drm/i915: Free hardware status page on unload when physically mapped
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.
--- drivers/gpu/drm/i915/i915_dma.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +3 -0
@@ -2305,6 +2305,9 @@ int i915_driver_unload(struct drm_device *dev)intel_cleanup_overlay (dev); } +if (!I915_NEED_GFX_HWS (dev)) +i915_free_hws (dev); +intel_teardown_mchbar (dev);pci_dev_put (dev_priv->bridge_dev);
Signature · 1 line
1.7.1
Quoted 3 lines · Keith Packard
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.
the free_hws gets called after we disappear the mmio mapping for the registers. it then writes a register after killing the hws, and oopses.
Dave.
Quoted 20 lines
Signed-off-by Keith Packard <[email protected]>--- drivers/gpu/drm/i915/i915_dma.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)drivers/gpu/drm/i915/i915_dma.c +3
-0@@ -2305,6 +2305,9 @@ int i915_driver_unload(struct drm_device *dev)intel_cleanup_overlay (dev); } +if (!I915_NEED_GFX_HWS (dev)) +i915_free_hws (dev); +intel_teardown_mchbar (dev);pci_dev_put (dev_priv->bridge_dev);
Quoted 7 lines · Dave Airlie
Quoted 3 lines · Keith Packard
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.
the
free_hwsgets called after we disappear the mmio mapping for the registers. it then writes a register after killing the hws, and oopses.
Right, freeing the hws page is a definite oversight. It looks like we should only be doing so on the KMS-only path anyway which neatly pulls the call before the mmio teardown.
Applied with the amendment to -next.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre