Commit 1e5deb26 authored by Chris Wilson's avatar Chris Wilson

drm/i915/selftests: Drop manual request wakerefs around hangcheck

We no longer need to manually acquire a wakeref for request emission, so
drop the redundant wakerefs, letting us test our wakeref handling more
precisely.

References: 79ffac85 ("drm/i915: Invert the GEM wakeref hierarchy")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190626134433.6318-2-chris@chris-wilson.co.uk
parent d8474795
...@@ -373,7 +373,6 @@ static int igt_reset_nop(void *arg) ...@@ -373,7 +373,6 @@ static int igt_reset_nop(void *arg)
struct i915_gem_context *ctx; struct i915_gem_context *ctx;
unsigned int reset_count, count; unsigned int reset_count, count;
enum intel_engine_id id; enum intel_engine_id id;
intel_wakeref_t wakeref;
struct drm_file *file; struct drm_file *file;
IGT_TIMEOUT(end_time); IGT_TIMEOUT(end_time);
int err = 0; int err = 0;
...@@ -393,7 +392,6 @@ static int igt_reset_nop(void *arg) ...@@ -393,7 +392,6 @@ static int igt_reset_nop(void *arg)
} }
i915_gem_context_clear_bannable(ctx); i915_gem_context_clear_bannable(ctx);
wakeref = intel_runtime_pm_get(&i915->runtime_pm);
reset_count = i915_reset_count(&i915->gpu_error); reset_count = i915_reset_count(&i915->gpu_error);
count = 0; count = 0;
do { do {
...@@ -442,8 +440,6 @@ static int igt_reset_nop(void *arg) ...@@ -442,8 +440,6 @@ static int igt_reset_nop(void *arg)
err = igt_flush_test(i915, I915_WAIT_LOCKED); err = igt_flush_test(i915, I915_WAIT_LOCKED);
mutex_unlock(&i915->drm.struct_mutex); mutex_unlock(&i915->drm.struct_mutex);
intel_runtime_pm_put(&i915->runtime_pm, wakeref);
out: out:
mock_file_free(i915, file); mock_file_free(i915, file);
if (i915_reset_failed(i915)) if (i915_reset_failed(i915))
...@@ -457,7 +453,6 @@ static int igt_reset_nop_engine(void *arg) ...@@ -457,7 +453,6 @@ static int igt_reset_nop_engine(void *arg)
struct intel_engine_cs *engine; struct intel_engine_cs *engine;
struct i915_gem_context *ctx; struct i915_gem_context *ctx;
enum intel_engine_id id; enum intel_engine_id id;
intel_wakeref_t wakeref;
struct drm_file *file; struct drm_file *file;
int err = 0; int err = 0;
...@@ -479,7 +474,6 @@ static int igt_reset_nop_engine(void *arg) ...@@ -479,7 +474,6 @@ static int igt_reset_nop_engine(void *arg)
} }
i915_gem_context_clear_bannable(ctx); i915_gem_context_clear_bannable(ctx);
wakeref = intel_runtime_pm_get(&i915->runtime_pm);
for_each_engine(engine, i915, id) { for_each_engine(engine, i915, id) {
unsigned int reset_count, reset_engine_count; unsigned int reset_count, reset_engine_count;
unsigned int count; unsigned int count;
...@@ -549,7 +543,6 @@ static int igt_reset_nop_engine(void *arg) ...@@ -549,7 +543,6 @@ static int igt_reset_nop_engine(void *arg)
err = igt_flush_test(i915, I915_WAIT_LOCKED); err = igt_flush_test(i915, I915_WAIT_LOCKED);
mutex_unlock(&i915->drm.struct_mutex); mutex_unlock(&i915->drm.struct_mutex);
intel_runtime_pm_put(&i915->runtime_pm, wakeref);
out: out:
mock_file_free(i915, file); mock_file_free(i915, file);
if (i915_reset_failed(i915)) if (i915_reset_failed(i915))
......
...@@ -63,8 +63,8 @@ static int igt_atomic_reset(void *arg) ...@@ -63,8 +63,8 @@ static int igt_atomic_reset(void *arg)
/* Check that the resets are usable from atomic context */ /* Check that the resets are usable from atomic context */
intel_gt_pm_get(&i915->gt);
igt_global_reset_lock(i915); igt_global_reset_lock(i915);
mutex_lock(&i915->drm.struct_mutex);
/* Flush any requests before we get started and check basics */ /* Flush any requests before we get started and check basics */
if (!igt_force_reset(i915)) if (!igt_force_reset(i915))
...@@ -89,8 +89,8 @@ static int igt_atomic_reset(void *arg) ...@@ -89,8 +89,8 @@ static int igt_atomic_reset(void *arg)
igt_force_reset(i915); igt_force_reset(i915);
unlock: unlock:
mutex_unlock(&i915->drm.struct_mutex);
igt_global_reset_unlock(i915); igt_global_reset_unlock(i915);
intel_gt_pm_put(&i915->gt);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment