Skip to content

Commit

Permalink
drm/i915: fixup interrupted overlay switch off calls
Browse files Browse the repository at this point in the history
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 <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
  • Loading branch information
Daniel Vetter authored and Eric Anholt committed Nov 30, 2009
1 parent 12ca45f commit 9bedb97
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/gpu/drm/i915/intel_overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9bedb97

Please sign in to comment.