drm/i915: Skip unused contexts for context_barrier_task()
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 29 Apr 2019 09:07:35 +0000 (10:07 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 29 Apr 2019 10:12:37 +0000 (11:12 +0100)
commit62c8e423450d7140a640651227ec563d6b0141ce
treea40f24f50fb15029ecd1402e08b139188c46c80c
parent46472b3efb61b033f9b4807a178434c50f31d5c5
drm/i915: Skip unused contexts for context_barrier_task()

If the context has not been used yet, it needs no barrier, and in the
process fix up the selftest in mock_contexts.

Testcase: igt/gem_ctx_clone/vm
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190429090735.326-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/selftests/i915_gem_context.c