summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-07-01 19:23:19 +0300
committerChris Wilson <chris@chris-wilson.co.uk>2016-07-01 22:59:45 +0300
commitde8fe1663a5e1e6d83b21caf000f462483a8a559 (patch)
treeba34f1419f5c1bde245af3a241ebb0cd78618010 /drivers/gpu
parentf8291952bd8c10e2dfb6fc0419ed747922ab90ea (diff)
downloadlinux-de8fe1663a5e1e6d83b21caf000f462483a8a559.tar.xz
drm/i915: Allocate scratch page from stolen
With the last direct CPU access to the scratch page removed, we can now allocate it from our small amount of reserved system pages (stolen memory). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1467390209-3576-10-git-send-email-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 7ccfb1e57d12..3bc968b7aedc 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -665,7 +665,9 @@ int intel_init_pipe_control(struct intel_engine_cs *engine)
WARN_ON(engine->scratch.obj);
- obj = i915_gem_object_create(engine->i915->dev, 4096);
+ obj = i915_gem_object_create_stolen(engine->i915->dev, 4096);
+ if (!obj)
+ obj = i915_gem_object_create(engine->i915->dev, 4096);
if (IS_ERR(obj)) {
DRM_ERROR("Failed to allocate scratch page\n");
ret = PTR_ERR(obj);