drm/i915/selftests: Drop stale struct_mutex
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 15 Oct 2019 08:59:11 +0000 (09:59 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 16 Oct 2019 08:54:28 +0000 (09:54 +0100)
A lately added test was missed when applying the struct_mutex removal
patches. Do so now.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191015085911.10317-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/selftest_lrc.c

index 1276da059dc6c0bea4b527772466db3d712baf82..9c1f34fb5882f409f616982d3424e1ddb81437d8 100644 (file)
@@ -107,7 +107,6 @@ static int live_unlite_restore(struct drm_i915_private *i915, int prio)
        struct intel_engine_cs *engine;
        struct i915_gem_context *ctx;
        enum intel_engine_id id;
-       intel_wakeref_t wakeref;
        struct igt_spinner spin;
        int err = -ENOMEM;
 
@@ -116,11 +115,8 @@ static int live_unlite_restore(struct drm_i915_private *i915, int prio)
         * on the same engine from the same parent context.
         */
 
-       mutex_lock(&i915->drm.struct_mutex);
-       wakeref = intel_runtime_pm_get(&i915->runtime_pm);
-
        if (igt_spinner_init(&spin, &i915->gt))
-               goto err_unlock;
+               return err;
 
        ctx = kernel_context(i915);
        if (!ctx)
@@ -264,9 +260,6 @@ err_ce:
        kernel_context_close(ctx);
 err_spin:
        igt_spinner_fini(&spin);
-err_unlock:
-       intel_runtime_pm_put(&i915->runtime_pm, wakeref);
-       mutex_unlock(&i915->drm.struct_mutex);
        return err;
 }