[igt-dev] [PATCH i-g-t v3 2/4] lib/i915/intel_memory_region: Add lib to manage memory regions
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Thu Nov 21 08:44:30 UTC 2019
On Wed, Nov 20, 2019 at 08:15:51PM +0000, Chris Wilson wrote:
> 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
That was one of my first questions to Daniel, why we don't use .pad field
in drm_i915_gem_create. So I can only live with current API.
Do you think should I change above function or it can stay as it is?
Zbigniew
More information about the igt-dev
mailing list