Skip to content

Commit

Permalink
drm/i915: Fix oops on HWS unload
Browse files Browse the repository at this point in the history
Freeing the Hardware Status Page was writing to the HWS register in
order to disable the GPU writing to the HWS page. Unfortunately, we were
writing to the mmio register after unmapping the register space, hence
the oops.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Daniel Vetter authored and Chris Wilson committed Oct 19, 2010
1 parent 939fe4d commit 701394c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -2133,9 +2133,6 @@ int i915_driver_unload(struct drm_device *dev)
if (dev->pdev->msi_enabled)
pci_disable_msi(dev->pdev);

if (dev_priv->regs != NULL)
iounmap(dev_priv->regs);

intel_opregion_fini(dev);

if (drm_core_check_feature(dev, DRIVER_MODESET)) {
Expand All @@ -2157,6 +2154,9 @@ int i915_driver_unload(struct drm_device *dev)
i915_free_hws(dev);
}

if (dev_priv->regs != NULL)
iounmap(dev_priv->regs);

intel_teardown_gmbus(dev);
intel_teardown_mchbar(dev);

Expand Down

0 comments on commit 701394c

Please sign in to comment.