diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-03-04 12:18:48 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-03-04 14:29:50 +0000 |
commit | 36e191f0644b20481820d6e0cd27c21a0ea88ad9 (patch) | |
tree | fe0c1f699a27b7c79391e002b792fd2aabe45d19 /drivers/gpu/drm/i915/gem/i915_gem_client_blt.c | |
parent | 56ed441aa1eda6acbbe5a97178915ca93cf9c0ee (diff) | |
download | linux-36e191f0644b20481820d6e0cd27c21a0ea88ad9.tar.bz2 |
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/gem/i915_gem_client_blt.c')
-rw-r--r-- | drivers/gpu/drm/i915/gem/i915_gem_client_blt.c | 2 |
1 files changed, 1 insertions, 1 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 81366aa4812b..0598e5382a1d 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_client_blt.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_client_blt.c @@ -217,7 +217,7 @@ static void clear_pages_worker(struct work_struct *work) 0); out_request: if (unlikely(err)) { - i915_request_skip(rq, err); + i915_request_set_error_once(rq, err); err = 0; } |