diff options
author | 2016-05-13 11:57:22 +0100 | |
---|---|---|
committer | 2016-05-13 12:39:20 +0100 | |
commit | e075a32f515becef66dc849f5eca47409ccf5473 (patch) | |
tree | 47e4a791111cbc6385ce3d0e0bf5b6a9ce23df23 /drivers/gpu/drm/i915/intel_ringbuffer.c | |
parent | drm/i915: Stop retiring requests from busy/wait ioctls (diff) | |
download | linux-dev-e075a32f515becef66dc849f5eca47409ccf5473.tar.xz linux-dev-e075a32f515becef66dc849f5eca47409ccf5473.zip |
drm/i915: Stop automatically retiring requests after a GPU hang
Following a GPU hang, we break out of the request loop in order to
unlock the struct_mutex for use by the GPU reset. However, if we retire
all the requests at that moment, we cannot identify the guilty request
after performing the reset.
v2: Not automatically retiring requests forces us to recheck for
available ringspace.
Fixes: f4457ae71fd6 ("drm/i915: Prevent leaking of -EIO from i915_wait_request()")
Testcase: igt/gem_reset_stats/ban-*
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Tested-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1463137042-9669-4-git-send-email-chris@chris-wilson.co.uk
Diffstat (limited to '')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 0618dd34c3ec..8d35a3978f9b 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -2450,6 +2450,8 @@ int intel_ring_begin(struct drm_i915_gem_request *req, int num_dwords) return ret; intel_ring_update_space(ringbuf); + if (unlikely(ringbuf->space < wait_bytes)) + return -EAGAIN; } if (unlikely(need_wrap)) { |