]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/i915: Skip context_barrier emission for unused contexts
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 4 Jun 2019 15:24:08 +0000 (16:24 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 6 Jun 2019 12:35:16 +0000 (13:35 +0100)
commit1fe2d6f94f96e35f0d71721eb899f5f72d5b68bd
tree1590703bbea7a6aec3142619fdb9c4d599a3f12a
parent155ab8836caa69579a97a02ccafee929091170b5
drm/i915: Skip context_barrier emission for unused contexts

The intent was to skip unused HW contexts by checking ce->state.
However, this only works for execlists where the ppGTT pointers is
stored inside the HW context. For gen7, the ppGTT is alongside the
logical state and must be updated on all active engines but, crucially,
only on active engines. As we need different checks, and to keep
context_barrier_task() agnostic, pass in the predicate.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110836
Fixes: 62c8e423450d ("drm/i915: Skip unused contexts for context_barrier_task()")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190604152408.24468-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_context.c
drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c