Re: [PATCH v2] drm/i915: Unwind i915_gem_init() failure

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

 



Quoting Michał Winiarski (2017-12-08 22:32:40)
> On Fri, Dec 08, 2017 at 01:17:20AM +0000, Chris Wilson wrote:
> > Since Michal introduced new errors other than -EIO during
> > i915_gem_init(), we need to actually unwind on the error path as we have
> > to abort the module load (and we expect to do so cleanly!).
> > 
> > As we now teardown key state and then mark the driver as wedged (on
> > EIO), we have to be careful to not allow ourselves to resume and
> > unwedge, thus attempting to use the uninitialised driver.
> > 
> > v2: Try not to free driver state for the suppressed EIO
> > 
> > References: 8620eb1dbbf2 ("drm/i915/uc: Don't use -EIO to report missing firmware")
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> > Cc: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx>
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/i915_gem.c | 82 +++++++++++++++++++++++++++++++++--------
> >  1 file changed, 67 insertions(+), 15 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> > index c7b5db78fbb4..ee243e1ef706 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> 
> [SNIP]
> 
> > +err_ggtt:
> > +err_unlock:
> 
> So... Just unlock? :>

Nothing to see here, please move along. I was caught by surprise that we
didn't have an immediate cleanup for err_ggtt.
> 
> Does what it says on the tin (fixing WARN_ON galore on guc load failure):
> 
> Reviewed-by: Michał Winiarski <michal.winiarski@xxxxxxxxx>

Bug not in an elegant way, going it the w/e and see if someone comes up
with a better way.

As a note to self, if we also have a
if (i915_inject_load_failure())
	return -ENODEV;
then we will automatically exercise both failure methods.

I say automatically, except basic-reload-inject uses a hard-coded max
number of passes. Fantastic.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




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