From: Daniel Vetter Date: Sun, 10 Oct 2010 17:54:08 +0000 (+0100) Subject: drm/i915: Fix oops on HWS unload X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=701394cc534a4a7883ddc4f8f82fb438b3d664ff;p=openwrt%2Fstaging%2Fblogic.git drm/i915: Fix oops on HWS unload 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 Signed-off-by: Chris Wilson --- diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index f451af69d437..2caf43de8a6a 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -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)) { @@ -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);