Re: [PATCH v7] drm/i915: return the correct usable aperture size under gvt environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Joonas Lahtinen (2017-06-02 11:19:13)
> On ke, 2017-05-31 at 10:35 +0800, Weinan Li wrote:
> > I915_GEM_GET_APERTURE ioctl is used to probe aperture size from userspace.
> > In gvt environment, each vm only use the ballooned part of aperture, so we
> > should return the correct available aperture size exclude the reserved part
> > by balloon.
> > 
> > v2: add 'reserved' in struct i915_address_space to record the reserved size
> > in ggtt (Chris)
> > 
> > v3: remain aper_size as total, adjust aper_available_size exclude reserved
> > and pinned. UMD driver need to adjust the max allocation size according to
> > the available aperture size but not total size. KMD return the correct
> > usable aperture size any time (Chris, Joonas)
> > 
> > v4: decrease reserved in deballoon (Joonas)
> > 
> > v5: add onion teardown in balloon, add vgt_deballoon_space (Joonas)
> > 
> > v6: change title name (Zhenyu)
> > 
> > v7: code style refine (Joonas)
> > 
> > Suggested-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Suggested-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> > Cc: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx>
> > Signed-off-by: Weinan Li <weinan.z.li@xxxxxxxxx>
> 
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> 
> Comment below for Chris, if you don't merging this.
> 
> <SNIP>
> 
> > @@ -127,9 +134,12 @@ static int vgt_balloon_space(struct i915_ggtt *ggtt,
> >  
> >       DRM_INFO("balloon space: range [ 0x%lx - 0x%lx ] %lu KiB.\n",
> >                start, end, size / 1024);
> > -     return i915_gem_gtt_reserve(&ggtt->base, node,
> > +     ret = i915_gem_gtt_reserve(&ggtt->base, node,
> >                                   size, start, I915_COLOR_UNEVICTABLE,
> >                                   0);
> > +     if (!ret)
> > +             ggtt->base.reserved += size;
> 
> Add newline here while applying the patch.

Done after a little fight with dim setup. Thanks for the patch,
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux