When we want to wait for a request to be executed, we first ask if it is not on the GPU as if it's on the gpu, there's no need to wait. However, we have to take into account that a request may not be on the GPU because it has already completed! The window is small due to the numerous preceding checks that our target has not yet completed, yet there is still a very small window across the kmalloc. Fixes: e88619646971 ("drm/i915: Use HW semaphores for inter-engine synchronisation on gen8+") Testcase: igt/gem_concurrent_blit Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> --- drivers/gpu/drm/i915/i915_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index d06c45305b03..6dbf8dc5cd6a 100644 --- a/drivers/gpu/drm/i915/i915_request.c +++ b/drivers/gpu/drm/i915/i915_request.c @@ -373,7 +373,7 @@ i915_request_await_execution(struct i915_request *rq, init_irq_work(&cb->work, irq_execute_cb); spin_lock_irq(&signal->lock); - if (i915_request_is_active(signal)) { + if (i915_request_is_active(signal) || i915_request_completed(signal)) { i915_sw_fence_complete(cb->fence); kmem_cache_free(global.slab_execute_cbs, cb); } else { -- 2.20.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx