]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/i915: Use a define for the default priority [0]
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 17 May 2017 12:10:02 +0000 (13:10 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 17 May 2017 12:38:08 +0000 (13:38 +0100)
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@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170517121007.27224-7-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_request.h

index 31a73c39239f1fe539342356f0ecf0843deee10a..c5d1666d7071271335b6c614b05ed75b5412651c 100644 (file)
@@ -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;
index 4ccab5affd3c22bdc4e6c7890b0df6f5636ac86d..0ecfc5e2d707280563838df6010191b75ab9e64b 100644 (file)
@@ -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)
 };