summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ringbuffer.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-08-10 13:41:45 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-08-10 16:07:51 +0100
commit737aac2465e9f44f8ab4f3b75f3220b524ae2a1b (patch)
tree7602ce62b2fcfa2631a7b9fc6ffb00e98c1a44c6 /drivers/gpu/drm/i915/intel_ringbuffer.c
parentb5163dbb17fd0648600d2c840e53b76f5ca49a5b (diff)
downloadop-kernel-dev-737aac2465e9f44f8ab4f3b75f3220b524ae2a1b.zip
op-kernel-dev-737aac2465e9f44f8ab4f3b75f3220b524ae2a1b.tar.gz
drm/i915: Mark unmappable GGTT entries as PIN_HIGH
We allocate a few objects into the GGTT that we never need to access via the mappable aperture (such as contexts, status pages). We can request that these are bound high in the VM to increase the amount of mappable aperture available. However, anything that may be frequently pinned (such as logical contexts) we want to use the fast search & insert. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1470832906-13972-1-git-send-email-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 16b726f..09f01c6 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -2093,7 +2093,7 @@ static int intel_ring_context_pin(struct i915_gem_context *ctx,
if (ce->state) {
ret = i915_gem_object_ggtt_pin(ce->state, NULL, 0,
- ctx->ggtt_alignment, 0);
+ ctx->ggtt_alignment, PIN_HIGH);
if (ret)
goto error;
}
@@ -2629,7 +2629,8 @@ static void intel_ring_init_semaphores(struct drm_i915_private *dev_priv,
i915.semaphores = 0;
} else {
i915_gem_object_set_cache_level(obj, I915_CACHE_LLC);
- ret = i915_gem_object_ggtt_pin(obj, NULL, 0, 0, 0);
+ ret = i915_gem_object_ggtt_pin(obj, NULL,
+ 0, 0, PIN_HIGH);
if (ret != 0) {
i915_gem_object_put(obj);
DRM_ERROR("Failed to pin semaphore bo. Disabling semaphores\n");
OpenPOWER on IntegriCloud