All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Suppress EIO during set-to-cpu-domain
@ 2012-04-14  9:24 Chris Wilson
  2012-04-14 22:16 ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2012-04-14  9:24 UTC (permalink / raw)
  To: intel-gfx

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@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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Suppress EIO during set-to-cpu-domain
  2012-04-14  9:24 [PATCH] drm/i915: Suppress EIO during set-to-cpu-domain Chris Wilson
@ 2012-04-14 22:16 ` Daniel Vetter
  2012-04-14 22:24   ` Chris Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2012-04-14 22:16 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Sat, Apr 14, 2012 at 10:24:21AM +0100, Chris Wilson wrote:
> 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@chris-wilson.co.uk>

Pardon my ignorance, but I fail to see the goal of these -EIO patches ...
Care to mind the dense?
-Daniel

> ---
>  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
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Suppress EIO during set-to-cpu-domain
  2012-04-14 22:16 ` Daniel Vetter
@ 2012-04-14 22:24   ` Chris Wilson
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2012-04-14 22:24 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

On Sun, 15 Apr 2012 00:16:15 +0200, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Sat, Apr 14, 2012 at 10:24:21AM +0100, Chris Wilson wrote:
> > 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@chris-wilson.co.uk>
> 
> Pardon my ignorance, but I fail to see the goal of these -EIO patches ...
> Care to mind the dense?

I encountered a page-fault-of-doom, due to i915_gem_fault() spinning on
a flush. i915_gem_reset() should fixup the buffers to prevent that.
However, I thought the EIO checks served as nice documentation along
paths that simply did not care why the GPU was no longer accessing the
buffer only that it wasn't.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-14 22:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-14  9:24 [PATCH] drm/i915: Suppress EIO during set-to-cpu-domain Chris Wilson
2012-04-14 22:16 ` Daniel Vetter
2012-04-14 22:24   ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.