drm/i915: cleanup mode setting before unmapping registers
authorJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 26 Mar 2010 18:07:21 +0000 (11:07 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 7 May 2010 20:59:30 +0000 (13:59 -0700)
We'll turn off outputs etc at unload time, so don't unmap the registers
before doing it.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_dma.c

index 03d1d3a1a6c1556d05b6be7f2bf47c16bd67e67f..bf7d601fc37d6c56fa569efe089e6ba7e4f3c7b0 100644 (file)
@@ -1758,6 +1758,8 @@ int i915_driver_unload(struct drm_device *dev)
        }
 
        if (drm_core_check_feature(dev, DRIVER_MODESET)) {
+               intel_modeset_cleanup(dev);
+
                /*
                 * free the memory space allocated for the child device
                 * config parsed from VBT
@@ -1781,8 +1783,6 @@ int i915_driver_unload(struct drm_device *dev)
        intel_opregion_free(dev, 0);
 
        if (drm_core_check_feature(dev, DRIVER_MODESET)) {
-               intel_modeset_cleanup(dev);
-
                i915_gem_free_all_phys_object(dev);
 
                mutex_lock(&dev->struct_mutex);