Commit 602ddb41 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Flush execution tasklets before checking request status

Rather than flushing the submission tasklets just before we sleep, flush
before we check the request status. Ideally this gives us a moment to
process the tasklets after sleeping just before we timeout.

v2: Compromise by pushing the flush prior to the timeout, but after the
check on completion so that we do not further delay the ready client.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200205095441.1769599-1-chris@chris-wilson.co.uk
parent aae970d8
...@@ -1571,6 +1571,8 @@ long i915_request_wait(struct i915_request *rq, ...@@ -1571,6 +1571,8 @@ long i915_request_wait(struct i915_request *rq,
break; break;
} }
intel_engine_flush_submission(rq->engine);
if (signal_pending_state(state, current)) { if (signal_pending_state(state, current)) {
timeout = -ERESTARTSYS; timeout = -ERESTARTSYS;
break; break;
...@@ -1581,7 +1583,6 @@ long i915_request_wait(struct i915_request *rq, ...@@ -1581,7 +1583,6 @@ long i915_request_wait(struct i915_request *rq,
break; break;
} }
intel_engine_flush_submission(rq->engine);
timeout = io_schedule_timeout(timeout); timeout = io_schedule_timeout(timeout);
} }
__set_current_state(TASK_RUNNING); __set_current_state(TASK_RUNNING);
......
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