[Mesa-dev] [PATCH 08/18] i965: Wire up initial support for DRI_RENDERER_QUERY extension
Ian Romanick
idr at freedesktop.org
Thu Nov 7 16:23:12 PST 2013
On 11/07/2013 01:33 PM, Daniel Vetter wrote:
> On Sat, Oct 12, 2013 at 12:10 AM, Ian Romanick <idr at freedesktop.org> wrote:
>> + /* Once a batch uses more than 75% of the maximum mappable size, we
>> + * assume that there's some fragmentation, and we start doing extra
>> + * flushing, etc. That's the big cliff apps will care about.
>> + *
>> + * Can only map 2G onto the GPU through the GTT.
>> + */
>> + const unsigned gpu_mappable_megabytes = 2 * 1024 * 3 / 4;
>
> We have an ioctl to tell you that, since it's not really 2G on really
> old stuff. And will probably change on newer platforms. Also, using
> that ioctl allows the kernel to limit your usage in case the available
> ram is less than the virtual size of the gtt (atm we don't bother with
> that much cleverness, but probably will in the future). See
> DRM_IOCTL_I915_GEM_GET_APERTURE in libdrm (it's unfortunately not
> exposed through any libdrm function afaics.
This only does GEN4+. i915 and earlier chips are handled in the
previous patch, which uses drmAgpSize. Should that be used here too?
> -Daniel
More information about the mesa-dev
mailing list