public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: drop the struct_mutex when wedged or trying to reset
@ 2016-11-28 10:36 Matthew Auld
  2016-11-28 10:59 ` ✓ Fi.CI.BAT: success for " Patchwork
  2016-11-28 11:21 ` [PATCH] " Joonas Lahtinen
  0 siblings, 2 replies; 6+ messages in thread
From: Matthew Auld @ 2016-11-28 10:36 UTC (permalink / raw)
  To: intel-gfx

We grab the struct_mutex in intel_crtc_page_flip, but if we are wedged
or a reset is in progress we bail early but never seem to actually
release the lock.

Fixes: 7f1847ebf48b ("drm/i915: Simplify checking of GPU reset_counter in display pageflips")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 5d11002319f7..772a72a21513 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12214,7 +12214,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
 	intel_crtc->reset_count = i915_reset_count(&dev_priv->gpu_error);
 	if (i915_reset_in_progress_or_wedged(&dev_priv->gpu_error)) {
 		ret = -EIO;
-		goto cleanup;
+		goto unlock;
 	}
 
 	atomic_inc(&intel_crtc->unpin_work_count);
@@ -12302,6 +12302,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
 	intel_unpin_fb_obj(fb, crtc->primary->state->rotation);
 cleanup_pending:
 	atomic_dec(&intel_crtc->unpin_work_count);
+unlock:
 	mutex_unlock(&dev->struct_mutex);
 cleanup:
 	crtc->primary->fb = old_fb;
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-11-29  9:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-28 10:36 [PATCH] drm/i915: drop the struct_mutex when wedged or trying to reset Matthew Auld
2016-11-28 10:59 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-11-28 11:21 ` [PATCH] " Joonas Lahtinen
2016-11-28 11:40   ` Jani Nikula
2016-11-28 12:10     ` Joonas Lahtinen
2016-11-29  9:26     ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox