diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-04-26 17:33:30 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-04-26 18:32:03 +0100 |
commit | f7f28de7e5b2d89826a06c1cf9eea41904a5eda8 (patch) | |
tree | 9974ca4d934b642d426a327c58f1603fa445bdb9 /drivers/gpu/drm/i915/selftests | |
parent | fa9f668141f4e5590837845ffc1dc4f5aca7a0a5 (diff) | |
download | linux-stable-f7f28de7e5b2d89826a06c1cf9eea41904a5eda8.tar.gz linux-stable-f7f28de7e5b2d89826a06c1cf9eea41904a5eda8.tar.bz2 linux-stable-f7f28de7e5b2d89826a06c1cf9eea41904a5eda8.zip |
drm/i915/selftests: Use the real kernel context for sseu isolation tests
Simply the setup slightly for the sseu selftests to use the actual
kernel_context.
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/20190426163336.15906-3-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/selftests')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/i915_gem_context.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/selftests/i915_gem_context.c index 71d896bbade2..807644ae6877 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c @@ -957,7 +957,6 @@ __sseu_finish(struct drm_i915_private *i915, const char *name, unsigned int flags, struct i915_gem_context *ctx, - struct i915_gem_context *kctx, struct intel_engine_cs *engine, struct drm_i915_gem_object *obj, unsigned int expected, @@ -979,7 +978,8 @@ __sseu_finish(struct drm_i915_private *i915, if (ret) goto out; - ret = __read_slice_count(i915, kctx, engine, obj, NULL, &rpcs); + ret = __read_slice_count(i915, i915->kernel_context, engine, obj, + NULL, &rpcs); ret = __check_rpcs(name, rpcs, ret, slices, "Kernel context", "!"); out: @@ -1011,22 +1011,17 @@ __sseu_test(struct drm_i915_private *i915, struct intel_sseu sseu) { struct igt_spinner *spin = NULL; - struct i915_gem_context *kctx; int ret; - kctx = kernel_context(i915); - if (IS_ERR(kctx)) - return PTR_ERR(kctx); - ret = __sseu_prepare(i915, name, flags, ctx, engine, &spin); if (ret) - goto out_context; + return ret; ret = __i915_gem_context_reconfigure_sseu(ctx, engine, sseu); if (ret) goto out_spin; - ret = __sseu_finish(i915, name, flags, ctx, kctx, engine, obj, + ret = __sseu_finish(i915, name, flags, ctx, engine, obj, hweight32(sseu.slice_mask), spin); out_spin: @@ -1035,10 +1030,6 @@ out_spin: igt_spinner_fini(spin); kfree(spin); } - -out_context: - kernel_context_close(kctx); - return ret; } |