summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_execbuffer.c
diff options
context:
space:
mode:
authorChris Wilson2018-09-11 15:22:06 +0200
committerChris Wilson2018-09-11 21:42:56 +0200
commitd3f3e5e438d3ce47505db8b0a63d55629e48167e (patch)
treeef2a796a1ef6d3df13816c27d3b8caf794717674 /drivers/gpu/drm/i915/i915_gem_execbuffer.c
parentdrm/i915/icl: Define T_INIT_MASTER registers (diff)
downloadkernel-qcow2-linux-d3f3e5e438d3ce47505db8b0a63d55629e48167e.tar.gz
kernel-qcow2-linux-d3f3e5e438d3ce47505db8b0a63d55629e48167e.tar.xz
kernel-qcow2-linux-d3f3e5e438d3ce47505db8b0a63d55629e48167e.zip
drm/i915: Nuke struct_mutex from context_setparam
Userspace should be free to race against itself and shoot itself in the foot if it so desires to adjust a parameter at the same time as submitting a batch to that context. As such, the struct_mutex in context setparam is only being used to serialise userspace against itself and not for any protection of internal structs and so is superfluous. v2: Separate user_flags from internal flags to reduce chance of interference; and use locked bit ops for user updates. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180911132206.23032-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_execbuffer.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_execbuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 7d0b3a2c30e2..094c3b1cf202 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -743,7 +743,7 @@ static int eb_select_context(struct i915_execbuffer *eb)
}
eb->context_flags = 0;
- if (ctx->flags & CONTEXT_NO_ZEROMAP)
+ if (test_bit(UCONTEXT_NO_ZEROMAP, &ctx->user_flags))
eb->context_flags |= __EXEC_OBJECT_NEEDS_BIAS;
return 0;