Commit e0216b76 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Treat an error from i915_vma_instance() as unlikely

When pinning into the global GTT, an error from creating the VMA is
unlikely, so mark it so.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170119192659.31789-4-chris@chris-wilson.co.ukReviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
parent 1fcdaa7e
...@@ -3688,7 +3688,7 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj, ...@@ -3688,7 +3688,7 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj,
lockdep_assert_held(&obj->base.dev->struct_mutex); lockdep_assert_held(&obj->base.dev->struct_mutex);
vma = i915_vma_instance(obj, vm, view); vma = i915_vma_instance(obj, vm, view);
if (IS_ERR(vma)) if (unlikely(IS_ERR(vma)))
return vma; return vma;
if (i915_vma_misplaced(vma, size, alignment, flags)) { if (i915_vma_misplaced(vma, size, alignment, flags)) {
......
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