Commit 9559511b authored by Chris Wilson's avatar Chris Wilson

drm/i915/selftests: Flush the preemption request before waiting

Make sure that the request has been submitted to HW before we begin our
wait. This reduces our reliance on the semaphore yield interrupt driving
the preemption request.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201222113536.3775-2-chris@chris-wilson.co.uk
parent 48c508a5
...@@ -607,6 +607,10 @@ static int __live_lrc_gpr(struct intel_engine_cs *engine, ...@@ -607,6 +607,10 @@ static int __live_lrc_gpr(struct intel_engine_cs *engine,
err = emit_semaphore_signal(engine->kernel_context, slot); err = emit_semaphore_signal(engine->kernel_context, slot);
if (err) if (err)
goto err_rq; goto err_rq;
err = wait_for_submit(engine, rq, HZ / 2);
if (err)
goto err_rq;
} else { } else {
slot[0] = 1; slot[0] = 1;
wmb(); wmb();
......
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