Commit 060e82c6 authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter

drm/i915: Remove redundant list_empty(eb->vmas) tests in execbuffer

Part of the pre-validation for an execbuffer call is that there is at
least one object in the execlist. As we bail if we fail to lookup any
object, we can be sure that after the eb_lookup_vma() there is at least
one object in the vma list and so we do not need to assert.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent ad19f10b
...@@ -622,9 +622,6 @@ i915_gem_execbuffer_reserve(struct intel_engine_cs *ring, ...@@ -622,9 +622,6 @@ i915_gem_execbuffer_reserve(struct intel_engine_cs *ring,
bool has_fenced_gpu_access = INTEL_INFO(ring->dev)->gen < 4; bool has_fenced_gpu_access = INTEL_INFO(ring->dev)->gen < 4;
int retry; int retry;
if (list_empty(vmas))
return 0;
i915_gem_retire_requests_ring(ring); i915_gem_retire_requests_ring(ring);
vm = list_first_entry(vmas, struct i915_vma, exec_list)->vm; vm = list_first_entry(vmas, struct i915_vma, exec_list)->vm;
...@@ -725,9 +722,6 @@ i915_gem_execbuffer_relocate_slow(struct drm_device *dev, ...@@ -725,9 +722,6 @@ i915_gem_execbuffer_relocate_slow(struct drm_device *dev,
int i, total, ret; int i, total, ret;
unsigned count = args->buffer_count; unsigned count = args->buffer_count;
if (WARN_ON(list_empty(&eb->vmas)))
return 0;
vm = list_first_entry(&eb->vmas, struct i915_vma, exec_list)->vm; vm = list_first_entry(&eb->vmas, struct i915_vma, exec_list)->vm;
/* We may process another execbuffer during the unlock... */ /* We may process another execbuffer during the unlock... */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment