i965: Embrace "unlimited" GTT mmap support

Graphics / Mesa 3D Graphics Library / Mesa - Chris Wilson [chris-wilson.co.uk] - 26 August 2016 03:09 UTC

From about kernel 4.9, GTT mmaps are virtually unlimited. A new parameter, I915_PARAM_MMAP_GTT_VERSION, is added to advertise the feature so query it and use it to avoid limiting tiled allocations to only fit within the mappable aperture.

A couple of caveats:

- fence support is still limited by stride to 262144 and the stride needs to be a multiple of tile_width (as before, and same limitation as the current 3D pipeline in hardware)

- the max_gtt_map_object_size forcing untiled may be hiding a few bugs in handling of large objects, though none were spotted in piglits.

See kernel commit 4cc6907501ed ("drm/i915: Add I915_PARAM_MMAP_GTT_VERSION to advertise unlimited mmaps").

v2: Include some commentary on mmap virtual space vs CPU addressable space.

f92a87a i965: Embrace "unlimited" GTT mmap support
src/mesa/drivers/dri/i965/brw_context.c | 17 ++---------
src/mesa/drivers/dri/i965/brw_context.h | 2 +-
src/mesa/drivers/dri/i965/intel_screen.c | 48 ++++++++++++++++++++++++++++++
src/mesa/drivers/dri/i965/intel_screen.h | 2 ++
4 files changed, 53 insertions(+), 16 deletions(-)

Upstream: cgit.freedesktop.org


  • Share