Commit e4b3ee71 authored by Matthew Auld's avatar Matthew Auld

drm/i915: stop checking for NULL vma->obj

This is no longer possible since e6e1a304 ("drm/i915: vma is always
backed by an object.").
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220304174252.1000238-1-matthew.auld@intel.com
parent 833124a0
......@@ -525,21 +525,18 @@ int i915_vma_bind(struct i915_vma *vma,
if (!work->vma_res->bi.pages_rsgt)
work->pinned = i915_gem_object_get(vma->obj);
} else {
if (vma->obj) {
ret = i915_gem_object_wait_moving_fence(vma->obj, true);
if (ret) {
i915_vma_resource_free(vma->resource);
vma->resource = NULL;
ret = i915_gem_object_wait_moving_fence(vma->obj, true);
if (ret) {
i915_vma_resource_free(vma->resource);
vma->resource = NULL;
return ret;
}
return ret;
}
vma->ops->bind_vma(vma->vm, NULL, vma->resource, cache_level,
bind_flags);
}
if (vma->obj)
set_bit(I915_BO_WAS_BOUND_BIT, &vma->obj->flags);
set_bit(I915_BO_WAS_BOUND_BIT, &vma->obj->flags);
atomic_or(bind_flags, &vma->flags);
return 0;
......@@ -1384,7 +1381,7 @@ int i915_vma_pin_ww(struct i915_vma *vma, struct i915_gem_ww_ctx *ww,
work->vm = vma->vm;
moving = vma->obj ? i915_gem_object_get_moving_fence(vma->obj) : NULL;
moving = i915_gem_object_get_moving_fence(vma->obj);
dma_fence_work_chain(&work->base, moving);
/* Allocate enough page directories to used PTE */
......
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