On Sat, Jan 25, 2025 at 12:38:46AM +0000, linux@xxxxxxxxxxx wrote: > From: "Dr. David Alan Gilbert" <linux@xxxxxxxxxxx> > > The last use of live_context_for_engine() was removed in 2021 by > commit 99919be74aa3 ("drm/i915/gem: Zap the i915_gem_object_blt code") > > Remove it. > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> > Signed-off-by: Dr. David Alan Gilbert <linux@xxxxxxxxxxx> > --- > .../gpu/drm/i915/gem/selftests/mock_context.c | 38 ------------------- > .../gpu/drm/i915/gem/selftests/mock_context.h | 3 -- > 2 files changed, 41 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gem/selftests/mock_context.c b/drivers/gpu/drm/i915/gem/selftests/mock_context.c > index 2b0327cc47c2..fd8babb513e5 100644 > --- a/drivers/gpu/drm/i915/gem/selftests/mock_context.c > +++ b/drivers/gpu/drm/i915/gem/selftests/mock_context.c > @@ -107,44 +107,6 @@ live_context(struct drm_i915_private *i915, struct file *file) > return ERR_PTR(err); > } > > -struct i915_gem_context * > -live_context_for_engine(struct intel_engine_cs *engine, struct file *file) > -{ > - struct i915_gem_engines *engines; > - struct i915_gem_context *ctx; > - struct intel_sseu null_sseu = {}; > - struct intel_context *ce; > - > - engines = alloc_engines(1); > - if (!engines) > - return ERR_PTR(-ENOMEM); > - > - ctx = live_context(engine->i915, file); > - if (IS_ERR(ctx)) { > - __free_engines(engines, 0); > - return ctx; > - } > - > - ce = intel_context_create(engine); > - if (IS_ERR(ce)) { > - __free_engines(engines, 0); > - return ERR_CAST(ce); > - } > - > - intel_context_set_gem(ce, ctx, null_sseu); > - engines->engines[0] = ce; > - engines->num_engines = 1; > - > - mutex_lock(&ctx->engines_mutex); > - i915_gem_context_set_user_engines(ctx); > - engines = rcu_replace_pointer(ctx->engines, engines, 1); > - mutex_unlock(&ctx->engines_mutex); > - > - engines_idle_release(ctx, engines); > - > - return ctx; > -} > - > struct i915_gem_context * > kernel_context(struct drm_i915_private *i915, > struct i915_address_space *vm) > diff --git a/drivers/gpu/drm/i915/gem/selftests/mock_context.h b/drivers/gpu/drm/i915/gem/selftests/mock_context.h > index 7a02fd9b5866..bc8fb37d2d24 100644 > --- a/drivers/gpu/drm/i915/gem/selftests/mock_context.h > +++ b/drivers/gpu/drm/i915/gem/selftests/mock_context.h > @@ -23,9 +23,6 @@ void mock_context_close(struct i915_gem_context *ctx); > struct i915_gem_context * > live_context(struct drm_i915_private *i915, struct file *file); > > -struct i915_gem_context * > -live_context_for_engine(struct intel_engine_cs *engine, struct file *file); > - > struct i915_gem_context *kernel_context(struct drm_i915_private *i915, > struct i915_address_space *vm); > void kernel_context_close(struct i915_gem_context *ctx); > -- > 2.48.1 >