[Intel-gfx] [PATCH 4/6] drm/i915: Treat an error from i915_vma_instance() as unlikely
Chris Wilson
chris at chris-wilson.co.uk
Thu Jan 19 19:26:57 UTC 2017
When pinning into the global GTT, an error from creating the VMA is
unlikely, so mark it so.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index fdb6e0ece18c..ae13450fcbe2 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3680,7 +3680,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)) {
--
2.11.0
More information about the Intel-gfx
mailing list