]> www.infradead.org Git - users/willy/xarray.git/commitdiff
drm/i915/selftests: Flush the preemption request before waiting
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 22 Dec 2020 11:35:35 +0000 (11:35 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 22 Dec 2020 14:38:10 +0000 (14:38 +0000)
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: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201222113536.3775-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/selftest_lrc.c

index 6f21cdfd09039b41bf992461b947a159e65e6a3d..6b069bb1ddcc50547e7d964fbaabc89a7cf7c69e 100644 (file)
@@ -607,6 +607,10 @@ static int __live_lrc_gpr(struct intel_engine_cs *engine,
                err = emit_semaphore_signal(engine->kernel_context, slot);
                if (err)
                        goto err_rq;
+
+               err = wait_for_submit(engine, rq, HZ / 2);
+               if (err)
+                       goto err_rq;
        } else {
                slot[0] = 1;
                wmb();