[Intel-gfx] [PATCH 07/12] drm/i915: Use a define for the default priority [0]

Mika Kuoppala mika.kuoppala at linux.intel.com
Fri May 12 08:02:31 UTC 2017


Chris Wilson <chris at chris-wilson.co.uk> writes:

> Explicitly assign the default priority, and give it a name. After much
> discussion, we have chosen to call it I915_PRIORITY_NORMAL!
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

Reviewed-by: Mika Kuoppala <mika.kuoppala at intel.com>

> ---
>  drivers/gpu/drm/i915/i915_gem_context.c | 1 +
>  drivers/gpu/drm/i915/i915_gem_request.h | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> index 31a73c39239f..c5d1666d7071 100644
> --- a/drivers/gpu/drm/i915/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> @@ -199,6 +199,7 @@ __create_hw_context(struct drm_i915_private *dev_priv,
>  	kref_init(&ctx->ref);
>  	list_add_tail(&ctx->link, &dev_priv->context_list);
>  	ctx->i915 = dev_priv;
> +	ctx->priority = I915_PRIORITY_NORMAL;
>  
>  	/* Default context will never have a file_priv */
>  	ret = DEFAULT_CONTEXT_HANDLE;
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.h b/drivers/gpu/drm/i915/i915_gem_request.h
> index 4ccab5affd3c..0ecfc5e2d707 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.h
> +++ b/drivers/gpu/drm/i915/i915_gem_request.h
> @@ -70,6 +70,7 @@ struct i915_priotree {
>  	struct rb_node node;
>  	int priority;
>  #define I915_PRIORITY_MAX 1024
> +#define I915_PRIORITY_NORMAL 0
>  #define I915_PRIORITY_MIN (-I915_PRIORITY_MAX)
>  };
>  
> -- 
> 2.11.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list