[Intel-gfx] [PATCH 2/2] drm/i915/gt: Only unwedge if we can reset first
Chris Wilson
chris at chris-wilson.co.uk
Fri Sep 13 07:41:55 UTC 2019
Quoting Janusz Krzysztofik (2019-09-10 08:39:51)
> Hi Chris,
>
> On Tuesday, September 10, 2019 12:55:36 AM CEST Chris Wilson wrote:
> > @@ -854,7 +855,11 @@ static bool __intel_gt_unset_wedged(struct intel_gt
> *gt)
> > }
> > spin_unlock_irqrestore(&timelines->lock, flags);
> >
> > - intel_gt_sanitize(gt, false);
> > + ok = false;
> > + if (!reset_clobbers_display(gt->i915))
> > + ok = __intel_gt_reset(gt, ALL_ENGINES) == 0;
> > + if (!ok)
> > + return false;
>
> Before your change, that code was executed inside intel_gt_sanitize(gt, false)
> which unfortunately didn't return any result. The same outcome could be
> achieved by redefining intel_gt_sanitize() to return that result and saying:
>
> if (!intel_gt_sanitize(gt, false)
> return false;
>
> Is there any specific reason for intel_gt_sanitize() returning void?
The intent is that sanitize scrubs the leftover BIOS state, failure is
not an option. The biggest change with respect to intel_gt_sanitize() is
the game we play with reset_clobbers_display -- we need the reset,
whereas in sanitize, the reset is good to have (but realistically we do
not expect there to be any contexts to scrub and so can take the risk).
-Chris
More information about the Intel-gfx
mailing list