diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-19 22:26:57 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-21 13:32:21 +0300 |
commit | e0216b762a7096639db395a22bdda7d1a7213c0f (patch) | |
tree | 3d4979dee365cf8502b06164855bc86907d8b5e2 /drivers/gpu/drm | |
parent | 1fcdaa7e72a7666a8367cabd77db092992357328 (diff) | |
download | linux-e0216b762a7096639db395a22bdda7d1a7213c0f.tar.xz |
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: 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>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 145dc83d302d..a07b62732923 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -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)) { |