All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] Revert "drm/i915: Make prepare_plane_fb fully interruptible."
Date: Mon, 2 Nov 2015 13:41:03 +0100	[thread overview]
Message-ID: <563759DF.4070706@linux.intel.com> (raw)
In-Reply-To: <1446239209-8010-1-git-send-email-ville.syrjala@linux.intel.com>

Hey,

Op 30-10-15 om 22:06 schreef ville.syrjala@linux.intel.com:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> This reverts commit b26a6b35581c84124bd78b68cc02d171fbd572c9.
>
> commit b26a6b35581c ("drm/i915: Make prepare_plane_fb fully interruptible.")
> breaks GPU reset on gen3/4 machines. Go back to to non-interruptible.
>
I've done some digging and by forcing an unconditional modeset during reset I was able to trigger it on my system. It should be fixed by applying the rest of the interruptible
series so we can mask EIO, followed by replacing i915_mutex_lock_interruptible with mutex_lock_interruptible so there will be no waiting for gpu reset.
This is what's causing the deadlock here. :)

~Maarten

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 22c0f8a54053..df6dbbc85855 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3207,9 +3207,11 @@ void intel_prepare_reset(struct drm_device *dev)
 	if (IS_GEN2(dev))
 		return;
 
+#if 0
 	/* reset doesn't touch the display */
 	if (INTEL_INFO(dev)->gen >= 5 || IS_G4X(dev))
 		return;
+#endif
 
 	drm_modeset_lock_all(dev);
 	/*
@@ -3245,7 +3247,12 @@ void intel_finish_reset(struct drm_device *dev)
 		 * FIXME: Atomic will make this obsolete since we won't schedule
 		 * CS-based flips (which might get lost in gpu resets) any more.
 		 */
+#if 0
 		intel_update_primary_planes(dev);
+#else
+		intel_display_resume(dev);
+		drm_modeset_unlock_all(dev);
+#endif
 		return;
 	}
 
@@ -13174,12 +13181,12 @@ static int intel_atomic_prepare_commit(struct drm_device *dev,
 			flush_workqueue(dev_priv->wq);
 	}
 
-	ret = i915_mutex_lock_interruptible(dev);
+	ret = mutex_lock_interruptible(&dev->struct_mutex);
 	if (ret)
 		return ret;
 
 	ret = drm_atomic_helper_prepare_planes(dev, state);
-	if (!ret && !async) {
+	if (!ret && !async && !i915_reset_in_progress(&dev_priv->gpu_error)) {
 		u32 reset_counter;
 
 		reset_counter = atomic_read(&dev_priv->gpu_error.reset_counter);

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

  parent reply	other threads:[~2015-11-02 12:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 21:06 [PATCH] Revert "drm/i915: Make prepare_plane_fb fully interruptible." ville.syrjala
2015-11-02  8:50 ` Maarten Lankhorst
2015-11-02 12:41 ` Maarten Lankhorst [this message]
2015-11-02 15:38   ` Ville Syrjälä
2015-11-17 17:44     ` Daniel Vetter
2015-11-18  8:36       ` Maarten Lankhorst
2015-11-18  8:55         ` Daniel Vetter
2015-11-18  9:31           ` Ander Conselvan De Oliveira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=563759DF.4070706@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.