Re: [PATCH 14/14] drm/i915/gt: Use intel_gt as the primary object for handling resets

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

 



Quoting Daniele Ceraolo Spurio (2019-07-11 21:45:36)
> <snip>
> 
> > --- a/drivers/gpu/drm/i915/selftests/i915_selftest.c
> > +++ b/drivers/gpu/drm/i915/selftests/i915_selftest.c
> > @@ -256,7 +256,7 @@ int __i915_live_setup(void *data)
> >   {
> >       struct drm_i915_private *i915 = data;
> >   
> > -     return i915_terminally_wedged(i915);
> > +     return intel_gt_terminally_wedged(&i915->gt);
> >   }
> >   
> >   int __i915_live_teardown(int err, void *data)
> > @@ -273,6 +273,27 @@ int __i915_live_teardown(int err, void *data)
> >       return err;
> >   }
> >   
> > +int __intel_gt_live_setup(void *data)
> > +{
> > +     struct intel_gt *gt = data;
> > +
> > +     return intel_gt_terminally_wedged(gt);
> > +}
> > +
> > +int __intel_gt_live_teardown(int err, void *data)
> > +{
> > +     struct intel_gt *gt = data;
> > +
> > +     mutex_lock(&gt->i915->drm.struct_mutex);
> > +     if (igt_flush_test(gt->i915, I915_WAIT_LOCKED))
> > +             err = -EIO;
> > +     mutex_unlock(&gt->i915->drm.struct_mutex);
> > +
> > +     i915_gem_drain_freed_objects(gt->i915);
> > +
> > +     return err;
> > +}
> 
> this is basically a copy of __i915_live_teardown, it might be worth 
> having one of the 2 functions call into the other if you're not planning 
> to have them diverge in the short term.

I had a start of an idea to move this more local to the test suites and
out of the core. Also I expect the gt tests to diverge somewhat :)

> s/intel_gpu_reset/intel_gt_reset/ also didn't materialize but I'm happy 
> for that to come later.

Right, intel_gt_reset is already taken. The intel_gpu_reset is meant to
be the core agnostic bit, that unfortunately gets used outside. It's not
the best name, but at least it's uncommon enough for people not to
assume too much about it.

> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
> 
> P.S.: if you have to respin for other reasons, it'd be nice if you could 
> use a local i915 variable where there are a lot of s/i915/gt->i915/ to 
> keep the diff smaller :P

The gt->i915 that stick out in my mind are intentional sore points :)
I expect those to be refined to something other than gt->i915.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux