drm/i915: Serialise concurrent calls to i915_gem_set_wedged()
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 14 Jan 2019 21:04:01 +0000 (21:04 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 16 Jan 2019 15:24:16 +0000 (15:24 +0000)
commit18bb2bccb5492fb5c36908191b8af77e54c58814
tree96cb21f22d1eb251d6f3853b300912b1f1c81800
parent204474a6b859ff2367252d8312ac65d3245823bf
drm/i915: Serialise concurrent calls to i915_gem_set_wedged()

Make i915_gem_set_wedged() and i915_gem_unset_wedged() behaviour more
consistent if called concurrently, and only do the wedging and reporting
once, curtailing any possible race where we start unwedging in the middle
of a wedge.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190114210408.4561-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gpu_error.h
drivers/gpu/drm/i915/selftests/mock_gem_device.c