mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
drm/i915: Emit await(batch) before MI_BB_START
Be consistent and ensure that we always emit the asynchronous waits prior to issuing instructions that use the address. This ensures that if we do emit GPU commands to do the await, they are before our use! Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20200510102431.21959-1-chris@chris-wilson.co.uk
This commit is contained in:
@@ -865,13 +865,6 @@ static int live_all_engines(void *arg)
|
||||
goto out_request;
|
||||
}
|
||||
|
||||
err = engine->emit_bb_start(request[idx],
|
||||
batch->node.start,
|
||||
batch->node.size,
|
||||
0);
|
||||
GEM_BUG_ON(err);
|
||||
request[idx]->batch = batch;
|
||||
|
||||
i915_vma_lock(batch);
|
||||
err = i915_request_await_object(request[idx], batch->obj, 0);
|
||||
if (err == 0)
|
||||
@@ -879,6 +872,13 @@ static int live_all_engines(void *arg)
|
||||
i915_vma_unlock(batch);
|
||||
GEM_BUG_ON(err);
|
||||
|
||||
err = engine->emit_bb_start(request[idx],
|
||||
batch->node.start,
|
||||
batch->node.size,
|
||||
0);
|
||||
GEM_BUG_ON(err);
|
||||
request[idx]->batch = batch;
|
||||
|
||||
i915_request_get(request[idx]);
|
||||
i915_request_add(request[idx]);
|
||||
idx++;
|
||||
@@ -993,13 +993,6 @@ static int live_sequential_engines(void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
err = engine->emit_bb_start(request[idx],
|
||||
batch->node.start,
|
||||
batch->node.size,
|
||||
0);
|
||||
GEM_BUG_ON(err);
|
||||
request[idx]->batch = batch;
|
||||
|
||||
i915_vma_lock(batch);
|
||||
err = i915_request_await_object(request[idx],
|
||||
batch->obj, false);
|
||||
@@ -1008,6 +1001,13 @@ static int live_sequential_engines(void *arg)
|
||||
i915_vma_unlock(batch);
|
||||
GEM_BUG_ON(err);
|
||||
|
||||
err = engine->emit_bb_start(request[idx],
|
||||
batch->node.start,
|
||||
batch->node.size,
|
||||
0);
|
||||
GEM_BUG_ON(err);
|
||||
request[idx]->batch = batch;
|
||||
|
||||
i915_request_get(request[idx]);
|
||||
i915_request_add(request[idx]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user