From e0ff0e3c6d35a132533398b4058a72b80a40871b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 21 May 2018 09:21:31 +0100 Subject: [PATCH] drm/i915: Pin the ring high 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 Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20180521082131.13744-4-chris@chris-wilson.co.uk --- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 757bb0990c071..8948b30ea5d65 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -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) -- 2.39.5