[igt-dev] [PATCH i-g-t v3 2/4] lib/i915/intel_memory_region: Add lib to manage memory regions
Chris Wilson
chris at chris-wilson.co.uk
Wed Nov 20 20:15:51 UTC 2019
Quoting Zbigniew Kempczyński (2019-11-20 20:06:40)
> On Wed, Nov 20, 2019 at 07:45:16PM +0000, Chris Wilson wrote:
> > Quoting Zbigniew Kempczyński (2019-11-20 18:57:37)
> > > +/* gem_create_in_memory_region_list:
> > > + * @fd: opened i915 drm file descriptor
> > > + * @size: requested size of the buffer
> > > + * @mem_regions: memory regions array (priority list)
> > > + * @num_regions: @mem_regions length
> > > + */
> > > +uint32_t gem_create_in_memory_region_list(int fd, uint64_t size,
> > > + uint32_t *mem_regions,
> > > + int num_regions)
> > > +{
> > > + uint32_t handle = gem_create(fd, size);
> > > + int ret = __gem_migrate_to_memory_regions(fd, handle,
> > > + mem_regions, num_regions);
> > > + igt_assert_eq(ret, 0);
> >
> > No gem_create_ext() where we can pass OBJECT_PARAM in at create time? So
> > Joonas can later say these are construct time only properties?
> > -Chris
>
> You mean more generic wrapper than above? No problem to add one
> but this one was for migrate bo to requested memory regions, nothing else.
No, I mean we need to extend the GEM_CREATE_IOCTL.
-Chris
More information about the igt-dev
mailing list