projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f1ac9c
)
drm/i915: Assert that the kernel_context is hw-id 0
author
Chris Wilson
<
[email protected]
>
Mon, 23 Jan 2017 11:31:31 +0000
(11:31 +0000)
committer
Chris Wilson
<
[email protected]
>
Mon, 23 Jan 2017 11:53:32 +0000
(11:53 +0000)
For easy recognisability, we want the kernel context to have id 0 and
all user contexts to have non-zero ids.
Signed-off-by: Chris Wilson <
[email protected]
>
Reviewed-by: Joonas Lahtinen <
[email protected]
>
Link:
http://patchwork.freedesktop.org/patch/msgid/
[email protected]
drivers/gpu/drm/i915/i915_gem_context.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/i915_gem_context.c
b/drivers/gpu/drm/i915/i915_gem_context.c
index 17f90c6182081c932652715ed34724f1c71b373d..77458da9627d4d1f80aa850185f07ad7f5f6a9a3 100644
(file)
--- a/
drivers/gpu/drm/i915/i915_gem_context.c
+++ b/
drivers/gpu/drm/i915/i915_gem_context.c
@@
-451,6
+451,11
@@
int i915_gem_context_init(struct drm_i915_private *dev_priv)
return PTR_ERR(ctx);
}
+ /* For easy recognisablity, we want the kernel context to be 0 and then
+ * all user contexts will have non-zero hw_id.
+ */
+ GEM_BUG_ON(ctx->hw_id);
+
i915_gem_context_clear_bannable(ctx);
ctx->priority = I915_PRIORITY_MIN; /* lowest priority; idle task */
dev_priv->kernel_context = ctx;