diff options
author | Chris Wilson | 2019-01-14 22:04:01 +0100 |
---|---|---|
committer | Chris Wilson | 2019-01-16 16:24:16 +0100 |
commit | 18bb2bccb5492fb5c36908191b8af77e54c58814 (patch) | |
tree | 96cb21f22d1eb251d6f3853b300912b1f1c81800 /drivers/gpu/drm/i915/selftests | |
parent | drm/i915: Pass down rc in intel_encoder->compute_config() (diff) | |
download | kernel-qcow2-linux-18bb2bccb5492fb5c36908191b8af77e54c58814.tar.gz kernel-qcow2-linux-18bb2bccb5492fb5c36908191b8af77e54c58814.tar.xz kernel-qcow2-linux-18bb2bccb5492fb5c36908191b8af77e54c58814.zip |
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
Diffstat (limited to 'drivers/gpu/drm/i915/selftests')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/mock_gem_device.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c index 082809569681..3cda66292e76 100644 --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c @@ -188,6 +188,7 @@ struct drm_i915_private *mock_gem_device(void) init_waitqueue_head(&i915->gpu_error.wait_queue); init_waitqueue_head(&i915->gpu_error.reset_queue); + mutex_init(&i915->gpu_error.wedge_mutex); i915->wq = alloc_ordered_workqueue("mock", 0); if (!i915->wq) |