diff mbox

[1/4] drm/i915/execlists: Check reset_in_progress()

Message ID 20180713201848.1495-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson July 13, 2018, 8:18 p.m. UTC
Check that reset_in_progress() is true when we process the reset.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_lrc.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Michel Thierry July 13, 2018, 8:32 p.m. UTC | #1
On 7/13/2018 1:18 PM, Chris Wilson wrote:
> Check that reset_in_progress() is true when we process the reset.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Michel Thierry <michel.thierry@intel.com>

> ---
>   drivers/gpu/drm/i915/intel_lrc.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 35d37af0cb9a..dd9f9219d7f1 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1962,6 +1962,7 @@ static void execlists_reset(struct intel_engine_cs *engine,
>          GEM_TRACE("%s request global=%x, current=%d\n",
>                    engine->name, request ? request->global_seqno : 0,
>                    intel_engine_get_seqno(engine));
> +       GEM_BUG_ON(!reset_in_progress(execlists));
> 
>          spin_lock_irqsave(&engine->timeline.lock, flags);
> 
> --
> 2.18.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
Chris Wilson July 13, 2018, 8:34 p.m. UTC | #2
Quoting Chris Wilson (2018-07-13 21:18:45)
> Check that reset_in_progress() is true when we process the reset.

Grr called from sanitize, so this is fatal across suspend.
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 35d37af0cb9a..dd9f9219d7f1 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1962,6 +1962,7 @@  static void execlists_reset(struct intel_engine_cs *engine,
 	GEM_TRACE("%s request global=%x, current=%d\n",
 		  engine->name, request ? request->global_seqno : 0,
 		  intel_engine_get_seqno(engine));
+	GEM_BUG_ON(!reset_in_progress(execlists));
 
 	spin_lock_irqsave(&engine->timeline.lock, flags);