Skip to content

Commit e411072

Browse files
matt-auldjnikula
authored andcommitted
drm/i915: drop the struct_mutex when wedged or trying to reset
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: 7f1847e ("drm/i915: Simplify checking of GPU reset_counter in display pageflips") Cc: Chris Wilson <[email protected]> Signed-off-by: Matthew Auld <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Joonas Lahtinen <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Cc: <[email protected]> # v4.7+ (cherry picked from commit ddbb271) Signed-off-by: Jani Nikula <[email protected]>
1 parent 2420489 commit e411072

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12260,7 +12260,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
1226012260
intel_crtc->reset_count = i915_reset_count(&dev_priv->gpu_error);
1226112261
if (i915_reset_in_progress_or_wedged(&dev_priv->gpu_error)) {
1226212262
ret = -EIO;
12263-
goto cleanup;
12263+
goto unlock;
1226412264
}
1226512265

1226612266
atomic_inc(&intel_crtc->unpin_work_count);
@@ -12352,6 +12352,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
1235212352
intel_unpin_fb_obj(fb, crtc->primary->state->rotation);
1235312353
cleanup_pending:
1235412354
atomic_dec(&intel_crtc->unpin_work_count);
12355+
unlock:
1235512356
mutex_unlock(&dev->struct_mutex);
1235612357
cleanup:
1235712358
crtc->primary->fb = old_fb;

0 commit comments

Comments
 (0)