On Thu, Mar 16, 2017 at 06:38:09PM +0200, Mika Kuoppala wrote:
> Chris Wilson <[email protected]> writes:
> 
> > Provide some serialisation between user operations by waiting for the
> > reset initiated by setting i915_wedged to complete.

The automatic wait here makes
        echo 1 > i915_wedged; cat i915_error_state
do the right thing.

> >
> > Signed-off-by: Chris Wilson <[email protected]>
> > Cc: Tvrtko Ursulin <[email protected]>
> > Cc: Mika Kuoppala <[email protected]>
> > ---
> >  drivers/gpu/drm/i915/i915_debugfs.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
> > b/drivers/gpu/drm/i915/i915_debugfs.c
> > index 5fdf8c137235..ada823815b8a 100644
> > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > @@ -4129,6 +4129,10 @@ i915_wedged_set(void *data, u64 val)
> >     i915_handle_error(dev_priv, val,
> >                       "Manually setting wedged to %llu", val);
> >  
> > +   wait_on_bit(&dev_priv->gpu_error.flags,
> > +               I915_RESET_HANDOFF,
> > +               TASK_UNINTERRUPTIBLE);
> > +
> 
> But what happens here if we have already prevented the reset and
> the handoff never clears? Seems like it is a stuck task as the
> handoff is not cleared on error path in i915_reset.

The error path should be clearing the handoff bit, and signaling the
wakeup.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to