summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_request.c
diff options
context:
space:
mode:
authorChris Wilson2018-01-29 10:49:12 +0100
committerChris Wilson2018-01-29 16:38:56 +0100
commitc7cc144d8f625cfb8f338e66d875d0ec42fc399a (patch)
treeacc8ebaafb17bee7da8e5122a42bfd2fadf2e288 /drivers/gpu/drm/i915/i915_gem_request.c
parentdrm/i915: Simplify guard logic for setup_scratch_page() (diff)
downloadkernel-qcow2-linux-c7cc144d8f625cfb8f338e66d875d0ec42fc399a.tar.gz
kernel-qcow2-linux-c7cc144d8f625cfb8f338e66d875d0ec42fc399a.tar.xz
kernel-qcow2-linux-c7cc144d8f625cfb8f338e66d875d0ec42fc399a.zip
drm/i915: Assert that we do not try to unsubmit a completed request
Assert that we do not try to unsubmit a completed request, as should we try to resubmit it later, the ring is already past the request's breadcrumb and the breadcrumb will not be updated. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20180129094912.14428-1-chris@chris-wilson.co.uk Reviewed-by: MichaƂ Winiarski <michal.winiarski@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_request.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_request.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
index 06ec27a68f5c..0a890ef4c420 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.c
+++ b/drivers/gpu/drm/i915/i915_gem_request.c
@@ -537,6 +537,8 @@ void __i915_gem_request_unsubmit(struct drm_i915_gem_request *request)
*/
GEM_BUG_ON(!request->global_seqno);
GEM_BUG_ON(request->global_seqno != engine->timeline->seqno);
+ GEM_BUG_ON(i915_seqno_passed(intel_engine_get_seqno(engine),
+ request->global_seqno));
engine->timeline->seqno--;
/* We may be recursing from the signal callback of another i915 fence */