From 887a80c6cca26a9e101a2319eff092fdf0abf656 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 26 Apr 2013 08:50:27 +0100 Subject: [PATCH] drm/i915: Suppress spurious EIO when moving away from the GPU domain --- drivers/gpu/drm/i915/i915_gem.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 0e207e6..1070a80 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1222,7 +1222,7 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data, * to catch cases where we are gazumped. */ ret = i915_gem_object_wait_rendering__nonblocking(obj, !write_domain); - if (ret) + if (ret && ret != -EIO) goto unref; if (read_domains & I915_GEM_DOMAIN_GTT) { @@ -2703,7 +2703,7 @@ i915_gem_object_wait_fence(struct drm_i915_gem_object *obj) { if (obj->last_fenced_seqno) { int ret = i915_wait_seqno(obj->ring, obj->last_fenced_seqno); - if (ret) + if (ret && ret != -EIO) return ret; obj->last_fenced_seqno = 0; @@ -3111,7 +3111,7 @@ i915_gem_object_set_to_gtt_domain(struct drm_i915_gem_object *obj, bool write) return 0; ret = i915_gem_object_wait_rendering(obj, !write); - if (ret) + if (ret && ret != -EIO) return ret; i915_gem_object_flush_cpu_write_domain(obj); @@ -3352,7 +3352,7 @@ i915_gem_object_finish_gpu(struct drm_i915_gem_object *obj) return 0; ret = i915_gem_object_wait_rendering(obj, false); - if (ret) + if (ret && ret != -EIO) return ret; /* Ensure that we invalidate the GPU's caches and TLBs. */ @@ -3376,7 +3376,7 @@ i915_gem_object_set_to_cpu_domain(struct drm_i915_gem_object *obj, bool write) return 0; ret = i915_gem_object_wait_rendering(obj, !write); - if (ret) + if (ret && ret != -EIO) return ret; i915_gem_object_flush_gtt_write_domain(obj); -- 1.7.10.4