]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Reduce locking inside swfinish ioctl
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 5 Aug 2016 09:14:19 +0000 (10:14 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 5 Aug 2016 09:54:41 +0000 (10:54 +0100)
commit29f29574d9110882c72610d9c4b28d3b3c5588ff
tree7e8995fb3cde407e8b3d7dac7a88a3c07f9906d4
parent2e565d6ce67da17e2e27cb7f13b63cd2d0776147
drm/i915: Reduce locking inside swfinish ioctl

We only need to take the struct_mutex if the object is pinned to the
display engine and so requires checking for clflush. (The race with
userspace pinning the object to a framebuffer is irrelevant.)

v2: Use access once for compiler hints (or not as it is a bitfield)
v3: READ_ONCE, obj->pin_display is not a bitfield anymore
v4: Don't be creative with goto.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-14-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c