Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4f815f6 authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Use a define for the default priority [0]



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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170517121007.27224-7-chris@chris-wilson.co.uk
parent a4b2b015
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
+1 −0
Original line number Diff line number Diff line
@@ -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)
};