Re: [PATCH] drm/i915/gvt: return the actual aperture size under gvt environment

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

 



On ke, 2017-04-12 at 09:53 +0100, Chris Wilson wrote:
> On Wed, Apr 12, 2017 at 04:36:57PM +0800, Weinan Li wrote:
> > 
> > I915_GEM_GET_APERTURE ioctl is used to probe aperture size from userspace.
> > Some applications like OpenCL use this information to know how much GM
> > resource can it use.
> 
> That's a userspace bug.

Yes, a new property might be in place. I don't think we can go and
change the meaning of a parameter just like that.

<SNIP>

> > @@ -116,6 +121,14 @@ void intel_vgt_deballoon(struct drm_i915_private *dev_priv)
> >  	memset(&bl_info, 0, sizeof(bl_info));
> >  }
> >  
> > +size_t intel_vgt_reserved_size_by_balloon(struct drm_i915_private *dev_priv)
> > +{
> > +	if (!intel_vgpu_active(dev_priv))
> > +		return 0;
> > +
> > +	return bl_info.reserved_total;
> > +}
> 
> Or just return bl_info.reserved_total.
> 
> Why is there a global here anyway?
> 
> Better would be to track dev_priv->ggtt.reserved
> 
> Then the core code becomes
> 	gtt_size = dev_priv->ggtt.total - dev_priv->ggtt.reserved;
> 
> and doesn't need to know the identity of every possible consumer.

I was writing an e-mail about the same thing. So +1 on the idea.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
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