diff mbox

[2/2] drm/i915: fixup interrupted overlay switch off calls

Message ID 64dfec58a58d57b0bbf90727545b53c98a14e52d.2124259224.git.daniel.vetter@ffwll.ch (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Daniel Vetter April 25, 2037, 8:08 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
index d18f563..1e4557a 100644
--- a/drivers/gpu/drm/i915/intel_overlay.c
+++ b/drivers/gpu/drm/i915/intel_overlay.c
@@ -880,12 +880,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;
+	}
+
 	if (!overlay->active)
 		return 0;
 
-	if (overlay->hw_wedged)
-		return -EBUSY;
-
 	ret = intel_overlay_release_old_vid(overlay);
 	if (ret != 0)
 		return ret;