diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-02-21 07:54:48 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-02-22 10:56:16 -0500 |
commit | 8408c282f0cf34ee166df5f842f2861d245407fd (patch) | |
tree | 9a533744a3860b45de0f6dd08f2255835971624e | |
parent | fca874092597ef946b8f07031d8c31c58b212144 (diff) |
drm/i915: First try a normal large kmalloc for the temporary exec buffers
As we just need a temporary array whilst performing the relocations for
the execbuffer, first attempt to allocate using kmalloc even if it is
not of order page-0. This avoids the overhead of remapping the
discontiguous array and so gives a moderate boost to execution
throughput.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_execbuffer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index a72e7b2cb048..f0c93b2e6c68 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |||
@@ -1306,7 +1306,11 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data, | |||
1306 | return -EINVAL; | 1306 | return -EINVAL; |
1307 | } | 1307 | } |
1308 | 1308 | ||
1309 | exec2_list = drm_malloc_ab(sizeof(*exec2_list), args->buffer_count); | 1309 | exec2_list = kmalloc(sizeof(*exec2_list)*args->buffer_count, |
1310 | GFP_KERNEL | __GFP_NOWARN | __GFP_NORETRY); | ||
1311 | if (exec2_list == NULL) | ||
1312 | exec2_list = drm_malloc_ab(sizeof(*exec2_list), | ||
1313 | args->buffer_count); | ||
1310 | if (exec2_list == NULL) { | 1314 | if (exec2_list == NULL) { |
1311 | DRM_ERROR("Failed to allocate exec list for %d buffers\n", | 1315 | DRM_ERROR("Failed to allocate exec list for %d buffers\n", |
1312 | args->buffer_count); | 1316 | args->buffer_count); |