[igt-dev] [PATCH i-g-t v5 53/65] tests/i915_module_load: Adopt to use allocator

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Tue Aug 10 02:52:58 UTC 2021


On Mon, Aug 09, 2021 at 01:29:32PM -0700, Dixit, Ashutosh wrote:
> On Mon, 09 Aug 2021 06:05:21 -0700, Zbigniew Kempczyński wrote:
> >
> > @@ -126,6 +144,9 @@ static void store_all(int i915)
> >	gem_read(i915, obj[0].handle, 0, engines, nengine * sizeof(engines[0]));
> >	gem_close(i915, obj[0].handle);
> >	intel_ctx_destroy(i915, ctx);
> > +	put_offset(ahnd, obj[0].handle);
> > +	put_offset(ahnd, obj[1].handle);
> > +	put_ahnd(ahnd);
> 
> Maybe skip put_offset since we are doing put_ahnd anyway? Otherwise,
> 
> Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>

Reloc allocator is not tracking offset so this is empty call, but switching
to Simple should keep this range until we free it. As allocator instance 
is kept until last reference reaches 0 put_ahnd() not always can destroy
this instance. In this case it is so it doesn't matter we free offset or not.
So I dare to get your r-b leaving code intact.

--
Zbigniew 


More information about the igt-dev mailing list