]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
drm/i915: After a reset perform a forced modeset
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 18 Sep 2010 07:08:06 +0000 (08:08 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 21 Sep 2010 10:19:49 +0000 (11:19 +0100)
On more recent chipsets, restoring the display is not as simple as
writing a few registers, so force a full modeset of the current
configuration in order to retrain the display link.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_drv.c

index e88aabdfd1d92f930d3caf9193cfcba481e2d43d..e58e91736f81872693cdc824761ffa609ec7affc 100644 (file)
@@ -385,9 +385,6 @@ int i965_reset(struct drm_device *dev, u8 flags)
         */
        i915_gem_retire_requests(dev);
 
-       if (need_display)
-               i915_save_display(dev);
-
        /*
         * Set the domains we want to reset (GRDOM/bits 2 and 3) as
         * well as the reset bit (GR/bit 0).  Setting the GR bit
@@ -428,13 +425,19 @@ int i965_reset(struct drm_device *dev, u8 flags)
                mutex_lock(&dev->struct_mutex);
        }
 
+       mutex_unlock(&dev->struct_mutex);
+
        /*
-        * Display needs restore too...
+        * Perform a full modeset as on later generations, e.g. Ironlake, we may
+        * need to retrain the display link and cannot just restore the register
+        * values.
         */
-       if (need_display)
-               i915_restore_display(dev);
+       if (need_display) {
+               mutex_lock(&dev->mode_config.mutex);
+               drm_helper_resume_force_mode(dev);
+               mutex_unlock(&dev->mode_config.mutex);
+       }
 
-       mutex_unlock(&dev->struct_mutex);
        return 0;
 }