[Intel-gfx] [PATCH] drm/i915: Suppress EIO during set-to-cpu-domain

Chris Wilson chris at chris-wilson.co.uk
Sat Apr 14 11:24:21 CEST 2012


If the hardware is dead, we can simply discard any outstanding writes
from the GPU and presume the buffer is either in the GTT domain or
already in the CPU domain and continue on flushing the CPU caches.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 19ca320..80fb67d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3087,12 +3087,12 @@ i915_gem_object_set_to_cpu_domain(struct drm_i915_gem_object *obj, bool write)
 		return 0;
 
 	ret = i915_gem_object_flush_gpu_write_domain(obj);
-	if (ret)
+	if (ret && ret != -EIO)
 		return ret;
 
 	if (write || obj->pending_gpu_write) {
 		ret = i915_gem_object_wait_rendering(obj);
-		if (ret)
+		if (ret && ret != -EIO)
 			return ret;
 	}
 
-- 
1.7.10




More information about the Intel-gfx mailing list