lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z5fZ7h0lZAoyPUE5@intel.com>
Date: Mon, 27 Jan 2025 14:09:34 -0500
From: Rodrigo Vivi <rodrigo.vivi@...el.com>
To: <linux@...blig.org>
CC: <jani.nikula@...ux.intel.com>, <joonas.lahtinen@...ux.intel.com>,
	<tursulin@...ulin.net>, <airlied@...il.com>, <simona@...ll.ch>,
	<intel-gfx@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/i915: Remove unused live_context_for_engine

On Sat, Jan 25, 2025 at 12:38:46AM +0000, linux@...blig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@...blig.org>
> 
> 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@...el.com>

> Signed-off-by: Dr. David Alan Gilbert <linux@...blig.org>
> ---
>  .../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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ