]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Wait for the wa batch to be pinned
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 7 Mar 2020 12:24:25 +0000 (12:24 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 7 Mar 2020 17:10:35 +0000 (17:10 +0000)
commitf361e79af410807a93a6df8c83cad3def8e6f67f
tree99f298e378ea0da106d37a4c078f7839e4f6d724
parent37a4af54c6b80c07952e6d7e50320bc0a3d5744d
drm/i915/gt: Wait for the wa batch to be pinned

Be sure to wait for the vma to be in place before we tell the GPU to
execute from the wa batch. Since initialisation is mostly synchronous
(or rather at some point during start up we will need to sync anyway),
we can affort to do an explicit i915_vma_sync() during wa batch
construction rather than check for a required await on every context
switch. (We don't expect to change the wa bb at run time so paying the
cost once up front seems preferrable.)

Fixes: 27f7853a6589 ("drm/i915: Add mechanism to submit a context WA on ring submission")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200307122425.29114-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_ring_submission.c
drivers/gpu/drm/i915/gt/selftest_ring_submission.c