[PATCH 5/5] drm/i915: non-interruptible sleeps can't handle -EGAIN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

The rationale for if (wedged) return -EGAIN, was that originally it was
called under the mutex and all paths prior to that point sould have
checked the wedged status upon acquiring the mutex, and so to encounter
a wedged at that point implied that reset had not yet been run and so the
right error code was always EGAIN. However now it is lockless, so
check_wedge is more than just a cleanup but a useful early test for EIO.

(Aside from the BUG_ON!)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux