Skip to content

Commit

Permalink
drm/i915/gem: Check function return in live_nop_switch
Browse files Browse the repository at this point in the history
Fail this test earlier if i915_request_await_dma_fence
fails.

Signed-off-by: Oak Zeng <oak.zeng@intel.com>
  • Loading branch information
zengshanjun authored and intel-lab-lkp committed Oct 7, 2021
1 parent 71af6ba commit 2d7a268
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
Expand Up @@ -88,7 +88,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);
Expand Down

0 comments on commit 2d7a268

Please sign in to comment.