aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-18 03:08:06 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-21 06:19:49 -0400
commit9fd981413e005827e7363a37fd0b61f9d0928034 (patch)
tree74916f63f50b8813c1d4f9c25c6bc8415ef98c10 /drivers/gpu/drm/i915/i915_drv.c
parent0573ed4a947d7a563db197511611d8a9039feb41 (diff)
drm/i915: After a reset perform a forced modeset
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>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index e88aabdfd1d9..e58e91736f81 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -385,9 +385,6 @@ int i965_reset(struct drm_device *dev, u8 flags)
385 */ 385 */
386 i915_gem_retire_requests(dev); 386 i915_gem_retire_requests(dev);
387 387
388 if (need_display)
389 i915_save_display(dev);
390
391 /* 388 /*
392 * Set the domains we want to reset (GRDOM/bits 2 and 3) as 389 * Set the domains we want to reset (GRDOM/bits 2 and 3) as
393 * well as the reset bit (GR/bit 0). Setting the GR bit 390 * 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)
428 mutex_lock(&dev->struct_mutex); 425 mutex_lock(&dev->struct_mutex);
429 } 426 }
430 427
428 mutex_unlock(&dev->struct_mutex);
429
431 /* 430 /*
432 * Display needs restore too... 431 * Perform a full modeset as on later generations, e.g. Ironlake, we may
432 * need to retrain the display link and cannot just restore the register
433 * values.
433 */ 434 */
434 if (need_display) 435 if (need_display) {
435 i915_restore_display(dev); 436 mutex_lock(&dev->mode_config.mutex);
437 drm_helper_resume_force_mode(dev);
438 mutex_unlock(&dev->mode_config.mutex);
439 }
436 440
437 mutex_unlock(&dev->struct_mutex);
438 return 0; 441 return 0;
439} 442}
440 443