Lines Matching full:request
43 struct i915_request *request; in igt_add_request() local
46 /* Basic preliminary test to create a request and let it loose! */ in igt_add_request()
49 request = mock_request(i915->engine[RCS0]->kernel_context, HZ / 10); in igt_add_request()
50 if (!request) in igt_add_request()
53 i915_request_add(request); in igt_add_request()
65 struct i915_request *request; in igt_wait_request() local
68 /* Submit a request, then wait upon it */ in igt_wait_request()
71 request = mock_request(i915->engine[RCS0]->kernel_context, T); in igt_wait_request()
72 if (!request) { in igt_wait_request()
76 i915_request_get(request); in igt_wait_request()
78 if (i915_request_wait(request, 0, 0) != -ETIME) { in igt_wait_request()
79 pr_err("request wait (busy query) succeeded (expected timeout before submit!)\n"); in igt_wait_request()
83 if (i915_request_wait(request, 0, T) != -ETIME) { in igt_wait_request()
84 pr_err("request wait succeeded (expected timeout before submit!)\n"); in igt_wait_request()
88 if (i915_request_completed(request)) { in igt_wait_request()
89 pr_err("request completed before submit!!\n"); in igt_wait_request()
93 i915_request_add(request); in igt_wait_request()
95 if (i915_request_wait(request, 0, 0) != -ETIME) { in igt_wait_request()
96 pr_err("request wait (busy query) succeeded (expected timeout after submit!)\n"); in igt_wait_request()
100 if (i915_request_completed(request)) { in igt_wait_request()
101 pr_err("request completed immediately!\n"); in igt_wait_request()
105 if (i915_request_wait(request, 0, T / 2) != -ETIME) { in igt_wait_request()
106 pr_err("request wait succeeded (expected timeout!)\n"); in igt_wait_request()
110 if (i915_request_wait(request, 0, T) == -ETIME) { in igt_wait_request()
111 pr_err("request wait timed out!\n"); in igt_wait_request()
115 if (!i915_request_completed(request)) { in igt_wait_request()
116 pr_err("request not complete after waiting!\n"); in igt_wait_request()
120 if (i915_request_wait(request, 0, T) == -ETIME) { in igt_wait_request()
121 pr_err("request wait timed out when already complete!\n"); in igt_wait_request()
127 i915_request_put(request); in igt_wait_request()
138 struct i915_request *request; in igt_fence_wait() local
141 /* Submit a request, treat it as a fence and wait upon it */ in igt_fence_wait()
144 request = mock_request(i915->engine[RCS0]->kernel_context, T); in igt_fence_wait()
145 if (!request) { in igt_fence_wait()
150 if (dma_fence_wait_timeout(&request->fence, false, T) != -ETIME) { in igt_fence_wait()
155 i915_request_add(request); in igt_fence_wait()
158 if (dma_fence_is_signaled(&request->fence)) { in igt_fence_wait()
163 if (dma_fence_wait_timeout(&request->fence, false, T / 2) != -ETIME) { in igt_fence_wait()
168 if (dma_fence_wait_timeout(&request->fence, false, T) <= 0) { in igt_fence_wait()
173 if (!dma_fence_is_signaled(&request->fence)) { in igt_fence_wait()
178 if (dma_fence_wait_timeout(&request->fence, false, T) <= 0) { in igt_fence_wait()
195 struct i915_request *request, *vip; in igt_request_rewind() local
204 request = mock_request(ce, 2 * HZ); in igt_request_rewind()
206 if (!request) { in igt_request_rewind()
211 i915_request_get(request); in igt_request_rewind()
212 i915_request_add(request); in igt_request_rewind()
225 if (!mock_cancel_request(request)) { in igt_request_rewind()
226 pr_err("failed to cancel request (already executed)!\n"); in igt_request_rewind()
233 request->engine->submit_request(request); in igt_request_rewind()
239 pr_err("timed out waiting for high priority request\n"); in igt_request_rewind()
243 if (i915_request_completed(request)) { in igt_request_rewind()
244 pr_err("low priority request already completed\n"); in igt_request_rewind()
254 i915_request_put(request); in igt_request_rewind()
556 struct i915_request *request = NULL; in live_nop_request() local
569 request = i915_request_create(engine->kernel_context); in live_nop_request()
570 if (IS_ERR(request)) { in live_nop_request()
571 err = PTR_ERR(request); in live_nop_request()
578 * action with this request, we just want in live_nop_request()
581 * ensuring that the bare request is sufficient in live_nop_request()
588 i915_request_add(request); in live_nop_request()
590 i915_request_wait(request, 0, MAX_SCHEDULE_TIMEOUT); in live_nop_request()
604 pr_info("Request latencies on %s: 1 = %lluns, %lu = %lluns\n", in live_nop_request()
661 struct i915_request *request; in empty_request() local
664 request = i915_request_create(engine->kernel_context); in empty_request()
665 if (IS_ERR(request)) in empty_request()
666 return request; in empty_request()
668 err = engine->emit_bb_start(request, in empty_request()
676 i915_request_add(request); in empty_request()
677 return err ? ERR_PTR(err) : request; in empty_request()
706 struct i915_request *request; in live_empty_request() local
715 request = empty_request(engine, batch); in live_empty_request()
716 if (IS_ERR(request)) { in live_empty_request()
717 err = PTR_ERR(request); in live_empty_request()
720 i915_request_wait(request, 0, MAX_SCHEDULE_TIMEOUT); in live_empty_request()
726 request = empty_request(engine, batch); in live_empty_request()
727 if (IS_ERR(request)) { in live_empty_request()
728 err = PTR_ERR(request); in live_empty_request()
732 i915_request_wait(request, 0, MAX_SCHEDULE_TIMEOUT); in live_empty_request()
836 struct i915_request *request[I915_NUM_ENGINES]; in live_all_engines() local
863 request[id] = i915_request_create(engine->kernel_context); in live_all_engines()
864 if (IS_ERR(request[id])) { in live_all_engines()
865 err = PTR_ERR(request[id]); in live_all_engines()
866 pr_err("%s: Request allocation failed with err=%d\n", in live_all_engines()
871 err = engine->emit_bb_start(request[id], in live_all_engines()
876 request[id]->batch = batch; in live_all_engines()
879 err = i915_request_await_object(request[id], batch->obj, 0); in live_all_engines()
881 err = i915_vma_move_to_active(batch, request[id], 0); in live_all_engines()
885 i915_request_get(request[id]); in live_all_engines()
886 i915_request_add(request[id]); in live_all_engines()
890 if (i915_request_completed(request[id])) { in live_all_engines()
891 pr_err("%s(%s): request completed too early!\n", in live_all_engines()
907 timeout = i915_request_wait(request[id], 0, in live_all_engines()
911 pr_err("%s: error waiting for request on %s, err=%d\n", in live_all_engines()
916 GEM_BUG_ON(!i915_request_completed(request[id])); in live_all_engines()
917 i915_request_put(request[id]); in live_all_engines()
918 request[id] = NULL; in live_all_engines()
925 if (request[id]) in live_all_engines()
926 i915_request_put(request[id]); in live_all_engines()
938 struct i915_request *request[I915_NUM_ENGINES] = {}; in live_sequential_engines() local
947 * that each successive request waits for the earlier ones. This in live_sequential_engines()
970 request[id] = i915_request_create(engine->kernel_context); in live_sequential_engines()
971 if (IS_ERR(request[id])) { in live_sequential_engines()
972 err = PTR_ERR(request[id]); in live_sequential_engines()
973 pr_err("%s: Request allocation failed for %s with err=%d\n", in live_sequential_engines()
979 err = i915_request_await_dma_fence(request[id], in live_sequential_engines()
982 i915_request_add(request[id]); in live_sequential_engines()
983 pr_err("%s: Request await failed for %s with err=%d\n", in live_sequential_engines()
989 err = engine->emit_bb_start(request[id], in live_sequential_engines()
994 request[id]->batch = batch; in live_sequential_engines()
997 err = i915_request_await_object(request[id], batch->obj, false); in live_sequential_engines()
999 err = i915_vma_move_to_active(batch, request[id], 0); in live_sequential_engines()
1003 i915_request_get(request[id]); in live_sequential_engines()
1004 i915_request_add(request[id]); in live_sequential_engines()
1006 prev = request[id]; in live_sequential_engines()
1012 if (i915_request_completed(request[id])) { in live_sequential_engines()
1013 pr_err("%s(%s): request completed too early!\n", in live_sequential_engines()
1019 err = recursive_batch_resolve(request[id]->batch); in live_sequential_engines()
1026 timeout = i915_request_wait(request[id], 0, in live_sequential_engines()
1030 pr_err("%s: error waiting for request on %s, err=%d\n", in live_sequential_engines()
1035 GEM_BUG_ON(!i915_request_completed(request[id])); in live_sequential_engines()
1044 if (!request[id]) in live_sequential_engines()
1047 cmd = i915_gem_object_pin_map(request[id]->batch->obj, in live_sequential_engines()
1053 i915_gem_object_unpin_map(request[id]->batch->obj); in live_sequential_engines()
1056 i915_vma_put(request[id]->batch); in live_sequential_engines()
1057 i915_request_put(request[id]); in live_sequential_engines()