Commit 0f2f61d4 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Remove one level of indention from wait-for-execute

Now that the code is getting simpler, we can reduce the indentation when
waiting for the global_seqno.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-17-chris@chris-wilson.co.uk
parent 24f417ec
...@@ -1086,32 +1086,29 @@ long i915_wait_request(struct drm_i915_gem_request *req, ...@@ -1086,32 +1086,29 @@ long i915_wait_request(struct drm_i915_gem_request *req,
intel_wait_init(&wait); intel_wait_init(&wait);
restart: restart:
if (!intel_wait_update_request(&wait, req)) { do {
do { set_current_state(state);
set_current_state(state); if (intel_wait_update_request(&wait, req))
break;
if (intel_wait_update_request(&wait, req))
break;
if (flags & I915_WAIT_LOCKED && if (flags & I915_WAIT_LOCKED &&
__i915_wait_request_check_and_reset(req)) __i915_wait_request_check_and_reset(req))
continue; continue;
if (signal_pending_state(state, current)) { if (signal_pending_state(state, current)) {
timeout = -ERESTARTSYS; timeout = -ERESTARTSYS;
goto complete; goto complete;
} }
if (!timeout) { if (!timeout) {
timeout = -ETIME; timeout = -ETIME;
goto complete; goto complete;
} }
timeout = io_schedule_timeout(timeout); timeout = io_schedule_timeout(timeout);
} while (1); } while (1);
GEM_BUG_ON(!intel_wait_has_seqno(&wait)); GEM_BUG_ON(!intel_wait_has_seqno(&wait));
}
GEM_BUG_ON(!i915_sw_fence_signaled(&req->submit)); GEM_BUG_ON(!i915_sw_fence_signaled(&req->submit));
/* Optimistic short spin before touching IRQs */ /* Optimistic short spin before touching IRQs */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment