Skip to content

Commit

Permalink
drm/i915: Reduce WARN(i915_gem_valid_gtt_space) to a debug-only check
Browse files Browse the repository at this point in the history
i915_gem_valid_gtt_space() is used after inserting the VMA to double
check the list - the location should have been chosen to pass all the
restrictions.

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/1470324762-2545-8-git-send-email-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Aug 4, 2016
1 parent 91b2db6 commit 3750858
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -3090,10 +3090,7 @@ i915_gem_object_bind_to_vm(struct drm_i915_gem_object *obj,
goto err_vma;
}
}
if (WARN_ON(!i915_gem_valid_gtt_space(vma, obj->cache_level))) {
ret = -EINVAL;
goto err_remove_node;
}
GEM_BUG_ON(!i915_gem_valid_gtt_space(vma, obj->cache_level));

trace_i915_vma_bind(vma, flags);
ret = i915_vma_bind(vma, obj->cache_level, flags);
Expand Down

0 comments on commit 3750858

Please sign in to comment.