]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftests: Flush GPU activity before completing live_contexts
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 5 May 2018 09:10:14 +0000 (10:10 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 8 May 2018 11:44:33 +0000 (12:44 +0100)
commit639fe4a8dedae400d17c3a616aaf8c39f3288d1a
treeeda1343fb50e0bcc43d72e835cd78d16eba0cb7d
parenta5d3d275e15d8c2849f37a8b9feea79f68f60ec0
drm/i915/selftests: Flush GPU activity before completing live_contexts

igt_ctx_exec() expects that we retire all active requests/objects before
completing, so that when we clean up the files afterwards they are ready
to be freed. Before we do so, it is then prudent to ensure that we have
indeed retired the GPU activity, raising an error if it fails. If we do
not, we run the risk of triggering an assertion when freeing the object:

  __i915_gem_free_objects:4793 GEM_BUG_ON(i915_gem_object_is_active(obj))

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180505091014.26126-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/selftests/i915_gem_context.c