All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Suppress busy status for engines if wedged
@ 2017-03-30  8:37 Chris Wilson
  2017-03-30 11:00 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-03-30 12:02 ` [PATCH] " Joonas Lahtinen
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2017-03-30  8:37 UTC (permalink / raw)
  To: intel-gfx

If the driver is wedged, HW state may be very inconsistent and
report that it is still busy, even though we have stopped using it. This
can lead to a double *ERROR* rather than a graceful cleanup after
wedging.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c        | 4 +---
 drivers/gpu/drm/i915/intel_engine_cs.c | 9 +++++++++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 365ca4d9f63c..968bd88d01d2 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3112,9 +3112,7 @@ i915_gem_idle_work_handler(struct work_struct *work)
 	 * Wait for last execlists context complete, but bail out in case a
 	 * new request is submitted.
 	 */
-	wait_for(READ_ONCE(dev_priv->gt.active_requests) ||
-		 intel_engines_are_idle(dev_priv),
-		 10);
+	wait_for(intel_engines_are_idle(dev_priv), 10);
 	if (READ_ONCE(dev_priv->gt.active_requests))
 		return;
 
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index ef3c62000697..156e4bc2a935 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -1111,6 +1111,15 @@ bool intel_engines_are_idle(struct drm_i915_private *dev_priv)
 	struct intel_engine_cs *engine;
 	enum intel_engine_id id;
 
+	if (READ_ONCE(dev_priv->gt.active_requests))
+		return false;
+
+	/* If the driver is wedged, HW state may be very inconsistent and
+	 * report that it is still busy, even though we have stopped using it.
+	 */
+	if (i915_terminally_wedged(&dev_priv->gpu_error))
+		return true;
+
 	for_each_engine(engine, dev_priv, id) {
 		if (!intel_engine_is_idle(engine))
 			return false;
-- 
2.11.0

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

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

* ✓ Fi.CI.BAT: success for drm/i915: Suppress busy status for engines if wedged
  2017-03-30  8:37 [PATCH] drm/i915: Suppress busy status for engines if wedged Chris Wilson
@ 2017-03-30 11:00 ` Patchwork
  2017-03-30 12:02 ` [PATCH] " Joonas Lahtinen
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2017-03-30 11:00 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Suppress busy status for engines if wedged
URL   : https://patchwork.freedesktop.org/series/22176/
State : success

== Summary ==

Series 22176v1 drm/i915: Suppress busy status for engines if wedged
https://patchwork.freedesktop.org/api/1.0/series/22176/revisions/1/mbox/

Test kms_flip:
        Subgroup basic-flip-vs-wf_vblank:
                fail       -> PASS       (fi-skl-6770hq) fdo#99739

fdo#99739 https://bugs.freedesktop.org/show_bug.cgi?id=99739

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time: 434s
fi-bdw-gvtdvm    total:278  pass:256  dwarn:8   dfail:0   fail:0   skip:14  time: 432s
fi-bsw-n3050     total:278  pass:239  dwarn:0   dfail:0   fail:0   skip:39  time: 578s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time: 510s
fi-bxt-t5700     total:278  pass:258  dwarn:0   dfail:0   fail:0   skip:20  time: 542s
fi-byt-j1900     total:278  pass:251  dwarn:0   dfail:0   fail:0   skip:27  time: 486s
fi-byt-n2820     total:278  pass:247  dwarn:0   dfail:0   fail:0   skip:31  time: 485s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 410s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 415s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time: 419s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 491s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 467s
fi-kbl-7500u     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 452s
fi-kbl-7560u     total:278  pass:267  dwarn:1   dfail:0   fail:0   skip:10  time: 567s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 461s
fi-skl-6700hq    total:278  pass:261  dwarn:0   dfail:0   fail:0   skip:17  time: 572s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time: 462s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 487s
fi-skl-gvtdvm    total:278  pass:265  dwarn:0   dfail:0   fail:0   skip:13  time: 436s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time: 532s
fi-snb-2600      total:278  pass:249  dwarn:0   dfail:0   fail:0   skip:29  time: 400s

66e17cacf58689a0d6ca38138217e667d100a64a drm-tip: 2017y-03m-30d-10h-12m-59s UTC integration manifest
53c9b8e2 drm/i915: Suppress busy status for engines if wedged

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4354/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Suppress busy status for engines if wedged
  2017-03-30  8:37 [PATCH] drm/i915: Suppress busy status for engines if wedged Chris Wilson
  2017-03-30 11:00 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-03-30 12:02 ` Joonas Lahtinen
  1 sibling, 0 replies; 3+ messages in thread
From: Joonas Lahtinen @ 2017-03-30 12:02 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On to, 2017-03-30 at 09:37 +0100, Chris Wilson wrote:
> If the driver is wedged, HW state may be very inconsistent and
> report that it is still busy, even though we have stopped using it. This
> can lead to a double *ERROR* rather than a graceful cleanup after
> wedging.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-03-30 12:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30  8:37 [PATCH] drm/i915: Suppress busy status for engines if wedged Chris Wilson
2017-03-30 11:00 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-03-30 12:02 ` [PATCH] " Joonas Lahtinen

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.