Re: [PATCH] drm/i915/selftests: Pass intel_context to igt_spinner

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

 



Quoting Tvrtko Ursulin (2019-07-31 06:55:23)
> 
> On 30/07/2019 16:48, Chris Wilson wrote:
> > @@ -1183,11 +1189,16 @@ live_engine_reset_workarounds(void *arg)
> >                       goto err;
> >               }
> >   
> > -             ret = igt_spinner_init(&spin, i915);
> > -             if (ret)
> > -                     goto err;
> > +             ce = i915_gem_context_get_engine(ctx, engine->id);
> > +             if (IS_ERR(ce))
> > +                     continue;
> 
> Can't instead use the for_each_gem_engine pattern as in live_sanitycheck?

The problem here is that the verify_wa which then also uses
for_each_gem_engine. Just needs to rejiggle the other callers so that
the context is always locked.

> > -     spin->hws = i915_gem_object_create_internal(i915, PAGE_SIZE);
> > +     spin->hws = i915_gem_object_create_internal(gt->i915, PAGE_SIZE);
> 
> I'd add the i915 local.

Maybe, at some point we need to pass gt into [internal] object creation.
At the moment, I like gt->i915 for being an eyesore. When there are
enough of them, it indicates which API needs adjusting next :)
-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