aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gem/i915_gem_client_blt.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-10-07 10:09:47 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-11-03 15:00:06 +0000
commitc648ae338e927f8fb6dd274646e5825852b7fd63 (patch)
tree35e3c14d9346c9fb3d24e4fc69cb2812f43548ae /drivers/gpu/drm/i915/gem/i915_gem_client_blt.c
parentdrm/i915: Hold onto an explicit ref to i915_vma_work.pinned (diff)
downloadlinux-dev-c648ae338e927f8fb6dd274646e5825852b7fd63.tar.xz
linux-dev-c648ae338e927f8fb6dd274646e5825852b7fd63.zip
drm/i915/gem: Perform all asynchronous waits prior to marking payload start
The initial breadcrumb marks the transition from context wait and setup into the request payload. We use the marker to determine if the request is merely waiting to begin, or is inside the payload and hung. Forgetting to include a breadcrumb before the user payload would mean we do not reset the guilty user request, and conversely if the initial breadcrumb is too early we blame the user for a problem elsewhere. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201007090947.19950-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gem/i915_gem_client_blt.c')
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_client_blt.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_client_blt.c b/drivers/gpu/drm/i915/gem/i915_gem_client_blt.c
index 272cf3ea68d5..44821d94544f 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_client_blt.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_client_blt.c
@@ -202,12 +202,6 @@ retry:
if (unlikely(err))
goto out_request;
- if (w->ce->engine->emit_init_breadcrumb) {
- err = w->ce->engine->emit_init_breadcrumb(rq);
- if (unlikely(err))
- goto out_request;
- }
-
/*
* w->dma is already exported via (vma|obj)->resv we need only
* keep track of the GPU activity within this vma/request, and
@@ -217,9 +211,15 @@ retry:
if (err)
goto out_request;
- err = w->ce->engine->emit_bb_start(rq,
- batch->node.start, batch->node.size,
- 0);
+ if (rq->engine->emit_init_breadcrumb) {
+ err = rq->engine->emit_init_breadcrumb(rq);
+ if (unlikely(err))
+ goto out_request;
+ }
+
+ err = rq->engine->emit_bb_start(rq,
+ batch->node.start, batch->node.size,
+ 0);
out_request:
if (unlikely(err)) {
i915_request_set_error_once(rq, err);