[igt-dev] [PATCH i-g-t v18 04/31] lib/intel_allocator_simple: Add simple allocator

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Tue Feb 2 09:12:24 UTC 2021


On Fri, Jan 29, 2021 at 04:05:40PM +0000, Chris Wilson wrote:
> Quoting Zbigniew Kempczyński (2021-01-29 14:44:27)
> > +struct intel_allocator *intel_allocator_simple_create(int fd, uint32_t ctx)
> > +{
> > +       struct intel_allocator *ial;
> > +       struct intel_allocator_simple *ials;
> > +
> > +       igt_debug("Using simple allocator <fd: %d, ctx: %u>\n", fd, ctx);
> > +
> > +       ial = calloc(1, sizeof(*ial));
> > +       igt_assert(ial);
> > +
> > +       ial->fd = fd;
> > +       ial->ctx = ctx;
> 
> Must ctx be a GEM context handle, or can we use VM handles?
> -Chris

Currently I've bounded allocator instance to context, but I see we can 
have same vm with different ids within different contexts. I need 
to rethink how to rebuild this especially I need to address ctx/vm 
in batchbuffer. 

--
Zbigniew


More information about the igt-dev mailing list