From: Daniel Vetter Date: Mon, 30 Nov 2009 14:55:49 +0000 (+0100) Subject: drm/i915: fixup interrupted overlay switch off calls X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9bedb9743fd906e4160468663ee6e1bbdc4412b8;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm/i915: fixup interrupted overlay switch off calls When switching to interruptible sleeps in the overlay code, I've forgotten to recover from interruptions at one site. This resulted in the overlay still running when it should have been switched off. This in turn caused a hang on resume because it tried to disable the (not-running) overlay in preparation for the resume modeset. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=24980 Tested-by: maximlevitsky@gmail.com Signed-off-by: Daniel Vetter Signed-off-by: Eric Anholt --- diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index b97c5c562aa1..49110b3aab6a 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c @@ -842,12 +842,15 @@ int intel_overlay_switch_off(struct intel_overlay *overlay) BUG_ON(!mutex_is_locked(&dev->struct_mutex)); BUG_ON(!mutex_is_locked(&dev->mode_config.mutex)); + if (overlay->hw_wedged) { + ret = intel_overlay_recover_from_interrupt(overlay, 1); + if (ret != 0) + return ret; + } + if (!overlay->active) return 0; - if (overlay->hw_wedged) - return -EBUSY; - ret = intel_overlay_release_old_vid(overlay); if (ret != 0) return ret;