Commit 53f5da74 authored by Chris Wilson's avatar Chris Wilson

drm/i915/selftests: Wait until we start timeslicing after a submit

If we submit, we do not start timeslicing until we process the CS event
that marks the start of the context running on HW. So in the selftest,
be sure to wait until we have processed the pending events before
asserting that timeslicing has begun.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Acked-by: default avatarMichael J. Ruhl <michael.j.ruhl@intel.com>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200403190209.21818-1-chris@chris-wilson.co.uk
parent 614654ab
...@@ -1244,7 +1244,12 @@ static int live_timeslice_queue(void *arg) ...@@ -1244,7 +1244,12 @@ static int live_timeslice_queue(void *arg)
if (err) if (err)
goto err_rq; goto err_rq;
intel_engine_flush_submission(engine); /* Wait until we ack the release_queue and start timeslicing */
do {
cond_resched();
intel_engine_flush_submission(engine);
} while (READ_ONCE(engine->execlists.pending[0]));
if (!READ_ONCE(engine->execlists.timer.expires) && if (!READ_ONCE(engine->execlists.timer.expires) &&
!i915_request_completed(rq)) { !i915_request_completed(rq)) {
struct drm_printer p = struct drm_printer p =
......
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