aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gt/mock_engine.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-03-04 12:18:48 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2020-03-04 14:29:50 +0000
commit36e191f0644b20481820d6e0cd27c21a0ea88ad9 (patch)
treefe0c1f699a27b7c79391e002b792fd2aabe45d19 /drivers/gpu/drm/i915/gt/mock_engine.c
parentdrm/i915/ehl: Check PHY type before reading DPLL frequency (diff)
downloadlinux-dev-36e191f0644b20481820d6e0cd27c21a0ea88ad9.tar.xz
linux-dev-36e191f0644b20481820d6e0cd27c21a0ea88ad9.zip
drm/i915: Apply i915_request_skip() on submission
Trying to use i915_request_skip() prior to i915_request_add() causes us to try and fill the ring upto request->postfix, which has not yet been set, and so may cause us to memset() past the end of the ring. Instead of skipping the request immediately, just flag the error on the request (only accepting the first fatal error we see) and then clear the request upon submission. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200304121849.2448028-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gt/mock_engine.c')
-rw-r--r--drivers/gpu/drm/i915/gt/mock_engine.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/gt/mock_engine.c b/drivers/gpu/drm/i915/gt/mock_engine.c
index 5633515c12e9..4a53ded7c2dd 100644
--- a/drivers/gpu/drm/i915/gt/mock_engine.c
+++ b/drivers/gpu/drm/i915/gt/mock_engine.c
@@ -244,9 +244,7 @@ static void mock_reset_cancel(struct intel_engine_cs *engine)
/* Mark all submitted requests as skipped. */
list_for_each_entry(request, &engine->active.requests, sched.link) {
- if (!i915_request_signaled(request))
- dma_fence_set_error(&request->fence, -EIO);
-
+ i915_request_set_error_once(request, -EIO);
i915_request_mark_complete(request);
}