[igt-dev] [PATCH i-g-t v4 4/4] tests/i915/gem_mmap_offset: Add new API test for gem_mmap_offset

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Fri Nov 22 08:34:57 UTC 2019


On Fri, Nov 22, 2019 at 08:07:15AM +0000, Chris Wilson wrote:
 > +static void
> > +mmap_offset_bad_object(int fd, struct local_i915_query_memory_region_info *regions)
> > +{
> > +       const char *region_name;
> > +       struct local_i915_memory_region_info *mem_region;
> > +       uint32_t region, obj_size, batch_size, real_handle;
> > +       uint32_t handles[20];
> > +
> > +       for_each_memory_region(regions, mem_region) {
> > +               int i = 0;
> > +
> > +               region = mem_region->id;
> > +               region_name = memory_region_name(region);
> > +               if (IS_STOLEN_MEMORY_REGION(region)) {
> 
> We have a query interface, why do we need to hardcode caps?
  ^^^^^^^ We _will_ have query interface. At the moment we don't.

> That does not bode well for the design.
> 
> The test is supposed to be agnostic: for a set of supported memory
> regions as reported by the kernel, verify the supported api.
> -Chris

I agree. I will remove this when I'll be able to survive 
gem_create on that region.

Zbigniew


More information about the igt-dev mailing list