]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/i915: Pin the ring high
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 21 May 2018 08:21:31 +0000 (09:21 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 24 May 2018 14:04:36 +0000 (15:04 +0100)
If we can use an unmappable ring, try to pin it out of the mappable
aperture. This simple layout preference is to try and keep the mappable
aperture reserved and available to handle GGTT mmapping requests from
userspace without causing evictions and GPU stalls.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180521082131.13744-4-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_ringbuffer.c

index 757bb0990c071cc7f2e02f6267f4f0b9f666034a..8948b30ea5d653340d85ec7a2896a2672f1a1889 100644 (file)
@@ -1034,6 +1034,8 @@ int intel_ring_pin(struct intel_ring *ring,
                flags |= PIN_OFFSET_BIAS | offset_bias;
        if (vma->obj->stolen)
                flags |= PIN_MAPPABLE;
+       else
+               flags |= PIN_HIGH;
 
        if (!(vma->flags & I915_VMA_GLOBAL_BIND)) {
                if (flags & PIN_MAPPABLE || map == I915_MAP_WC)