diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-04-07 01:03:53 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-04-07 01:43:47 +0300 |
commit | bba0869b18e44ff2f713c98575ddad8c7c5e9b10 (patch) | |
tree | 0643eac57745fbd5c143016ec3a395e34b329bfe /drivers/gpu/drm/i915/selftests | |
parent | e4d2006f8f040825fa371e774a5debacdbf20b08 (diff) | |
download | linux-bba0869b18e44ff2f713c98575ddad8c7c5e9b10.tar.xz |
drm/i915: Treat i915_reset_engine() as guilty until proven innocent
If we are resetting just one engine, we know it has stalled. So we can
pass the stalled parameter directly to i915_gem_reset_engine(), which
alleviates the necessity to poke at the generic engine->hangcheck.stalled
magic variable, leaving that under control of hangcheck as its name
implies. Other than simplifying by removing the indirect parameter along
this path, this allows us to introduce new reset mechanisms that run
independently of hangcheck.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Jeff McGee <jeff.mcgee@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180406220354.18911-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/selftests')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c index 8650853c8cb3..acfb4dcc9fb5 100644 --- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c +++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c @@ -522,9 +522,6 @@ static int __igt_reset_engine(struct drm_i915_private *i915, bool active) i915_request_put(rq); } - engine->hangcheck.stalled = true; - engine->hangcheck.seqno = seqno; - err = i915_reset_engine(engine, NULL); if (err) { pr_err("i915_reset_engine failed\n"); @@ -545,8 +542,6 @@ static int __igt_reset_engine(struct drm_i915_private *i915, bool active) err = -EINVAL; break; } - - engine->hangcheck.stalled = false; } while (time_before(jiffies, end_time)); clear_bit(I915_RESET_ENGINE + id, &i915->gpu_error.flags); @@ -764,9 +759,6 @@ static int __igt_reset_engines(struct drm_i915_private *i915, seqno = rq->global_seqno - 1; } - engine->hangcheck.stalled = true; - engine->hangcheck.seqno = seqno; - err = i915_reset_engine(engine, NULL); if (err) { pr_err("i915_reset_engine(%s:%s): failed, err=%d\n", @@ -774,7 +766,6 @@ static int __igt_reset_engines(struct drm_i915_private *i915, break; } - engine->hangcheck.stalled = false; count++; if (rq) { |