Fail this test earlier if i915_request_await_dma_fence fails. Signed-off-by: Oak Zeng <oak.zeng@xxxxxxxxx> --- drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c index b32f7fed2d9c..c0b85e861014 100644 --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c @@ -82,7 +82,14 @@ static int live_nop_switch(void *arg) goto out_file; } if (rq) { - i915_request_await_dma_fence(this, &rq->fence); + if (i915_request_await_dma_fence(this, + &rq->fence)) { + pr_err("Failed to populate %ld contexts\n", n); + intel_gt_set_wedged(to_gt(i915)); + i915_request_put(rq); + err = -EIO; + goto out_file; + } i915_request_put(rq); } rq = i915_request_get(this); -- 2.25.1