diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-03-27 07:02:10 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-03-27 10:28:41 -0400 |
commit | 743e78c1d726d875b98ff9689cc77c4d3d5d9ae2 (patch) | |
tree | fbac8e4b446b06e67d78cf06c9eb89dd2d068469 /drivers/gpu/drm/i915 | |
parent | 9d918c157fc27716ca8d601745b4776a3145cc93 (diff) |
drm/i915: Skip allocating shadow batch for 0-length batches
Since
commit 17cabf571e50677d980e9ab2a43c5f11213003ae
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Wed Jan 14 11:20:57 2015 +0000
drm/i915: Trim the command parser allocations
we may then try to allocate a zero-sized object and attempt to extract
its pages. Understandably this fails.
Testcase: igt/gem_exec_nop #ivb,byt,hsw
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 43335de0f713..a3190e793ed4 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |||
@@ -1547,7 +1547,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, | |||
1547 | goto err; | 1547 | goto err; |
1548 | } | 1548 | } |
1549 | 1549 | ||
1550 | if (i915_needs_cmd_parser(ring)) { | 1550 | if (i915_needs_cmd_parser(ring) && args->batch_len) { |
1551 | batch_obj = i915_gem_execbuffer_parse(ring, | 1551 | batch_obj = i915_gem_execbuffer_parse(ring, |
1552 | &shadow_exec_entry, | 1552 | &shadow_exec_entry, |
1553 | eb, | 1553 | eb, |