On Mon, Jun 25, 2012 at 09:23:38PM +0100, Chris Wilson wrote: > On Sun, 24 Jun 2012 16:42:36 +0200, Daniel Vetter <daniel.vetter at ffwll.ch> wrote: > > So don't return -EAGAIN, even in the case of a gpu hang. Remap it to -EIO > > instead. > > > > This is a bit ugly because intel_ring_begin is all non-interruptible > > and hence only returns -EIO. But as the comment in there says, > > auditing all the callsites would be a pain. > > > > To avoid duplicating code, reuse i915_gem_check_wedge in __wait_seqno. > > Use the opportunity to clarify the different cases a bit with > > comments. > > Two separate patches. The first chunk sounds reasonable, > non-interruptible is a little bit of misnomer here, we mostly use it to > mean NOFAIL, and none of the callers are setup to handle EAGAIN. So > reporting EIO seems reasonable. This started as a patch to avoid returning -EAGAIN from intel_ring_begin if mm.interruptible == false. After having added the same return -EIO logic at a few places, I've noticed that I might as well shove it into check_wedge and also call check_wedge from __wait_seqno (the older patch check the retvalues at a few places instead). Splitting this up would leave is in a state where we avoid returning -EAGAIN at a few places within the functions called by intel_ring_begin, but not all of them. Hence I think this should be all in one patch. -Daniel -- Daniel Vetter Mail: daniel at ffwll.ch Mobile: +41 (0)79 365 57 48