[Intel-gfx] [PATCH] drm/i915: Drop unused engine parameter from i915_gem_validate_context

Chris Wilson chris at chris-wilson.co.uk
Mon Jan 30 20:42:59 UTC 2017


On Mon, Jan 30, 2017 at 05:08:58PM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index b7b0cf7c50d2..ba021e66469f 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -1233,7 +1233,7 @@ validate_exec_list(struct drm_device *dev,
>  
>  static struct i915_gem_context *
>  i915_gem_validate_context(struct drm_device *dev, struct drm_file *file,
> -			  struct intel_engine_cs *engine, const u32 ctx_id)
> +			  const u32 ctx_id)
>  {
>  	struct i915_gem_context *ctx;
>  
> @@ -1708,7 +1708,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
>  	if (ret)
>  		goto pre_mutex_err;
>  
> -	ctx = i915_gem_validate_context(dev, file, engine, ctx_id);
> +	ctx = i915_gem_validate_context(dev, file, ctx_id);
>  	if (IS_ERR(ctx)) {
>  		mutex_unlock(&dev->struct_mutex);

static int eb_select_context(struct i915_execbuffer *eb)
{
        struct i915_gem_context *ctx;

        ctx = i915_gem_context_lookup(eb->file->driver_priv, eb->args->rsvd1);
        if (unlikely(IS_ERR(ctx)))
                return PTR_ERR(ctx);

        if (unlikely(i915_gem_context_is_banned(ctx))) {
                DRM_DEBUG("Context %u tried to submit while banned\n",
                          ctx->user_handle);
                return -EIO;
        }

        eb->ctx = i915_gem_context_get(ctx);
        eb->vm = ctx->ppgtt ? &ctx->ppgtt->base : &eb->i915->ggtt.base;

        eb->context_flags = 0;
        if (ctx->flags & CONTEXT_NO_ZEROMAP)
                eb->context_flags |= __EXEC_OBJECT_NEEDS_BIAS;

        return 0;
}

Too soon?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list