diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-09-09 14:11:50 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-09-09 14:23:03 +0100 |
commit | 22dd3bb9190566c7c3b80edb7dea67d1e21d0f91 (patch) | |
tree | 01898a53077a19a7c4608716a7c638924bc0992b /drivers/gpu/drm/i915/i915_gem.c | |
parent | ea746f3659232b3104d9534d5a7ebd9934ae1dd6 (diff) |
drm/i915: Mark up all locked waiters
In the next patch we want to handle reset directly by a locked waiter in
order to avoid issues with returning before the reset is handled. To
handle the reset, we must first know whether we hold the struct_mutex.
If we do not hold the struct_mtuex we can not perform the reset, but we do
not block the reset worker either (and so we can just continue to wait for
request completion) - otherwise we must relinquish the mutex.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-10-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 4617250c3000..23069a2d2850 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2802,7 +2802,8 @@ __i915_gem_object_sync(struct drm_i915_gem_request *to, if (!i915.semaphores) { ret = i915_wait_request(from, - from->i915->mm.interruptible, + from->i915->mm.interruptible | + I915_WAIT_LOCKED, NULL, NO_WAITBOOST); if (ret) @@ -4304,7 +4305,9 @@ int i915_gem_suspend(struct drm_device *dev) if (ret) goto err; - ret = i915_gem_wait_for_idle(dev_priv, I915_WAIT_INTERRUPTIBLE); + ret = i915_gem_wait_for_idle(dev_priv, + I915_WAIT_INTERRUPTIBLE | + I915_WAIT_LOCKED); if (ret) goto err; |