Skip to content

Commit

Permalink
drm/i915: Treat an error from i915_vma_instance() as unlikely
Browse files Browse the repository at this point in the history
When pinning into the global GTT, an error from creating the VMA is
unlikely, so mark it so.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170119192659.31789-4-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
  • Loading branch information
Chris Wilson committed Jan 21, 2017
1 parent 1fcdaa7 commit e0216b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -3688,7 +3688,7 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj,
lockdep_assert_held(&obj->base.dev->struct_mutex);

vma = i915_vma_instance(obj, vm, view);
if (IS_ERR(vma))
if (unlikely(IS_ERR(vma)))
return vma;

if (i915_vma_misplaced(vma, size, alignment, flags)) {
Expand Down

0 comments on commit e0216b7

Please sign in to comment.