All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/selftests: Wait request to finish
@ 2021-10-18  3:42 Oak Zeng
  2021-10-18  2:54 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Oak Zeng @ 2021-10-18  3:42 UTC (permalink / raw)
  To: intel-gfx; +Cc: srinivasan.s, sudeep.dutt, cq.tang, chris, matthew.auld

Caller of function igt_gpu_fill_dw assumes when this function
returns, the gpu command to fill dword is already finished.
Caller usually checks the GPU filling result immediately, see
the usage in function __igt_write_huge. If there is no wait,
when function igt_gpu_fill_dw returns, the GPU command is not
guaranteed to be finished. So wait for request to finish.

Signed-off-by: Oak Zeng <oak.zeng@intel.com>
---
 drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c b/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c
index b35c1219c852..5fa595ed30b1 100644
--- a/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c
+++ b/drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c
@@ -157,6 +157,7 @@ int igt_gpu_fill_dw(struct intel_context *ce,
 	if (err)
 		i915_request_set_error_once(rq, err);
 	i915_request_add(rq);
+	err = i915_request_wait(rq, 0, HZ/5);
 err_batch:
 	i915_vma_unpin_and_release(&batch, 0);
 	return err;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-18  7:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-18  3:42 [Intel-gfx] [PATCH] drm/i915/selftests: Wait request to finish Oak Zeng
2021-10-18  2:54 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2021-10-18  3:27 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-10-18  7:49 ` [Intel-gfx] [PATCH] " Tvrtko Ursulin
2021-10-18  7:54 ` Matthew Auld

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.