diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-27 15:17:41 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-05 19:46:17 +0200 |
commit | bcbc324a2136849a6264e775a465921856286e06 (patch) | |
tree | 43a91f633efeade068b64296fd96c0016b98dcb3 /drivers/gpu/drm/i915/i915_drv.c | |
parent | d54423037f141518950f324af88a551a82449496 (diff) |
drm/i915: simplify i915_reset a bit
- need_display is always true, scrap it.
- don't reacquire the mutex to do nothing after having restored the
gem state.
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 90a84f9de8e..3ffa9e7c0a8 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -787,11 +787,6 @@ static int gen6_do_reset(struct drm_device *dev, u8 flags) int i915_reset(struct drm_device *dev, u8 flags) { drm_i915_private_t *dev_priv = dev->dev_private; - /* - * We really should only reset the display subsystem if we actually - * need to - */ - bool need_display = true; int ret; if (!i915_try_reset) @@ -865,22 +860,18 @@ int i915_reset(struct drm_device *dev, u8 flags) drm_irq_uninstall(dev); drm_mode_config_reset(dev); drm_irq_install(dev); - - mutex_lock(&dev->struct_mutex); + } else { + mutex_unlock(&dev->struct_mutex); } - mutex_unlock(&dev->struct_mutex); - /* * 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) { - mutex_lock(&dev->mode_config.mutex); - drm_helper_resume_force_mode(dev); - mutex_unlock(&dev->mode_config.mutex); - } + mutex_lock(&dev->mode_config.mutex); + drm_helper_resume_force_mode(dev); + mutex_unlock(&dev->mode_config.mutex); return 0; } |